Since Portage commit 730a867c1050937c82c775d7678a616c7b9546e6 (https://gitweb.gentoo.org/proj/portage.git/commit/?id=730a867c1050937c82c775d7678a616c7b9546e6) over 17 months ago (released in Portage 2.3.12), detection of not respecting LDFLAGS is enabled when LDFLAGS contains "--defsym=__gentoo_check_ldflags__", not "--hash-style=gnu". "developer" amd64 and x86 profiles still use the old method: $ grep -r -A2 -- --hash-style=gnu profiles profiles/default/linux/amd64/13.0/developer/make.defaults:# Adding -Wl,--hash-style=gnu to default LDFLAGS for linux/amd64 dev profile profiles/default/linux/amd64/13.0/developer/make.defaults-# This will help developers track packages, that don't respect LDFLAGS, down profiles/default/linux/amd64/13.0/developer/make.defaults-# more effectively profiles/default/linux/amd64/13.0/developer/make.defaults:LDFLAGS="-Wl,--hash-style=gnu ${LDFLAGS}" -- profiles/default/linux/amd64/17.0/developer/make.defaults:# Adding -Wl,--hash-style=gnu to default LDFLAGS for linux/amd64 dev profile profiles/default/linux/amd64/17.0/developer/make.defaults-# This will help developers track packages, that don't respect LDFLAGS, down profiles/default/linux/amd64/17.0/developer/make.defaults-# more effectively profiles/default/linux/amd64/17.0/developer/make.defaults:LDFLAGS="-Wl,--hash-style=gnu ${LDFLAGS}" -- profiles/default/linux/amd64/17.1/developer/make.defaults:# Adding -Wl,--hash-style=gnu to default LDFLAGS for linux/amd64 dev profile profiles/default/linux/amd64/17.1/developer/make.defaults-# This will help developers track packages, that don't respect LDFLAGS, down profiles/default/linux/amd64/17.1/developer/make.defaults-# more effectively profiles/default/linux/amd64/17.1/developer/make.defaults:LDFLAGS="-Wl,--hash-style=gnu ${LDFLAGS}" -- profiles/default/linux/x86/13.0/developer/make.defaults:# Adding -Wl,--hash-style=gnu to default LDFLAGS for linux/x86 dev profile profiles/default/linux/x86/13.0/developer/make.defaults-# This will help developers track down packages, that don't respect LDFLAGS, profiles/default/linux/x86/13.0/developer/make.defaults-# more easily profiles/default/linux/x86/13.0/developer/make.defaults:LDFLAGS="-Wl,--hash-style=gnu ${LDFLAGS}" -- profiles/default/linux/x86/17.0/developer/make.defaults:# Adding -Wl,--hash-style=gnu to default LDFLAGS for linux/x86 dev profile profiles/default/linux/x86/17.0/developer/make.defaults-# This will help developers track down packages, that don't respect LDFLAGS, profiles/default/linux/x86/17.0/developer/make.defaults-# more easily profiles/default/linux/x86/17.0/developer/make.defaults:LDFLAGS="-Wl,--hash-style=gnu ${LDFLAGS}" -Wl,--defsym=__gentoo_check_ldflags__=0 should now be used.
Created attachment 569576 [details, diff] Patch (Original code was added in profiles/default/linux/amd64/10.0/developer/make.defaults on 2010-08-14 and in profiles/default/linux/x86/10.0/developer/make.defaults on 2010-08-15, so copyright years 2010-2019 are appropriate.)
AMD64 project and X86 project: Please also update your wiki pages which still mention --hash-style=gnu: https://wiki.gentoo.org/wiki/Project:AMD64_Arch_Testers https://wiki.gentoo.org/wiki/Project:X86/Arch_Testers_FAQ
Since what binutils revision do we have -Wl,--hash-style=gnu as the default? As in, since when sysv classic ELF ".hash" sections aren't emitted anymore?
Vapier in bug #455232 said that it is since binutils-2.23.51.0.9.
(In reply to Mart Raudsepp from comment #3) > Since what binutils revision do we have -Wl,--hash-style=gnu as the default? > As in, since when sysv classic ELF ".hash" sections aren't emitted anymore? (In reply to Arfrever Frehtes Taifersar Arahesis from comment #4) > Vapier in bug #455232 said that it is since binutils-2.23.51.0.9. I suppose that's good enough. Mart, do you agree?
I agree that it can be removed now. But the point of its existence was for detecting packages that don't honor CFLAGS/LDFLAGS, I believe. If we want to keep that behaviour, we should add something in its place. I think "-frecord-gcc-switches" is that nowadays for CFLAGS/CXXFLAGS? I mean what portage QA checks actually end up looking at and warning if not honored (but is in CFLAGS)?
(In reply to Mart Raudsepp from comment #6) > I agree that it can be removed now. But the point of its existence was for > detecting packages that don't honor CFLAGS/LDFLAGS, I believe. -Wl,--hash-style=gnu was never used for detection of packages not respecting CFLAGS/CXXFLAGS, it was only for LDFLAGS. > If we want to keep that behaviour, we should add something in its place. > I think "-frecord-gcc-switches" is that nowadays for CFLAGS/CXXFLAGS? > I mean what portage QA checks actually end up looking at and warning > if not honored (but is in CFLAGS)? QA check for packages not respecting CFLAGS/CXXFLAGS/FFLAGS/FCFLAGS is a separate QA check, and is enabled only when all 4 variables (CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS) contain "-frecord-gcc-switches".
Apparently amd64/x86 project pages were updated already, so I'll just update the profiles. Thanks for noticing this and thanks for the patch.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1540ad80e83b4b9ed628a037eb7476974a238898 commit 1540ad80e83b4b9ed628a037eb7476974a238898 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2019-03-18 07:13:01 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2019-05-19 06:18:10 +0000 profiles: Update LDFLAGS in developer profiles Closes: https://bugs.gentoo.org/680828 Signed-off-by: Michał Górny <mgorny@gentoo.org> profiles/default/linux/amd64/13.0/developer/make.defaults | 6 +++--- profiles/default/linux/amd64/17.0/developer/make.defaults | 6 +++--- profiles/default/linux/amd64/17.1/developer/make.defaults | 6 +++--- profiles/default/linux/x86/13.0/developer/make.defaults | 6 +++--- profiles/default/linux/x86/17.0/developer/make.defaults | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-)