Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 41398 - GCC ebuild crashed on bootstrap with -Os in CFLAGS
Summary: GCC ebuild crashed on bootstrap with -Os in CFLAGS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-12 10:35 UTC by Gary Stein
Modified: 2004-02-14 23:36 UTC (History)
0 users

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 Gary Stein 2004-02-12 10:36:00 UTC
Trying to bootstrap a minimal system using the Os from the begining
to keep all the binaries small.  However, gcc crashes I beleive on
the second stage of bootstrap when it tries to use -O2s in the
CFLAGS, which is a bad statement

I tracked it down to this line of code in the ebuild
export CFLAGS="$(echo "${CFLAGS}" | sed -e 's|-O[0123456789]\?|-O2|g')";

it doesn't account for -Os, so it makes it -O2s, I'm retrying
now adding s to the list of characters in the regex

to see if it works, but It does work using -O2 on the same computer
but I'd like to start with -Os if possible, if not, I can do it later

Reproducible: Always
Steps to Reproduce:
1.add -Os to CFLAGS in make.conf
2.run bootstrap.sh

Actual Results:  
failed with illegal CFLAGS

Expected Results:  
not fail, but replace the -Os with -O2 as needed
Comment 1 Gary Stein 2004-02-12 12:23:21 UTC
forgot to mention this was gcc-3.3.2-r7.ebuild
since I had ~x86 (not smartest Idea)

previous ebuilds like gcc-3.3.1-r1.ebuild use:
export CFLAGS="${CFLAGS/-O?/-O2}"
Comment 2 solar (RETIRED) gentoo-dev 2004-02-14 23:00:30 UTC
rsync and try again please.
Comment 3 Gary Stein 2004-02-14 23:36:41 UTC
that did it when you added the -O[0-9s] in the sed expression

thanks