InBetweenNames / gentooLTO

A Gentoo Portage configuration for building with -O3, Graphite, and LTO optimizations
GNU General Public License v2.0
569 stars 96 forks source link

dev-libs/libsodium-1.0.18 fails to build with lto on arm64 #456

Open Jannik2099 opened 4 years ago

Jannik2099 commented 4 years ago

Libsodium fails to build with lto, see libsodium-build.log

I'm surprised that other users haven't encountered this as libsodium is a dependency of keepassxc, which is mentioned in the ltoworkarounds.conf. Perhaps this is due to the asm useflag since this is where the compile fails, I can try emerging it without the asm useflag tomorrow. I haven't tried any other workarounds besides disabling lto, if you have any ideas I'm happy to test them.

The package compiled succesfully without lto, and for those curious this was the only build fail I encountered on my kde arm64 system so far.

elsandosgrande commented 4 years ago

What is keepassxc?

Jannik2099 commented 4 years ago

https://packages.gentoo.org/packages/app-admin/keepassxc

It's the community edition of keepass, a popular password manager

elsandosgrande commented 4 years ago

I have never used it, nor do I have it installed.

Have you tried building it for x86 (32-bit)? If it succeeds there by some miracle of God, we can narrow the workaround down.

Jannik2099 commented 4 years ago

I will do that the next time I get access to an x86 machine, somewhere around end of next week

Jannik2099 commented 4 years ago

Libsodium builds fine with lto on x86, even with the asm useflag. With the asm useflag on arm64 lto fails, works fine without asm.

Can the overlay filter flags depending on arch?

elsandosgrande commented 4 years ago

So... I realize that I misread "arm64" as "amd64" earlier, but this, it seems, was not in vain. Given that it works on 32-bit, I'll try 64-bit on my laptop, though I can't actually test it to see if it works properly, as I will be emerging libsodium on its own.

Could you try ARM 32-bit (not sure what it's called, like how ARM 64-bit is aarch64 from what I recall, assuming that I am not getting my wires crossed) @Jannik2099? Also, are you running on a Raspberry Pi, or... and how did you manage to set it up, since I did not see any official ARM handbook the last time I looked at the handbooks page (the latter one is mostly for my own curiosity, so we should probably move that to the Gitter chat, no?)?

Regarding the filtering of flags per architecture, it is most likely possible, but will take some Bash and app-portage/portage-bash-mv know-how. I think that it will look like the LibreOffice line in the workarounds, since it can selectively pick when to override the flags based on the USE flags presented. Given that ARCH="aarch64" is probably another extended USE flag, it could be handled in the same manner.

Edit

Um... I actually forgot the specific flags which control architecture. I'm guessing that CHOST could be an extended USE flag, but I'm not entirely sure, since it's never mentioned in Portage's emerge output, just ABI_X86 in my case. Actually, now my latter question might provide the value of CHOST for ARM, as I certainly don't know it.

Edit two

Well... That was quick.

root@sandys-pavilion:/home/sandy# equery uses libsodium && emerge --info libsodium
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-libs/libsodium-1.0.18:
 U I
 + + abi_x86_32           : 32-bit (x86) libraries
 - - abi_x86_x32          : x32 ABI libraries
 + + asm                  : Enables assembly implementations
 + + cpu_flags_x86_aes    : Enable support for Intel''s AES instruction set (AES-NI)
 + + cpu_flags_x86_sse4_1 : Enable SSE4.1 instruction support
 - - minimal              : Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features)
 - - static-libs          : Build static versions of dynamic libraries as well
 + + urandom              : Use /dev/urandom instead of /dev/random
