Created attachment 577338 [details] flags_test-0.ebuild QA check for respectation of LDFLAGS reports misformatted false positives for *.o files with __gentoo_check_ldflags__ symbol. Usually this problem would be seen for *.o files created by linker with -r option when LDFLAGS is respected. Output from attached ebuild: """ * QA Notice: Files built without respecting CFLAGS have been detected * Please include the following list of files in your report: * /usr/bin/k * /usr/bin/l * /usr/lib64/g.so * /usr/lib64/h.so * QA Notice: Files built without respecting LDFLAGS have been detected * Please include the following list of files in your report: * / usr/lib64/e.o * / usr/lib64/f.o * /usr/lib64/g.so * /usr/lib64/h.so strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version /usr/lib64/a.o /usr/lib64/b.o /usr/lib64/c.o /usr/lib64/d.o /usr/lib64/e.o /usr/lib64/f.o /usr/lib64/g.so /usr/lib64/h.so /usr/lib64/i.so /usr/lib64/j.so /usr/bin/k /usr/bin/l /usr/bin/m /usr/bin/n """ Misformatting comes from usage of `comm` tool in bin/install-qa-check.d/10ignored-flags: f=$(LC_ALL=C comm -3 <(scanelf -qyRF '#k%p' -k .dynsym "${ED%/}/" | LC_ALL=C sort) \ <(scanelf -qyRF '#s%p' -s __gentoo_check_ldflags__ "${ED%/}/" | LC_ALL=C sort)) From `comm --help`: """ With no options, produce three-column output. Column one contains lines unique to FILE1, column two contains lines unique to FILE2, and column three contains lines common to both files. -1 suppress column 1 (lines unique to FILE1) -2 suppress column 2 (lines unique to FILE2) -3 suppress column 3 (lines that appear in both files) """
Actually output from attached ebuild, after stripping __gentoo_check_ldflags__ from Scrt1.o (bug #686282): """ * QA Notice: Files built without respecting CFLAGS have been detected * Please include the following list of files in your report: * /usr/bin/k * /usr/bin/l * /usr/lib64/g.so * /usr/lib64/h.so * QA Notice: Files built without respecting LDFLAGS have been detected * Please include the following list of files in your report: * /usr/bin/k * /usr/bin/l * / usr/lib64/e.o * / usr/lib64/f.o * /usr/lib64/g.so * /usr/lib64/h.so strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version /usr/lib64/a.o /usr/lib64/b.o /usr/lib64/c.o /usr/lib64/d.o /usr/lib64/e.o /usr/lib64/f.o /usr/lib64/g.so /usr/lib64/h.so /usr/lib64/i.so /usr/lib64/j.so /usr/bin/k /usr/bin/l /usr/bin/m /usr/bin/n """
Created attachment 577340 [details, diff] Patch
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=bdde97ba14e85ea2ca6b128fddca710081334b55 commit bdde97ba14e85ea2ca6b128fddca710081334b55 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2019-05-20 01:32:25 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2019-05-20 04:36:32 +0000 install-qa-check.d/10ignored-flags: fix false positive Do not report not respecting LDFLAGS for *.o files with __gentoo_check_ldflags__ symbol. Bug: https://bugs.gentoo.org/686356 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Zac Medico <zmedico@gentoo.org> bin/install-qa-check.d/10ignored-flags | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
(In reply to Larry the Git Cow from comment #3) This patch also fixes false positives for static binaries.