On Sun, Jul 22, 2001 at 11:56:42PM -0400, Matthew Miller wrote:
> On Mon, Jul 23, 2001 at 12:48:00AM -0300, Rodrigo Barbosa wrote:
> > Humm, lemme see:
> > NEW_OPT=`echo $RPM_OPT_FLAGS | sed 's/ -O2 / -O3 /'`
> > RPM_OPT_FLAGS="${NEW_OPT_FLAGS}"
> > yes, thats it ...
>
> Yeah, I thought about that, but it seemed kinda sketchy. Is that really the
> best way? Is it a good idea?
Yup, that is.
> (BTW, it needs to be "sed 's/-O2 /-O3 /'`" -- there's not necessarily a
> space before -O2.)
Actualy, there is not necessarily a space after it either. So, if you
want to do it really strictly, just use:
| sed 's/ -O2 / -O3 /;s/^-O2 /-O3 /;s/ -O2$/ -O3/;s/^-O2$/-O3/'
But that is really being pedantic. A simple 's/-O2/-O3/' should do the trick
without any problems.
But, hey, I just noticed something else. If you are sure that you have -O2
on the $RPM_OPT_FLAGS var, just do this:
NEW_OPT="${RPM_OPT_FLAGS} -finline-functions"
RPM_OPT_FLAGS="${NEW_OPT}"
once, acording to the gcc info page:
`-O3' turns on all optimizations specified by
`-O2' and also turns on the `inline-functions' option.
[]s
--
Rodrigo Barbosa - rodrigob at bh.conectiva.com.br
Conectiva S/A - Belo Horizonte, MG, Brazil
"Quis custodiet ipsos custodiet?" - http://www.conectiva.com/
Attachment:
pgp00011.pgp
Description: PGP signature