Portage 2.3.82 (python 3.8.1-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.2.0, glibc-2.30-r3, 5.4.6-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.4.6-gentoo-x86_64-AMD_A9-9410_RADEON_R5,_5_COMPUTE_CORES_2C+3G-with-glibc2.4
KiB Mem:     7597680 total,    438388 free
KiB Swap:   16777212 total,  16382736 free
Timestamp of repository gentoo: Thu, 02 Jan 2020 14:00:01 +0000
Head commit of repository gentoo: 2fa473a4300a20c9ca881eac6cfec9828d823e9c
Timestamp of repository jorgicio: Mon, 30 Dec 2019 17:45:31 +0000
Head commit of repository jorgicio: 00977b0aa1ea644a6abbf945adeef85c89f3e0f8

Timestamp of repository kde: Thu, 02 Jan 2020 00:25:34 +0000
Head commit of repository kde: ab643df6801a12ba34b89451493791c71614df29

Timestamp of repository lto-overlay: Mon, 30 Dec 2019 13:14:41 +0000
Head commit of repository lto-overlay: 00ec23ce2d7367b025435b2a25ff215998c09f61

Timestamp of repository matrix: Mon, 30 Dec 2019 13:14:39 +0000
Head commit of repository matrix: 145fa70196911b985cb076dd3655f65badf5344a

Timestamp of repository mv: Mon, 30 Dec 2019 13:14:11 +0000
Head commit of repository mv: d9642adc4725ad9d0f862ad701a6518153829b35

Timestamp of repository snapd: Sun, 15 Dec 2019 19:28:10 +0000
Head commit of repository snapd: 6e77b2b4ce5b5ec3f7592909fb536ad9c849a581

Timestamp of repository steam-overlay: Mon, 30 Dec 2019 13:14:18 +0000
Head commit of repository steam-overlay: 0a514fbf5cd99699eb087dbb156adf1ee79896aa

sh bash 5.0_p11
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.7.6 [disabled]
app-shells/bash:          5.0_p11::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.1::gentoo
dev-util/ccache:          3.7.6::gentoo
dev-util/cmake:           3.16.2-r1::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.18::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r2::gentoo
sys-devel/binutils:       2.32-r1::gentoo, 2.33.1::gentoo
sys-devel/gcc:            8.3.0-r3::gentoo, 9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.30-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 

jorgicio
    location: /var/db/repos/jorgicio
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/jorgicio.git
    masters: gentoo

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo

localrepo
    location: /var/db/repos/localrepo
    masters: gentoo

lto-overlay
    location: /var/db/repos/lto-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/lto-overlay.git
    masters: gentoo mv

matrix
    location: /var/db/repos/matrix
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/matrix.git
    masters: gentoo

mv
    location: /var/db/repos/mv
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/mv.git
    masters: gentoo

snapd
    location: /var/db/repos/snapd
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/snapd.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

ABI="amd64"
ABI_X86="32 64"
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ADA_TARGET="gnat_2018"
ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"
ANDROID_HOME="/opt/android-sdk-update-manager"
ANDROID_SWT="//usr/share/swt-3.7/lib"
ANT_HOME="/usr/share/ant"
APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias"
ARCH="amd64"
AUTOCLEAN="yes"
BOOTSTRAP_USE="unicode internal-glib pkg-config split-usr python_targets_python3_6 python_targets_python2_7 multilib systemd udev"
BROOT=""
CALLIGRA_FEATURES="karbon sheets words"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=bdver4 -falign-functions=32 -falign-jumps=32:8:8 -falign-loops=32:25:8 -pipe -pthread -fira-hoist-pressure -fira-loop-pressure -fbranch-target-load-optimize -fweb -ftracer -fsched2-use-superblocks -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -fno-plt -flto=2 -fuse-linker-plugin -fuse-ld=bfd -fstack-protector-all -fstack-clash-protection -Wall -Wextra"
CFLAGS_amd64="-m64"
CFLAGS_x32="-mx32"
CFLAGS_x86="-m32"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x32="x86_64-pc-linux-gnux32"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"
COLLISION_IGNORE="/lib/modules/*"
COLORFGBG="0;15"
COLORTERM="truecolor"
COLUMNS="270"
COMMON_FLAGS="-O3 -march=bdver4 -falign-functions=32 -falign-jumps=32:8:8 -falign-loops=32:25:8 -pipe -pthread -fira-hoist-pressure -fira-loop-pressure -fbranch-target-load-optimize -fweb -ftracer -fsched2-use-superblocks -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -fno-plt -flto=2 -fuse-linker-plugin -fuse-ld=bfd -fstack-protector-all -fstack-clash-protection -Wall -Wextra"
CONFIG_PROTECT="/etc/locale* /etc/nginx/nginx.conf /etc/portage/make.conf /etc/security/limits.conf /etc/sudoers /etc/systemd/logind.conf /etc/systemd/system/ /usr/lib/sysctl.d/90-override.conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CPU_FLAGS_X86="fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 sse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm perfctr_core perfctr_nb bpext ptsc mwaitx cpb hw_pstate ssbd vmmcall fsgsbase bmi1 avx2 smep bmi2 xsaveopt arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov"
CXXFLAGS="-O3 -march=bdver4 -falign-functions=32 -falign-jumps=32:8:8 -falign-loops=32:25:8 -pipe -pthread -fira-hoist-pressure -fira-loop-pressure -fbranch-target-load-optimize -fweb -ftracer -fsched2-use-superblocks -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -fno-plt -flto=2 -fuse-linker-plugin -fuse-ld=bfd -fstack-protector-all -fstack-clash-protection -Wall -Wextra"
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-3eJ1mG215G,guid=231822779d9c3151f4b1ba235e0dd6a4"
DEFAULT_ABI="amd64"
DESKTOP_SESSION="/usr/share/wayland-sessions/plasmawayland"
DEVIRTLTO="-fdevirtualize-at-ltrans"
DISPLAY=":1"
DISTDIR="/usr/portage/distfiles"
EDITOR="/usr/bin/vi"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--verbose --verbose-conflicts"
EMERGE_WARNING_DELAY="10"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
EPREFIX=""
EROOT="/"
ESYSROOT="/"
FCFLAGS="-O3 -march=bdver4 -falign-functions=32 -falign-jumps=32:8:8 -falign-loops=32:25:8 -pipe -pthread -fira-hoist-pressure -fira-loop-pressure -fbranch-target-load-optimize -fweb -ftracer -fsched2-use-superblocks -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -fno-plt -flto=2 -fuse-linker-plugin -fuse-ld=bfd -fstack-protector-all -fstack-clash-protection -Wall -Wextra"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
FETCHCOMMAND_RSYNC="rsync -LtvP "${URI}" "${DISTDIR}/${FILE}""
FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; eval \"declare -a ssh_opts=(\${3})\" ; exec sftp \${port:+-P \${port}} \"\${ssh_opts[@]}\" \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; exec rsync --rsh=\"ssh \${port:+-p\${port}} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
FFLAGS="-O3 -march=bdver4 -falign-functions=32 -falign-jumps=32:8:8 -falign-loops=32:25:8 -pipe -pthread -fira-hoist-pressure -fira-loop-pressure -fbranch-target-load-optimize -fweb -ftracer -fsched2-use-superblocks -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -fno-plt -flto=2 -fuse-linker-plugin -fuse-ld=bfd -fstack-protector-all -fstack-clash-protection -Wall -Wextra"
FLTO="-flto=2"
GCC_COLORS="error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01"
GCC_SPECS=""
GENTOOLTO="-fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -fno-plt -flto=2 -fuse-linker-plugin"
GENTOO_MIRRORS="http://ftp.ntua.gr/pub/linux/gentoo/ https://mirrors.evowise.com/gentoo/ https://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/"
GPG_TTY="/dev/pts/1"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx"
GRAPHITE="-fgraphite-identity -floop-nest-optimize"
GRUB_PLATFORMS="efi-64"
GSETTINGS_BACKEND="dconf"
GS_LIB="/home/sandy/.fonts"
GTK_IM_MODULE="fcitx"
HOME="/root"
INFOPATH="/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.32/info:/usr/share/info"
INPUT_DEVICES="libinput wacom"
IPAPTA="-fipa-pta"
IUSE_IMPLICIT="abi_x86_64 prefix prefix-guest prefix-stack"
JAVAC="/etc/java-config-2/current-system-vm/bin/javac"
JAVA_HOME="/etc/java-config-2/current-system-vm"
JDK_HOME="/etc/java-config-2/current-system-vm"
KDE_FULL_SESSION="true"
KDE_SESSION_UID="1000"
KDE_SESSION_VERSION="5"
KERNEL="linux"
KONSOLE_DBUS_SERVICE=":1.27"
KONSOLE_DBUS_SESSION="/Sessions/1"
KONSOLE_DBUS_WINDOW="/Windows/1"
KONSOLE_VERSION="191200"
LADSPA_PATH="/usr/lib64/ladspa"
LANG="en_US.UTF-8"
LANGUAGE="en_US:en"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LC_ADDRESS="bs_BA.UTF-8"
LC_COLLATE="bs_BA.UTF-8"
LC_CTYPE="bs_BA.UTF-8"
LC_IDENTIFICATION="bs_BA.UTF-8"
LC_MEASUREMENT="bs_BA.UTF-8"
LC_MESSAGES="C"
LC_MONETARY="bs_BA.UTF-8"
LC_NAME="bs_BA.UTF-8"
LC_NUMERIC="bs_BA.UTF-8"
LC_PAPER="bs_BA.UTF-8"
LC_TELEPHONE="bs_BA.UTF-8"
LC_TIME="ja_JP.UTF-8"
LDFLAGS="-O3 -march=bdver4 -falign-functions=32 -falign-jumps=32:8:8 -falign-loops=32:25:8 -pipe -pthread -fira-hoist-pressure -fira-loop-pressure -fbranch-target-load-optimize -fweb -ftracer -fsched2-use-superblocks -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -fno-plt -flto=2 -fuse-linker-plugin -fuse-ld=bfd -fstack-protector-all -fstack-clash-protection -Wall -Wextra -Wl,-O1 -Wl,--as-needed -Wl,-O3 -Wl,-z,relro -Wl,-z,now"
LDFLAGS_amd64="-m elf_x86_64"
LDFLAGS_x32="-m elf32_x86_64"
LDFLAGS_x86="-m elf_i386"
LESS="-sFRiMX --shift 5"
LESSOPEN="|lesspipe.sh %s"
LIBDIR_amd64="lib64"
LIBDIR_x32="libx32"
LIBDIR_x86="lib"
LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"
LINES="65"
LLVM_TARGETS="AMDGPU WebAssembly"
LOCALE="en_US.UTF-8"
LOG="trace"
LOGNAME="root"
LS_COLORS="rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.cfg=00;32:*.conf=00;32:*.diff=00;32:*.doc=00;32:*.ini=00;32:*.log=00;32:*.patch=00;32:*.pdf=00;32:*.ps=00;32:*.tex=00;32:*.txt=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:"
LV2_PATH="/usr/lib64/lv2"
MAIL="/var/mail/sandy"
MAKEOPTS="-j2"
MANPAGER="manpager"
MANPATH="/etc/java-config-2/current-system-vm/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.32/man:/usr/lib/llvm/9/share/man:/usr/lib/llvm/8/share/man:/etc/java-config-2/current-system-vm/man/:/usr/lib64/php7.3/man/:/usr/lib64/php7.4/man/:/usr/local/share/man:/usr/share/man:/usr/share/rust-1.40.0/man"
MOZ_GMP_PATH="/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev|systemd|clang|python-exec|llvm)"
NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"
NOCOMMON="-fno-common"
NOPLT="-fno-plt"
NTHREADS="2"
OFFICE_IMPLEMENTATION="libreoffice"
OPENCL_PROFILE="ocl-icd"
OPENGL_PROFILE="xorg-x11"
PAGER="/usr/bin/less"
PAM_KWALLET5_LOGIN="/run/user/1000/kwallet5.socket"
PAPERSIZE="a4"
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
PHP_TARGETS="php7-2"
PKGDIR="/usr/portage/packages"
PLASMA_USE_QT_SCALING="1"
PORTAGE_ARCHLIST="alpha amd64 amd64-linux arm arm-linux arm64 arm64-linux hppa ia64 m68k m68k-mint mips ppc ppc-aix ppc-macos ppc64 ppc64-linux riscv s390 sh sparc sparc-solaris sparc64-solaris x64-cygwin x64-macos x64-solaris x86 x86-cygwin x86-linux x86-macos x86-solaris x86-winnt"
PORTAGE_BIN_PATH="/usr/lib/portage/python3.8"
PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary:log,warn,error,qa echo"
PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"
PORTAGE_FETCH_RESUME_MIN_SIZE="350K"
PORTAGE_GID="250"
PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key "${PORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}""
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_INTERNAL_CALLER="1"
PORTAGE_LOGDIR_CLEAN="find "${PORTAGE_LOGDIR}" -type f ! -name "summary.log*" -mtime +7 -delete"
PORTAGE_OVERRIDE_EPREFIX=""
PORTAGE_PYM_PATH="/usr/lib/python3.8/site-packages"
PORTAGE_PYTHONPATH="/usr/lib/python3.8/site-packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_RSYNC_RETRIES="-1"
PORTAGE_SYNC_STALE="30"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_VERBOSE="1"
PORTAGE_WORKDIR_MODE="0700"
PORTAGE_XATTR_EXCLUDE="btrfs.* security.evm security.ima        security.selinux system.nfs4_acl user.apache_handler    user.Beagle.* user.dublincore.* user.mime_encoding user.xdg.*"
POSTGRES_TARGETS="postgres10 postgres11"
PROFILEHOME=""
PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"
PWD="/home/sandy"
PYTHONDONTWRITEBYTECODE="1"
PYTHON_SINGLE_TARGET="python3_6"
PYTHON_TARGETS="python3_8 python3_7 python3_6 python2_7"
QT_IM_MODULE="fcitx"
QT_WAYLAND_FORCE_DPI="96"
RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""
RESUMECOMMAND_RSYNC="rsync -LtvP "${URI}" "${DISTDIR}/${FILE}""
RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; exec rsync --rsh=\"ssh \${port:+-p\${port}} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""
ROOT="/"
ROOTPATH="/usr/lib/llvm/9/bin:/usr/lib/llvm/8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin"
RPMDIR="/var/cache/rpm"
RUBY_TARGETS="*"
SAFER_FAST_MATH="-fno-signed-zeros -fno-trapping-math -fassociative-math -freciprocal-math -fno-math-errno -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fcx-limited-range -fexcess-precision=fast"
SAFER_UNSAFE_MATH_OPTS="-fno-signed-zeros -fno-trapping-math -fassociative-math -freciprocal-math"
SAFEST_FAST_MATH="-fno-math-errno -fno-trapping-math"
SEMINTERPOS="-fno-semantic-interposition"
SESSION_MANAGER="local/sandys-pavilion:@/tmp/.ICE-unix/3560,unix/sandys-pavilion:/tmp/.ICE-unix/3560"
SHELL="/bin/bash"
SHELL_SESSION_ID="47663106773346f889d0d1a241742e34"
SHLVL="2"
SSH_ASKPASS="/usr/bin/ksshaskpass"
SYMLINK_LIB="no"
SYSROOT="/"
TERM="xterm-256color"
TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1"
UNINSTALL_IGNORE="/lib/modules/* /var/run /var/lock"
USE="7zip X a52 aac acl acpi activities aio alsa amd64 amr amrenc androiddump apache2 appstream aribsub asm audiofile bash-completion berkdb bluetooth branding brightness-control browser-integration bugzilla bzip2 cairo caps cdda cddb cdio cdr cdrom cgroup-hybrid cholmod ciscodump cjk clamdtop cli color-management colord connection-sharing context corefonts cracklib crypt cups cxx cycles d3d9 dav1d dbus declarative designer dri dri3 drm dts dvd dvdr egl emboss encode eps examples exif extras fam farstream fcitx fcitx4 fdt ffmpeg fftw filecaps firewalld flac fluidsynth fontconfig fortran fpm frei0r ftp fuse gallium gbm gd gdbm gentoo-vm geolocation gif git gles gles1 gles2 gles3 glib gme gmp gnuefi gnuplot googledrive gpg gpm gps graphite grub gsl gstreamer gtk gtk3 guile guile2 handbook hardened heif hpn iconv icu id3tag imagemagick introspection ipv6 iso java joystick jpeg jpeg2k json kde kdenlive kipi kms kwallet latex layers lcms ldap lensfun libaom libass libcaca libdrm libinput libkms libnotify libtirpc libxml2 llvm lm-sensors lrz lto lz4 lzma lzo mad man matroska mem-scramble midi minizip mng modern-top mount mousepad mp3 mp4 mpeg mpi mtp multilib musepack mysql mysqli native-headset ncurses networkmanager nfs nghttp2 nginx nls nptl numpy ogg omxil openal opencl opencv openexr opengl openh264 openimageio openmp opus orientation osmesa pam pango pch pci pcre pdf pdfimport phonon pie plasma png policykit posix postproc postscript ppds prison projectm ptex pulseaudio python qalculate qml qt4 qt5 qtmedia quad quicktime rar raw readline realtime rubberband sasl sbc sbsms scanner scripts sdl seccomp semantic-desktop sha3 shout sid skins smi sound sox speex spell spice split-usr sqlite ssl startup-notification svg swaybar swaybg swaymsg swaynag symlink sync-plugin-portage system-llvm systemd systemtap taglib tcpd theora threads tiff tls-heartbeat tools touchpad truetype twolame udev udisks umfpack unicode unwind upower usb usbredir user-permissions user-session utils uuid v4l vaapi vala vamp vcd vdpau video vim-pager vim-syntax virgl virt-network vlc vorbis vpx vulkan vulkan-overlay wallpapers wayland webengine webp widgets wifi wireshark-plugins wxwidgets x264 x265 xattr xcb xcomposite xml xpm xv xvid yaml zlib zvbi" ABI_X86="32 64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 sse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs xop skinit wdt lwp fma4 tce nodeid_msr tbm perfctr_core perfctr_nb bpext ptsc mwaitx cpb hw_pstate ssbd vmmcall fsgsbase bmi1 avx2 smep bmi2 xsaveopt arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU WebAssembly" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_8 python3_7 python3_6 python2_7" RUBY_TARGETS="*" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USER="root"
USERLAND="GNU"
USE_EXPAND="ABI_MIPS ABI_PPC ABI_RISCV ABI_S390 ABI_X86 ADA_TARGET ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_PPC CPU_FLAGS_X86 CURL_SSL ELIBC ENLIGHTENMENT_MODULES FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LIRC_DEVICES LLVM_TARGETS MONKEYD_PLUGINS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL NGINX_MODULES_STREAM OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS POSTGRES_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"
USE_EXPAND_HIDDEN="ABI_MIPS ABI_PPC ABI_RISCV ABI_S390 CPU_FLAGS_ARM CPU_FLAGS_PPC ELIBC KERNEL USERLAND"
USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"
USE_EXPAND_UNPREFIXED="ARCH"
USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm64 hppa ia64 m68k m68k-mint mips ppc ppc64 ppc64-linux ppc-aix ppc-macos riscv s390 sh sparc sparc64-solaris sparc-solaris x64-cygwin x64-macos x64-solaris x86 x86-cygwin x86-fbsd x86-linux x86-macos x86-solaris x86-winnt"
USE_EXPAND_VALUES_ELIBC="AIX bionic Cygwin Darwin DragonFly FreeBSD glibc HPUX Interix mingw mintlib musl NetBSD OpenBSD SunOS uclibc Winnt"
USE_EXPAND_VALUES_KERNEL="AIX Darwin FreeBSD freemint HPUX linux NetBSD OpenBSD SunOS Winnt"
USE_EXPAND_VALUES_USERLAND="BSD GNU"
USE_ORDER="env:pkg:conf:defaults:pkginternal:features:repo:env.d"
VBOX_APP_HOME="/usr/lib64/virtualbox"
VIDEO_CARDS="amdgpu radeonsi radeon"
VISUAL="/usr/bin/vi"
WAYLAND_DISPLAY="wayland-0"
WINDOWID="1"
XCURSOR_SIZE="24"
XCURSOR_THEME="Breeze_Snow"
XDG_CONFIG_DIRS="/etc/xdg"
XDG_CURRENT_DESKTOP="KDE"
XDG_DATA_DIRS="/usr/local/share:/usr/share"
XDG_RUNTIME_DIR="/run/user/1000"
XDG_SEAT="seat0"
XDG_SEAT_PATH="/org/freedesktop/DisplayManager/Seat0"
XDG_SESSION_CLASS="user"
XDG_SESSION_DESKTOP="KDE"
XDG_SESSION_ID="1"
XDG_SESSION_PATH="/org/freedesktop/DisplayManager/Session0"
XDG_SESSION_TYPE="wayland"
XDG_VTNR="2"
XMODIFIERS="@im=fcitx"
XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

=================================================================
                        Package Settings
=================================================================

dev-libs/libsodium-1.0.18::gentoo was built with the following:
USE="asm urandom -minimal -static-libs" ABI_X86="32 (64) -x32" CPU_FLAGS_X86="aes sse4_1"
CFLAGS="-O3 -march=bdver4 -falign-functions=32 -falign-jumps=32:8:8 -falign-loops=32:25:8 -pipe -pthread -fira-hoist-pressure -fira-loop-pressure -fbranch-target-load-optimize -fweb -ftracer -fsched2-use-superblocks -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -fno-plt -flto=2 -fuse-linker-plugin -fuse-ld=bfd -fstack-protector-all -fstack-clash-protection -Wall -Wextra -Wl,-O1 -Wl,--as-needed -Wl,-O3 -Wl,-z,relro -Wl,-z,now"
CXXFLAGS="-O3 -march=bdver4 -falign-functions=32 -falign-jumps=32:8:8 -falign-loops=32:25:8 -pipe -pthread -fira-hoist-pressure -fira-loop-pressure -fbranch-target-load-optimize -fweb -ftracer -fsched2-use-superblocks -fgraphite-identity -floop-nest-optimize -fdevirtualize-at-ltrans -fipa-pta -fno-semantic-interposition -fno-plt -flto=2 -fuse-linker-plugin -fuse-ld=bfd -fstack-protector-all -fstack-clash-protection -Wall -Wextra -Wl,-O1 -Wl,--as-needed -Wl,-O3 -Wl,-z,relro -Wl,-z,now"

By the way, half of those non-GentooLTO flags are hardening flags and the other half some potential optimization flags with which I have been messing around (of course, all of them follow the principle outlined in the README, as far as I know at least).

Edit three

I added a second apostrophy for the sake of the output not being all blue. I wish that markdown could properly support shell output.

Jannik2099 commented 4 years ago

Yeah, arm64 is usually called aarch64, but the Gentoo keyword is arm64 so I went with that. 32-bit arm is just called... arm.

With the asm use flag, lto fails on arm aswell. So it seems asm + lto is broken on both arm and arm64 here.

InBetweenNames commented 4 years ago

Confirmed!

InBetweenNames commented 4 years ago

It would be good to add this as a conditional workaround for (arm || arm64) && asm