Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 9337 - gdb failes with invalid option '-O2-pipe'
Summary: gdb failes with invalid option '-O2-pipe'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: Highest major (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-10-19 09:49 UTC by Thomas T. Veldhouse
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas T. Veldhouse 2002-10-19 09:49:28 UTC
While building gnome it depends upon gdb.  gdb fails during the compilation of
its first source file with an error

cc1: invalid option '-O2-pipe'
*** The command 'gcc -o conftest -O2-pipe -march=athlon  conftest.c' failed.
*** You must set the environment variable CC to a working compiler.

...

This keeps gnome and probably kde from building.
Comment 1 Thomas T. Veldhouse 2002-10-19 09:52:14 UTC
This is for the gdb-5.2.1.ebuild.
Comment 2 Thomas T. Veldhouse 2002-10-19 09:58:36 UTC
Further research finds that this is caused because of two factors.  My CFLAGS
are set to "-O -pipe -march=athlon".  Nothing wrong there.  What is wrong is in
the ebuild, there is a replace-flags directive.

replace-flags -O? -O2

This seems to strip out a space from the CFLAGS environment.  Why does this need
to be there?
Comment 3 SpanKY gentoo-dev 2002-10-19 12:17:33 UTC
its odd that it would strip the space ... 
 
the replace-flags is there because the package breaks with -O3 and greater 
Comment 4 Seemant Kulleen (RETIRED) gentoo-dev 2002-10-20 01:43:28 UTC
the flag-o-matic eclass should have the requisite fix. please try again.
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2002-10-20 01:45:51 UTC
try something like:

--------snip---------------
replace-flags -O[!' '] -O2
---------------------------