This is an auto-filed bug because app-emulation/qemu does not respect LDFLAGS. The issue was originally discovered on amd64, but it may be reproducible on other arches as well. If you think that a different summary clarifies the issue better, feel free to change it. Attached build log and emerge --info. NOTE: To reproduce this issue you may want to set LDFLAGS="${LDFLAGS} -Wl,--defsym=__gentoo_check_ldflags__=0". If this is not something about c/c++ context you may want to see this bug as an hint to hide the QA warning (with QA_FLAGS_IGNORED) where is not possible to respect LDFLAGS.
Created attachment 643382 [details] build.log.bz2 build log and emerge --info
The relevant build log snippet is: """ * QA Notice: Files built without respecting LDFLAGS have been detected * Please include the following list of files in your report: * /usr/bin/elf2dmp * /usr/bin/ivshmem-client * /usr/bin/ivshmem-server * /usr/bin/qemu-edid * /usr/bin/qemu-img * /usr/bin/qemu-io * /usr/bin/qemu-keymap * /usr/bin/qemu-nbd * /usr/bin/qemu-pr-helper * /usr/bin/qemu-storage-daemon * /usr/bin/qemu-system-x86_64 * /usr/libexec/qemu-bridge-helper * /usr/libexec/virtiofsd """ Looking at a elf2dmp: """ x86_64-pc-linux-gnu-g++ -O2 -pipe -march=native -frecord-gcc-switches -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -fstack-protector-strong -o elf2dmp contrib/elf2dmp/main.o contrib/elf2dmp/addrspace.o contrib/elf2dmp/download.o contrib/elf2dmp/pdb.o contrib/elf2dmp/qemu_elf.o -lcurl -lm -lz -lgthread-2.0 -pthread -lglib-2.0 -lrt -lz -lutil -lcap-ng """ Original flags areLDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0". Looks like they were not passed at all.
Also affects app-emulation/qemu-5.1.0: QA Notice: Files built without respecting LDFLAGS have been detected Please include the following list of files in your report: /usr/bin/elf2dmp /usr/bin/ivshmem-client /usr/bin/ivshmem-server /usr/bin/qemu-edid /usr/bin/qemu-img /usr/bin/qemu-io /usr/bin/qemu-keymap /usr/bin/qemu-nbd /usr/bin/qemu-storage-daemon /usr/bin/qemu-system-x86_64 /usr/bin/qemu-x86_64 /usr/libexec/qemu-bridge-helper /usr/libexec/qemu-pr-helper /usr/libexec/virtiofsd
Seems fixed in more recent versions