Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 786177 - sys-devel/gcc-11.1.0: QA Notice: Files built without respecting LDFLAGS have been detected
Summary: sys-devel/gcc-11.1.0: QA Notice: Files built without respecting LDFLAGS have ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ldflags
  Show dependency tree
 
Reported: 2021-04-27 21:59 UTC by Conrad Kostecki
Modified: 2021-06-16 20:10 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log.gz (build.log.gz,955.07 KB, application/gzip)
2021-04-28 10:30 UTC, Conrad Kostecki
Details
build.log.gz (LANG=C USE="-lto -pgo -vtv") (build.log.gz,759.77 KB, application/gzip)
2021-04-28 13:10 UTC, Conrad Kostecki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Kostecki gentoo-dev 2021-04-27 21:59:45 UTC
* QA Notice: Files built without respecting LDFLAGS have been detected
 *  Please include the following list of files in your report:
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libasan.so.6.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libatomic.so.1.2.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libgcc_s.so.1
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libgfortran.so.5.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libgomp.so.1.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libitm.so.1.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libquadmath.so.0.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libstdc++.so.6.0.29
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libubsan.so.1.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/32/libvtv.so.0.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libasan.so.6.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libatomic.so.1.2.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libgcc_s.so.1
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libgccjit.so.0.0.1
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libgfortran.so.5.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libgomp.so.1.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libitm.so.1.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/liblsan.so.0.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libquadmath.so.0.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libstdc++.so.6.0.29
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libtsan.so.0.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libubsan.so.1.0.0
 * /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/libvtv.so.0.0.0
 * /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/cc1
 * /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/cc1plus
 * /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/collect2
 * /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/f951
 * /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/g++-mapper-server
 * /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/liblto_plugin.so
 * /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/lto-wrapper
 * /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/lto1
 * /usr/libexec/gcc/x86_64-pc-linux-gnu/11.1.0/plugin/gengtype
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/gcc-ar
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/gcc-nm
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/gcc-ranlib
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/gcov-dump
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/gcov-tool
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/lto-dump
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/x86_64-pc-linux-gnu-c++
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/x86_64-pc-linux-gnu-cpp
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/x86_64-pc-linux-gnu-g++
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/x86_64-pc-linux-gnu-gcc
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/x86_64-pc-linux-gnu-gcc-ar
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/x86_64-pc-linux-gnu-gcc-nm
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/x86_64-pc-linux-gnu-gcc-ranlib
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/x86_64-pc-linux-gnu-gcov
 * /usr/x86_64-pc-linux-gnu/gcc-bin/11.1.0/x86_64-pc-linux-gnu-gfortran
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-27 22:10:41 UTC
Does not happen here. Do you have `build.log` and `emerge --info gcc`?
Comment 2 Conrad Kostecki gentoo-dev 2021-04-27 22:25:30 UTC
Portage 3.0.18 (python 3.9.2-final-0, default/linux/amd64/17.1, gcc-10.2.0, glibc-2.33, 5.11.11-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.11.11-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E3-1275_v6_@_3.80GHz-with-glibc2.33
KiB Mem:    65622404 total,  53123772 free
KiB Swap:   67633148 total,  67633148 free
Timestamp of repository gentoo: Tue, 27 Apr 2021 19:15:01 +0000
Head commit of repository gentoo: ed778cb78fc7ac8a709fee60a246f3b16dc2e9cb
sh bash 5.1_p4
ld GNU ld (Gentoo 2.35.2 p1) 2.35.2
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
ccache version 4.2.1 [enabled]
app-shells/bash:          5.1_p4::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          2.7.18_p8::gentoo, 3.8.9::gentoo, 3.9.2_p1::gentoo
dev-lang/rust:            1.51.0::gentoo
dev-util/ccache:          4.2.1::gentoo
dev-util/cmake:           3.20.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r1::gentoo
sys-apps/sandbox:         2.22::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.35.2::gentoo
sys-devel/gcc:            10.2.0-r5::gentoo, 11.1.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: --compress --exclude-from=/etc/portage/rsync_excludes --new-compress
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

bl4ckb0x
    location: /usr/local/portage
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/teamspeak3-server/ts3server.ini /etc/teamspeak3-server/ts3server_mariadb.ini /etc/teamspeak3-server/tsdns_settings.ini /usr/share/gnupg/qualified.txt"
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.4/ext-active/ /etc/php/apache2-php8.0/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cgi-php8.0/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/php/cli-php8.0/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"
CXXFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=n --quiet-build=n --with-bdeps=y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance ccache 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 qa-unresolved-soname-deps sandbox sfperms sign strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -mfpmath=sse,387 -mtune=intel -O3 -frecord-gcc-switches -fomit-frame-pointer -malign-data=abi -mtls-dialect=gnu2 -pipe"
GENTOO_MIRRORS="https://packages.hetzner.com/gentoo/"
INSTALL_MASK="/etc/systemd/* /etc/xinetd.d/* /usr/lib/systemd/*"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-O1 -Wl,--sort-common -Wl,-z,now"
LINGUAS="de de_DE"
MAKEOPTS="-j9 -l8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_BUNZIP2_COMMAND="pbunzip2"
PORTAGE_BZIP2_COMMAND="pbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--compress --exclude-from=/etc/portage/rsync_excludes --new-compress"
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_TMPDIR="/var/tmp"
USE="X aalib accessibility acl alsa amd64 berkdb bzip2 cairo calendar caps cddb cgi cjk colord cracklib crypt cups curl cvs cxx dbus dga djvu dri dvb elogind encode exif fbcon ffmpeg fftw filecaps flac fontconfig fortran ftp gd gdbm geolocation gif git gmp gnutls gphoto2 gpm graphviz gsm iconv icu idn ieee1394 imap imlib inotify introspection ipv6 java javascript jbig jemalloc jit joystick jpeg jpeg2k kerberos latex lcms ldap libass libcaca libglvnd libnotify libsamplerate lm-sensors lua luajit lz4 lzma lzo maildir mbox mhash mikmod milter mmap modplug motif mp3 mysql mysqli ncurses nls nntp offensive ogg openal openexr opengl openmp opus orc oss pam pcre pdf perl pie png policykit posix postgres postscript pulseaudio python raw readline rtmp samba sasl scanner sdl seccomp session slang smartcard sndfile snmp soap sockets sound sox speex spell split-usr sqlite ssl startup-notification subversion suid svg symlink syslog tcl tcpd theora threads tiff truetype udev unicode usb v4l vaapi vdpau verify-sig vhosts vim-syntax vnc vorbis wavpack wayland webkit webp wmf x264 xattr xcb xcomposite xface xft xinetd xml xmpp xpm xscreensaver xv xvid zeroconf zlib zsh-completion zstd" ABI_X86="32 64" COLLECTD_PLUGINS="apcups battery buddyinfo capabilities cgroups check_uptime connectivity conntrack contextswitch cpu cpufreq cpusleep df disk dns entropy ethstat exec fhcount filecount hddtemp hugepages interface ipc ipmi iptables irq load java mcelog md memory mysql netlink nfs nginx ntpd openldap openvpn pcie_errors ping postgresql processes procevent protocols rrdcached sensors serial smart snmp swap syslog tcpconns thermal turbostat unixsock uptime users wireless" CPU_FLAGS_X86="aes avx avx2 rdrand mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="garmin garmintxt nmea0183" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de de_DE" LCD_DEVICES="cfontzpacket crystalfontz glcd2usb hd44780 lcd2usb" LUA_SINGLE_TARGET="lua5-3" LUA_TARGETS="lua5-3 lua5-4" NGINX_MODULES_HTTP="access addition auth_basic autoindex brotli browser charset fancyindex fastcgi geo geoip geoip2 gunzip gzip gzip_static headers_more image_filter javascript limit_conn limit_req map metrics proxy realip referer rewrite secure_link sticky stub_status upload_progress upstream_keepalive vhost_traffic_status xslt" NGINX_MODULES_MAIL="imap pop3 smtp" NGINX_MODULES_STREAM="access geo geoip geoip2 javascript limit_conn map realip return ssl_preread" PHP_TARGETS="php7-4" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8 python3_9" RUBY_TARGETS="ruby27 ruby30" SANE_BACKENDS="hp net" USERLAND="GNU" VIDEO_CARDS="i965 intel iris"
Unset:  CC, CPPFLAGS, CTARGET, CXX, PORTAGE_BINHOST, RUSTFLAGS

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

sys-devel/gcc-10.2.0-r5::gentoo was built with the following:
USE="(cxx) fortran graphite jit lto (multilib) nls nptl openmp pgo (pie) sanitize ssp vtv zstd (-ada) -d -debug -doc (-fixed-point) -go (-hardened) (-libssp) -objc -objc++ -objc-gc -pch -systemtap -test -vanilla" ABI_X86="(64)"
CFLAGS="-march=native -mtune=intel -pipe -O2"
CXXFLAGS="-march=native -mtune=intel -pipe -O2"
FEATURES="ebuild-locks network-sandbox sandbox merge-sync unmerge-logs distlocks sfperms parallel-fetch strict strict-keepdir assume-digests usersync ccache usersandbox protect-owned ipc-sandbox pid-sandbox news sign binpkg-dostrip qa-unresolved-soname-deps binpkg-logs userpriv multilib-strict unmerge-orphans userfetch xattr fixlafiles preserve-libs unknown-features-warn config-protect-if-modified binpkg-docompress"


sys-devel/gcc-11.1.0::gentoo was built with the following:
USE="(cxx) fortran graphite jit lto (multilib) nls nptl openmp pgo (pie) sanitize ssp vtv zstd (-ada) -custom-cflags -d -debug -doc (-fixed-point) -go (-hardened) (-libssp) -objc -objc++ -objc-gc -pch -systemtap -test -valgrind -vanilla" ABI_X86="(64)"
CFLAGS="-march=native -mtune=intel -pipe -O2"
CXXFLAGS="-march=native -mtune=intel -pipe -O2"
FEATURES="userpriv protect-owned xattr ccache news strict assume-digests fixlafiles binpkg-dostrip parallel-fetch distlocks binpkg-logs qa-unresolved-soname-deps usersandbox usersync preserve-libs pid-sandbox merge-sync ebuild-locks unknown-features-warn network-sandbox binpkg-docompress ipc-sandbox sign binpkg-multi-instance multilib-strict sandbox config-protect-if-modified strict-keepdir unmerge-logs unmerge-orphans userfetch sfperms"
Comment 3 Conrad Kostecki gentoo-dev 2021-04-27 22:26:00 UTC
I don't have the build.log anymore, I will rebuild GCC, this will take 2 hours :-)
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-27 22:55:49 UTC
(In reply to Conrad Kostecki from comment #2)
> LANG="de_DE.UTF-8"
> LC_ALL="de_DE.UTF-8"
> sys-devel/gcc-11.1.0::gentoo was built with the following:
> USE="(cxx) fortran graphite jit lto (multilib) nls nptl openmp pgo (pie)
> sanitize ssp vtv zstd (-ada) -custom-cflags -d -debug -doc (-fixed-point)
> -go (-hardened) (-libssp) -objc -objc++ -objc-gc -pch -systemtap -test
> -valgrind -vanilla" ABI_X86="(64)"

The environment looks mostly default (unless it hides package.env hacks). I'd suggest trying to narrow down the specific USE that triggers (or maybe you still get the same warnings without any heavyweight options).

The interesting dimensions are:
- USE=-vtv
- USE=-lto
- USE=-pgo
- LANG=C

I'd suggest starting with `LANG=C USE="-lto -pgo -vtv"` (should be fast to build) and add on top if it happens to remove the warning.
Comment 5 jospezial 2021-04-28 02:18:19 UTC
(In reply to Sergei Trofimovich from comment #1)
> Does not happen here. Do you have `build.log` and `emerge --info gcc`?

Does not happen here too. No QA Notice in /var/tmp/portage/sys-devel/gcc-11.1.0/temp/build.log


FEATURES="keepwork -ccache" emerge -v1 gcc ;eject -T
 * WARNING: The FEATURES variable contains one or more values that
 * should be disabled under normal circumstances: keepwork

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  NS    ] sys-devel/gcc-11.1.0:11::gentoo [10.3.0:10::gentoo] USE="(cxx) fortran graphite jit (multilib) nls nptl openmp pch (pie) sanitize ssp zstd (-ada) -custom-cflags% -d -debug -doc (-fixed-point) -go (-hardened) (-libssp) -lto -objc -objc++ -objc-gc -pgo -systemtap -test -valgrind% -vanilla -vtv" 0 KiB

emerge --info gcc
Portage 3.0.18 (python 3.9.4-final-0, default/linux/amd64/17.1, gcc-10.3.0, glibc-2.33, 5.12.0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.12.0-x86_64-AMD_Athlon-tm-_II_X2_240_Processor-with-glibc2.33
KiB Mem:     4026896 total,   2769628 free
KiB Swap:   11010040 total,  10425516 free
Timestamp of repository poly-c: Tue, 27 Apr 2021 13:20:02 +0000
Head commit of repository poly-c: b0a370cb25b37ba87482a4019de131cd3dea2c73

Head commit of repository gentoo: 7b96174a18e36fc491a5c3b9f19e18997220d9c3

Timestamp of repository FireBurn: Sat, 17 Apr 2021 19:05:06 +0000
Head commit of repository FireBurn: 28b79ed374bf82140e1491e9cbd37aea482bde1f

Timestamp of repository gamerlay: Mon, 12 Apr 2021 10:36:00 +0000
Head commit of repository gamerlay: 4d1bd5a38581de160b7f4b778f74d6108bef7d9d

Timestamp of repository java: Mon, 12 Apr 2021 12:34:59 +0000
Head commit of repository java: 073838adb9eec1833ce7f1651a5530f1a2faaf7a

Head commit of repository kde: 4832dff0676566d0127dfbc3f8a8b296b1e387ba

Timestamp of repository pg_overlay: Tue, 27 Apr 2021 12:05:11 +0000
Head commit of repository pg_overlay: 81936d3645468ef71fb0a0ce20b97c49860da624

Timestamp of repository qt: Sun, 25 Apr 2021 21:09:19 +0000
Head commit of repository qt: 14431621dab94b7bccf0926784e5a837506c7372

Timestamp of repository seden: Mon, 12 Apr 2021 10:36:10 +0000
Head commit of repository seden: 2dd2eb190f828e791abdffa3230a7f1033607f2a

Timestamp of repository stefantalpalaru: Fri, 23 Apr 2021 21:50:04 +0000
Head commit of repository stefantalpalaru: 05012574662f3075d525b57f18005b066684b683

Timestamp of repository wine: Sat, 24 Apr 2021 21:05:00 +0000
Head commit of repository wine: dd5303b19926a95a7f0fd7dfd394c08a04a5e400

sh bash 5.1_p4
ld GNU ld (Gentoo 2.36.1 p3) 2.36.1
ccache version 4.2.1 [enabled]
app-shells/bash:          5.1_p4::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.32.1::gentoo
dev-lang/python:          3.9.4::gentoo
dev-lang/rust-bin:        1.51.0::gentoo
dev-util/ccache:          4.2.1::gentoo
dev-util/cmake:           3.20.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7-r2::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.23::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.36.1-r1::gentoo
sys-devel/gcc:            10.3.0::gentoo, 11.1.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.12::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33::gentoo
Repositories:

poly-c
    location: /var/db/repos/poly-c
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/poly-c.git
    masters: gentoo
    priority: -1001

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git
    priority: -1000

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

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

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

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/proj/kde.git
    masters: gentoo

overlay_jl
    location: /usr/local/portage
    masters: gentoo
    priority: 0

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

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

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

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

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-write=y --keep-going --quiet-build=y --verbose-conflicts"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -mtune=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance ccache 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 qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -mtune=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
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_TMPDIR="/var/tmp"
USE="64bit X Xaw3d a52 aac aacplus aacs aalib ace acl acpi activefilter admin aften alsa ambisonics amd64 ap apm apng archive arping audacious audiofile automount avif bazaar bdplus binary-drivers bluetooth bluray boost btrfs bzip2 cairo ccache cdda cddb cdio cdr cdrom charconv chm chroot cjk clang cli client colordiff colorpicker colors compress corefonts cpio cpufreq_bench cpuload crypt css cue cups curl custom-modes d3d9 dav1d dbus declarative dga dhcp dom doom doomsday dri dri3 drm dts dump dv dvb dvd dvdnav eap eap-sim eap-tls ebook egl elogind encode enscript epub equalizer exif extensions extras faac faad farstream fat fax fbcon fdformat fdk ffmpeg fftw firefox flac fluidsynth fontconfig foomatic foomaticdb fortran freedoom ftp fuse gadu gd gegl geoip gif git glamor gpg gphoto2 graphite gstreamer gtk gtk3 gui gzip haptic hddtemp hdf hdf5 heretic hexen hid highlight history hpcups hpijs http http2 hwdb iconv icu id3tag idn imagemagick initramfs inotify introspection ipc ipod ipv6 jack java javafx jbootstrap jit jpeg jpeg2k kde kdenlive keyfinder ladspa lame lcms legacy-systray lensfun libaom libass libcanberra libdrm libglvnd libinput libkms libmpv libnotify librtmp libsamplerate libssh2 libtirpc libv4l libwww lightdm live lm-sensors lm_sensors logrotate lua lv2 lximage lz4 lzma lzo mad magic man matroska md5sum meanwhile melt mercurial metalink midi mikmod mime minizip mixer mjpeg mmap mms mng mobi mod modern-top modplug mono mount mozilla mp3 mp4 mpeg mpeg2 mplayer mtp multilib multimedia multislot musepack musicbrainz nano-syntax ncat ncurses ndiff network networkmonitor nls nmap-update normalize nowlistening nping nptl ntfs ntfsprogs ntp nvidia nvram obex ocr odbc odf ogg ogm openal opencl opengl openh264 openmp openssl opus osdmenu otr p2p pam pango panorama parse-clocks pcap pci pcre pcre16 pdf pdfimport phonon pipes pkcs11 plasma plugins pm-utils png policykit postproc postscript powermanagement ppds printsupport privacy projectm pulseaudio pvr python qalculate qml qrcode qt5 qtkeychain quicktime radio rar raw readline recording reiser4 reiserfs remote-access replaygain rtc rtmp rubberband sbsms scanner screensaver scripttools sdl seccomp secure-delete sensors serial serialport sftp sha512 shorten shout skins slang smi sndfile sockets sound soundtouch source-highlight speech speex spell split-usr sql sqlite sqlite3 squashfs ssh ssl staging startup-notification statistics statusnotifier stk stream subtitles sudo svg symlink sync-plugin-portage syslog sysstat system-ffmpeg system-harfbuzz system-icu system-jpeg system-jsoncpp system-libvpx system-sqlite szip taglib tcpd text texteffect tftp tftpd themes theora threads thumbnail tiff timidity tracepath traceroute translator truetype twolame udev udf udisks unicode update_drivedb upower urlpicpreview usb utils v4l v4l2 vaapi vala vamp vdpau vector-icons video videos virtualbox vkd3d vnc vorbis vpx vroot vst vulkan vulkaninfo wad wav wavpack wayland webgl webp webpresence widgets winbind winpopup wmf worldclock wps wxwidgets x264 x265 xattr xcb xcomposite xfs xine xinerama xinetd xkb xml xmp xorg xosd xpm xrandr xscreensaver xv xvid yahoo zenmap zip zlib zstd zvbi" ABI_X86="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="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" CURL_SSL="openssl" 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" INPUT_DEVICES="libinput" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-2" LUA_TARGETS="lua5-2 lua5-3 lua5-4 luajit" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="radeon amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS

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

sys-devel/gcc-10.3.0::gentoo was built with the following:
USE="(cxx) fortran graphite jit (multilib) nls nptl openmp pch (pie) sanitize ssp zstd (-ada) -d -debug -doc (-fixed-point) -go (-hardened) (-libssp) -lto -objc -objc++ -objc-gc -pgo -systemtap -test -vanilla -vtv" ABI_X86="(64)"
CFLAGS="-march=native -mtune=native -pipe -O2"
CXXFLAGS="-march=native -mtune=native -pipe -O2"
FEATURES="qa-unresolved-soname-deps preserve-libs binpkg-docompress ipc-sandbox protect-owned config-protect-if-modified unknown-features-warn binpkg-logs userfetch network-sandbox strict unmerge-orphans assume-digests pid-sandbox multilib-strict xattr sandbox usersandbox userpriv parallel-fetch distlocks merge-sync binpkg-multi-instance ccache ebuild-locks fixlafiles sfperms binpkg-dostrip usersync unmerge-logs news"


sys-devel/gcc-11.1.0::gentoo was built with the following:
USE="(cxx) fortran graphite jit (multilib) nls nptl openmp pch (pie) sanitize ssp zstd (-ada) -custom-cflags -d -debug -doc (-fixed-point) -go (-hardened) (-libssp) -lto -objc -objc++ -objc-gc -pgo -systemtap -test -valgrind -vanilla -vtv" ABI_X86="(64)"
CFLAGS="-march=native -mtune=native -pipe -O2"
CXXFLAGS="-march=native -mtune=native -pipe -O2"
FEATURES="sfperms binpkg-logs merge-sync assume-digests binpkg-dostrip unknown-features-warn preserve-libs keepwork pid-sandbox userfetch ipc-sandbox protect-owned userpriv news unmerge-orphans usersync xattr multilib-strict binpkg-multi-instance config-protect-if-modified qa-unresolved-soname-deps usersandbox strict sandbox unmerge-logs ebuild-locks parallel-fetch fixlafiles network-sandbox binpkg-docompress distlocks"
Comment 6 Conrad Kostecki gentoo-dev 2021-04-28 10:30:31 UTC
(In reply to Sergei Trofimovich from comment #4)
> The environment looks mostly default (unless it hides package.env hacks).

Nope, no package.env entries for GCC.

> I'd suggest trying to narrow down the specific USE that triggers (or maybe
> you still get the same warnings without any heavyweight options).
> 
> The interesting dimensions are:
> - USE=-vtv
> - USE=-lto
> - USE=-pgo
> - LANG=C
> 
> I'd suggest starting with `LANG=C USE="-lto -pgo -vtv"` (should be fast to
> build) and add on top if it happens to remove the warning.

Ok, will will try this next.

----

I have finished building GCC, and attaching my build.log, which warns about LDFLAGS. Note: This is the full build, as initially reported. Will try next with disabling use flags, as proposed.
Comment 7 Conrad Kostecki gentoo-dev 2021-04-28 10:30:50 UTC
Created attachment 703197 [details]
build.log.gz
Comment 8 Conrad Kostecki gentoo-dev 2021-04-28 13:10:20 UTC
Created attachment 703215 [details]
build.log.gz (LANG=C USE="-lto -pgo -vtv")

(In reply to Sergei Trofimovich from comment #4)
> I'd suggest starting with `LANG=C USE="-lto -pgo -vtv"` (should be fast to
> build) and add on top if it happens to remove the warning.

I tried this combination and I am still getting the QA warning about LDFLAGS.
Comment 9 Conrad Kostecki gentoo-dev 2021-04-28 18:47:48 UTC
I disabled more use flags (-sanitize -ssp -zstd), still getting it.
Comment 10 Sam James archtester gentoo-dev Security 2021-04-28 18:55:56 UTC
Had it here too but was too late to grab the full log. I'll rebuild...
Comment 11 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-28 23:14:10 UTC
(In reply to Conrad Kostecki from comment #8)
> Created attachment 703215 [details]
> build.log.gz (LANG=C USE="-lto -pgo -vtv")
> 
> (In reply to Sergei Trofimovich from comment #4)
> > I'd suggest starting with `LANG=C USE="-lto -pgo -vtv"` (should be fast to
> > build) and add on top if it happens to remove the warning.
> 
> I tried this combination and I am still getting the QA warning about LDFLAGS.
...
> make[2]: Verzeichnis „/tmp/portage/sys-devel/gcc-11.1.0/work/build/x86_64-pc-linux-gnu/libatomic“ wird verlassen

Not sure LANG=C applied. Maybe it's a minor annoyance. Or maybe we break sorting somewhere.

I also noticed you have FEATURES=keepwork in all your build.logs. Did initial warning also came from FEATURES=keepwork build? It interferes a lot with initial state.
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-29 06:31:29 UTC
Reproduced locally with:

# USE="-* abi_x86_64 amd64 cxx elibc_glibc fortran graphite jit kernel_linux multilib nls nptl openmp pie sanitize ssp userland_GNU zstd" CFLAGS="-march=native -mtune=intel -pipe -O2" CXX
FLAGS="-march=native -mtune=intel -pipe -O2" LDFLAGS="-Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-O1 -Wl,--sort-common -Wl,-z,now" emerge -v1 sys-devel/gcc

Investigating.
Comment 13 Conrad Kostecki gentoo-dev 2021-04-29 08:00:47 UTC
(In reply to Sergei Trofimovich from comment #11)
> I also noticed you have FEATURES=keepwork in all your build.logs. Did
> initial warning also came from FEATURES=keepwork build? It interferes a lot
> with initial state.

I am always deleting all stuff in /var/tmp/portage, before running emerge with keepwork, in order to make sure, nothing will collide, as otherwise build.log is gone.
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-29 18:02:49 UTC
(In reply to Conrad Kostecki from comment #13)
> (In reply to Sergei Trofimovich from comment #11)
> > I also noticed you have FEATURES=keepwork in all your build.logs. Did
> > initial warning also came from FEATURES=keepwork build? It interferes a lot
> > with initial state.
> 
> I am always deleting all stuff in /var/tmp/portage, before running emerge
> with keepwork, in order to make sure, nothing will collide, as otherwise
> build.log is gone.

Aha, that's good to know. I'll treat the build.log as built from reasonably clean state.
Comment 15 Sergei Trofimovich (RETIRED) gentoo-dev 2021-04-29 18:54:11 UTC
Yeah, looks like we really don't pass $LDFLAGS to many libraries. I think that's unexpected.
Comment 16 Marco Scardovi (scardracs) 2021-06-16 20:10:57 UTC
I have same warnings on arm64