Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 512754 - flag-o-matic.eclass - add allowed flags: -gdwarf-* -fabi-version=*
Summary: flag-o-matic.eclass - add allowed flags: -gdwarf-* -fabi-version=*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-08 13:36 UTC by Hristo Venev
Modified: 2014-06-14 07:40 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hristo Venev 2014-06-08 13:36:51 UTC
# Set DWARF version
ALLOWED_FLAGS+=" -gdwarf-*"

# Set C++ ABI version
ALLOWED_FLAGS+=" -fabi-version=*"

# There will always be flags that someone needs and are not in
# ALLOWED_FLAGS. Don't force the user to put them in CC.
ALLOWED_FLAGS+=" ${ALLOWED_FLAGS_EXTRA}"

Reproducible: Always
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2014-06-10 04:56:51 UTC
I think giving people the ability to whitelist any arbitrary flag kind of defeats the purpose of strip-flags.  Especially when those flags won't show up in emerge --info.

-gdwarf I can see, but why do you want to set -fabi-version?
Comment 2 Hristo Venev 2014-06-10 11:42:07 UTC
(In reply to Ryan Hill from comment #1)
> I think giving people the ability to whitelist any arbitrary flag kind of
> defeats the purpose of strip-flags.  Especially when those flags won't show
> up in emerge --info.

All variables set in make.conf or a file sourced by make.conf will be shown in emerge --info. I can always symlink gcc to a shell script (not shown in emerge --info).

> -gdwarf I can see, but why do you want to set -fabi-version?

It controls the C++ ABI. In case:
- I'm not using the default C++ ABI (2)
- I'm using an ABI that actually supports C++ (6)
- A package that runs strip-flags (www-client/chromium[-custom-cflags])
- A dependency without strip-flags (dev-libs/jsoncpp)
- There exists a symbol for which the name mangling is different
Then I will have fun link time errors I can resolve only by:
- Changing an eclass every time after emerge --sync (No, I WILL NOT ADD --exclude* to PORTAGE_RSYNC_EXTRA_OPTS)
- Rebuilding a lot of packages with the default C++ ABI (I don't want that).
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2014-06-14 07:40:08 UTC
(In reply to Hristo Venev from comment #2)
> (In reply to Ryan Hill from comment #1)
> > I think giving people the ability to whitelist any arbitrary flag kind of
> > defeats the purpose of strip-flags.  Especially when those flags won't show
> > up in emerge --info.
> 
> All variables set in make.conf or a file sourced by make.conf will be shown
> in emerge --info. I can always symlink gcc to a shell script (not shown in
> emerge --info).

Only variables in profiles/info_vars are output with emerge --info.  emerge --info -v will show them but that's not what people attach to bug reports.

Yes there are all kinds of ways you could hide flags.  I'm not adding new ones.

+  14 Jun 2014; Ryan Hill <rhill@gentoo.org> flag-o-matic.eclass:
+  Add -Og, -gdwarf-*, and -fabi-version=* to allowed flags (bug #512534,
+  #512754).  Use a glob for -fstack-protector and friends.

http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.198&r2=1.199