Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 680828 - Obsolete -Wl,--hash-style=gnu in "developer" amd64 and x86 profiles
Summary: Obsolete -Wl,--hash-style=gnu in "developer" amd64 and x86 profiles
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Profiles (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo Quality Assurance Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-18 06:56 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2019-05-19 06:18 UTC (History)
4 users (show)

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


Attachments
Patch (profiles.patch,4.89 KB, patch)
2019-03-18 07:19 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2019-03-18 06:56:48 UTC
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.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2019-03-18 07:19:51 UTC
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.)
Comment 2 Arfrever Frehtes Taifersar Arahesis 2019-03-18 07:33:47 UTC
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
Comment 3 Mart Raudsepp gentoo-dev 2019-03-18 07:36:26 UTC
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?
Comment 4 Arfrever Frehtes Taifersar Arahesis 2019-03-18 08:04:14 UTC
Vapier in bug #455232 said that it is since binutils-2.23.51.0.9.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-05-18 11:13:57 UTC
(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?
Comment 6 Mart Raudsepp gentoo-dev 2019-05-18 13:13:09 UTC
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)?
Comment 7 Arfrever Frehtes Taifersar Arahesis 2019-05-18 23:51:49 UTC
(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".
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-05-19 06:16:21 UTC
Apparently amd64/x86 project pages were updated already, so I'll just update the profiles.  Thanks for noticing this and thanks for the patch.
Comment 9 Larry the Git Cow gentoo-dev 2019-05-19 06:18:38 UTC
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(-)