Using newlib-1.17.0 with a gcc cross-compiler without "-Os" support

Jon Beniston jon@beniston.com
Fri Jan 16 22:25:00 GMT 2009


Hi Navid,

Did you configure newlib with --enable-target-optspace? For me that is
usually what enables -Os. Otherwise it defaults to -O2. What is your target?

Cheers,
Jon 

-----Original Message-----
From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org] On
Behalf Of Navid Toosizadeh
Sent: 16 January 2009 22:00
To: newlib@sourceware.org
Subject: Using newlib-1.17.0 with a gcc cross-compiler without "-Os" support

Greetings,

I'm trying to port newlib-1.17.0 for my target. The target's compiler is
based on gcc 2.7.2.3, old yet fuctional.

When I try to make newlib, it tries to call the cross-compiler
(MyMachine-gcc) with size optimization flag (-Os), and it throws an error
with this message: "cc1: Invalid option `-Os'". My target's gcc supports
"-O1", "-O2" and "-O3".

When I configure and make newlib, how can I specify not to use "-Os" ?

Best regards
Navid






More information about the Newlib mailing list