A good way to set sub-target switch
Doug Kwan (關振德)
dougkwan@google.com
Fri Jan 16 17:15:00 GMT 2009
I tried CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET, and
LIBCFLAGS_FOR_TARGET and LIBCXXFLAGS_FOR_TARGET but these got dropped
by libtool. I don't know if that is a feature of libtool or not.
New configuration is a bit problematic. I could not convince some of
the maintainer that Android was different enough from arm-eabi, hence
the -mandroid switch. I can do that in the local tree but it will not
be in up stream.
-Doug
2009/1/16 Ian Lance Taylor <iant@google.com>:
> "Doug Kwan (關振德)" <dougkwan@google.com> writes:
>
>> I am building a toolchain which is based on the arm-eabi target
>> but with a C library that requires the -mandroid switch. I am having
>> problems building libstdc++-v3 and friends because the -mandroid is
>> being dropped left and right. I tried exporting CFLAGS="-g -O2
>> -mandroid" in environment and forcing it in the make command line but
>> I still got errors because xgcc gets invoked without -mandroid
>> somewhere along the build. Is there a good way to set mandatory flags
>> like this?
>
> When building the toolchain, one would normally use CFLAGS_FOR_TARGET
> and CXXFLAGS_FOR_TARGET to control the options passed to xgcc when
> building libstdc++. Whether this will do the right thing for your
> libc, I don't know.
>
> There isn't really a good way to add new options to the compiler which
> are automatically used, except to introduce a new configuration.
>
> Ian
>
More information about the Gcc-help
mailing list