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

Bug 26390

Summary: Add strip-unsupported-flags function to flag-o-matic eutils
Product: Portage Development Reporter: Douglas Russell (RETIRED) <puggy>
Component: UnclassifiedAssignee: Douglas Russell (RETIRED) <puggy>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch for flag-o-matic eclass adding strip-unsupported-flags
Updated to reflect other changes in flag-o-matic

Description Douglas Russell (RETIRED) gentoo-dev 2003-08-11 03:05:54 UTC
Not all flags are supported by all versions of gcc. When an ebuild changes
cflags it is possible flags won't be recognised by an older version of gcc. This
function tests all cflags against current gcc and strips unsupported flags.

This may also be useful outside of this eclass to allow cflags to be
automatically checked against current gcc, say in a CFLAG equivalent of the ufed
program.

Patch attached

Puggy

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Douglas Russell (RETIRED) gentoo-dev 2003-08-11 03:08:38 UTC
Created attachment 15893 [details, diff]
Patch for flag-o-matic eclass adding strip-unsupported-flags
Comment 2 SpanKY gentoo-dev 2003-08-11 05:02:10 UTC
we already have `gcc2-flags` ... why not make a `gcc3-flags` and a wrapper 
function named `strip-incompat-flags` or whatever, like you have 
Comment 3 Douglas Russell (RETIRED) gentoo-dev 2003-08-11 05:26:19 UTC
Well. I could do that, but I thought this was a good method as it does not rely on having a list of compatible flags and will work with all versions of gcc present and probably future without updating...

Sorry if I've misunderstood your thinking here.

Puggy
Comment 4 SpanKY gentoo-dev 2003-08-11 16:35:15 UTC
nah, i assumed your function worked in a manner similar to the other function 
 
i like your implementation ;) 
Comment 5 Douglas Russell (RETIRED) gentoo-dev 2003-10-31 14:30:23 UTC
Created attachment 20036 [details, diff]
Updated to reflect other changes in flag-o-matic
Comment 6 Douglas Russell (RETIRED) gentoo-dev 2003-10-31 15:07:28 UTC
Added to flag-o-matic eutils.

Puggy