Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 644764 - flag-o-matic.eclass is-flagq is-flag should respect overwritten parameters
Summary: flag-o-matic.eclass is-flagq is-flag should respect overwritten parameters
Status: RESOLVED WONTFIX
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: 2018-01-16 14:21 UTC by EoD
Modified: 2019-11-24 23:14 UTC (History)
1 user (show)

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 EoD 2018-01-16 14:21:55 UTC
It would be great if is-flagq or is-flag would only respect the last occurrence of each parameter.

For example: CFLAGS="-g2 -O3 -g0 -O0" 

is-flag should then not return true for "-O3", as it has been overwritten by "-O0". Similar for "-g


In my scenario, I do all packages by default via "-ggdb -O2 -pipe -march=something" and I disable debugging for specific packages (e.g. chromium) by using /etc/portage/env/disable_debug with CFLAGS="${CFLAGS} -ggdb0 -g0"

Unfortunately a lot of packages use is-flag(q) and hence complain about debugging cflags (like chromium's excessive disk requirements) which actually are not used here.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-07-13 08:12:52 UTC
We will unlikely implement complete parser for CFLAGS in any reasonable match to what gcc does.