Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 644764

Summary: flag-o-matic.eclass is-flagq is-flag should respect overwritten parameters
Product: Gentoo Linux Reporter: EoD <EoD>
Component: EclassesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED WONTFIX    
Severity: normal CC: tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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.