Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 172533 - autogen-5.8.8 tests fail if -ggdb or similar is in CFLAGS
Summary: autogen-5.8.8 tests fail if -ggdb or similar is in CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-28 09:50 UTC by Kevin F. Quinn (RETIRED)
Modified: 2007-04-21 13:27 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Fixup insufficient sed script to remove any -g* debug flag, not just drop '-g' (autogen-5.8.8-test_filter_gdb_properly.patch,371 bytes, patch)
2007-03-28 09:51 UTC, Kevin F. Quinn (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin F. Quinn (RETIRED) gentoo-dev 2007-03-28 09:50:35 UTC
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.
Comment 1 Kevin F. Quinn (RETIRED) gentoo-dev 2007-03-28 09:51:41 UTC
Created attachment 114708 [details, diff]
Fixup insufficient sed script to remove any -g* debug flag, not just drop '-g'
Comment 2 Kevin F. Quinn (RETIRED) gentoo-dev 2007-03-28 09:52:56 UTC
(In reply to comment #0)
> which clearly replaces -ggdb2 (for example) with -gdb2

I meant it is replaced with 'gdb2' (no '-').
Comment 3 SpanKY gentoo-dev 2007-03-30 06:03:25 UTC
i've gone with:
+  sed 's,-O2,,;s/-g[^[:space:]]*//'`"

cheers
Comment 4 Mikko Tiihonen 2007-04-21 13:27:32 UTC
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]*/ /'