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.
Created attachment 15893 [details, diff] Patch for flag-o-matic eclass adding strip-unsupported-flags
we already have `gcc2-flags` ... why not make a `gcc3-flags` and a wrapper function named `strip-incompat-flags` or whatever, like you have
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
nah, i assumed your function worked in a manner similar to the other function i like your implementation ;)
Created attachment 20036 [details, diff] Updated to reflect other changes in flag-o-matic
Added to flag-o-matic eutils. Puggy