The test autoopts/test/immediate.test fails if CFLAGS contains any of the debug flags (apart from -g). This is because it tries to filter those flags out by using this: CFLAGS="-g `echo ${CFLAGS} | \ sed 's,-O2,,;s/-g//'`" which clearly replaces -ggdb2 (for example) with -gdb2 - which isn't a valid CFLAG and the test compilation fails. A simple fix is to make the sed script a little more consistent. The following works: CFLAGS="-g `echo ${CFLAGS} | \ sed 's,-O2,,;s/-g[^ \t]*//g'`" I figured really they want to remove any -g* flags. Patch to follow.
Created attachment 114708 [details, diff] Fixup insufficient sed script to remove any -g* debug flag, not just drop '-g'
(In reply to comment #0) > which clearly replaces -ggdb2 (for example) with -gdb2 I meant it is replaced with 'gdb2' (no '-').
i've gone with: + sed 's,-O2,,;s/-g[^[:space:]]*//'`" cheers
I just found two new gcc parameters that the fix in the ebuild doesn't handle but the fix applied upstream does. --param max-gcse-passes=4 --param max-gcse-memory=209715200 I suggest changing the patch in ebuild to use the sed script from upsteam with sed 's,-O2,,;s/[ \t][ \t]*-g[^ \t]*[ \t][ \t]*/ /'