option enable-target-optspace overwrites CFLAGS_FOR_TARGET

Ian Lance Taylor iant@google.com
Thu Jun 2 20:24:00 GMT 2011


"Oliver Metz" <oliver.metz@gmx.de> writes:

>> > I'm building a mips cross toolchain. The target libs (libgcc,
>> > libstdc++) should be optimized for the target. But when using
>> > "--enable-target-optspace" configure switch my CFLAGS_FOR_TARGETS
>> are
>> > overwritten as config/mt-ospace gets included. A similar question was
>> > asked here [1] years ago. There is also a ten years old bug report [2].
>> >
>> > Is this the desired behavior of --enable-target-optspace or do you
>> > consider this as a bug?
>> 
>> I think it's a bug.  At least it's easy to work around it.
>> 
>> Ian
> Should I update the referenced ticket [1] or open a new one?

Can't hurt.

> If including config/mt-ospace is the one and only task of
> "--enable-target-optspace" then I will try to build without it and add "-Os"
> to CFLAGS_FOR_TARGET.

That is indeed the one and only task of --enable-target-optspace.

Ian



More information about the Gcc-help mailing list