* Build GCC with -Os for multi libs
@ 2009-12-01 14:42 Sebastian Huber
2009-12-01 14:54 ` Kai Ruottu
2009-12-02 12:42 ` Richard Earnshaw
0 siblings, 2 replies; 5+ messages in thread
From: Sebastian Huber @ 2009-12-01 14:42 UTC (permalink / raw)
To: gcc-help
Hi,
normally the GCC multi libs (libc, libgcc, libstdc++ for the target) are built
with the optimization level -O2. How can I change this to -Os?
Have a nice day!
--
Sebastian Huber, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build GCC with -Os for multi libs
2009-12-01 14:42 Build GCC with -Os for multi libs Sebastian Huber
@ 2009-12-01 14:54 ` Kai Ruottu
2009-12-01 15:01 ` Sebastian Huber
2009-12-02 12:42 ` Richard Earnshaw
1 sibling, 1 reply; 5+ messages in thread
From: Kai Ruottu @ 2009-12-01 14:54 UTC (permalink / raw)
To: Sebastian Huber; +Cc: gcc-help
Sebastian Huber wrote:
> Hi,
>
> normally the GCC multi libs (libc, libgcc, libstdc++ for the target) are built
> with the optimization level -O2. How can I change this to -Os?
>
Either :
1. Setting things like CFLAGS in environment before writing 'configure'
Or if this is too late, already configured :
2. Editing the produced Makefile(s) before writing 'make', searching for
all the *FLAGS defined in it/them.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build GCC with -Os for multi libs
2009-12-01 14:54 ` Kai Ruottu
@ 2009-12-01 15:01 ` Sebastian Huber
2009-12-01 16:17 ` Stephan Raue
0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Huber @ 2009-12-01 15:01 UTC (permalink / raw)
To: Kai Ruottu; +Cc: gcc-help
Kai Ruottu wrote:
> Sebastian Huber wrote:
>> Hi,
>>
>> normally the GCC multi libs (libc, libgcc, libstdc++ for the target)
>> are built
>> with the optimization level -O2. How can I change this to -Os?
>>
>
> Either :
>
> 1. Setting things like CFLAGS in environment before writing 'configure'
I should have mentioned that I want to build a cross compiler. So we have at
least two CFLAGS. If I use "gcc-dir/configure ... 'CFLAGS=-Os -g'" the libc
will be built with "... -O2 -Os -g" for example.
>
> Or if this is too late, already configured :
>
> 2. Editing the produced Makefile(s) before writing 'make', searching for
> all the *FLAGS defined in it/them.
>
Ok, this always works, but I think this is a brittle brute force approach.
Thanks.
--
Sebastian Huber, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-6
Fax : +49 89 18 90 80 79-9
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build GCC with -Os for multi libs
2009-12-01 15:01 ` Sebastian Huber
@ 2009-12-01 16:17 ` Stephan Raue
0 siblings, 0 replies; 5+ messages in thread
From: Stephan Raue @ 2009-12-01 16:17 UTC (permalink / raw)
To: Sebastian Huber; +Cc: Kai Ruottu, gcc-help
Am 01.12.2009 16:00, schrieb Sebastian Huber:
>
> I should have mentioned that I want to build a cross compiler. So we have at
> least two CFLAGS. If I use "gcc-dir/configure ... 'CFLAGS=-Os -g'" the libc
> will be built with "... -O2 -Os -g" for example.
>
>
this is ugly but i think -Os overides -O2 (the last wins) so this is ok.
--
### OpenELEC.tv ###
The free and open Mediacenter Distribution 4 you
http://www.openelec.tv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build GCC with -Os for multi libs
2009-12-01 14:42 Build GCC with -Os for multi libs Sebastian Huber
2009-12-01 14:54 ` Kai Ruottu
@ 2009-12-02 12:42 ` Richard Earnshaw
1 sibling, 0 replies; 5+ messages in thread
From: Richard Earnshaw @ 2009-12-02 12:42 UTC (permalink / raw)
To: Sebastian Huber; +Cc: gcc-help
On Tue, 2009-12-01 at 15:42 +0100, Sebastian Huber wrote:
> Hi,
>
> normally the GCC multi libs (libc, libgcc, libstdc++ for the target) are built
> with the optimization level -O2. How can I change this to -Os?
>
> Have a nice day!
Well, according to configure: --enable-target-optspace
R.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-12-02 11:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-01 14:42 Build GCC with -Os for multi libs Sebastian Huber
2009-12-01 14:54 ` Kai Ruottu
2009-12-01 15:01 ` Sebastian Huber
2009-12-01 16:17 ` Stephan Raue
2009-12-02 12:42 ` Richard Earnshaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).