This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Optimizing target libraries for target arch


Hello.

We are building cross toolchains to run on i386 and compile for mips
(embedded system)[1]. While looking at the build process of the cross gcc I
recognized that the target libs (e.g. libgcc) are not optimized for the
target. So we used this patch[2] for some time now. As I want to get rid of
this hack I started diggingâ

The configure switches â--with-arch=4kc" and "--with-float=soft" don't seem
to influence the cflags when building the target libs. What's the sense of
these switches? Default settings when compiling for the target?

Setting "CFLAGS_FOR_TARGET" and "CXXFLAGS_FOR_TARGET" turned out to be the
right way as crosstool-ng, buildroot and OpenWRT are using these in their
Makefiles.
 
Thus we want to build as small as possible we are using the configure switch
" --enable-target-optspace". But this overwrites the flags for the target
(e.g. -march=4kc -msoft-float)!?  I found a request on the
newlib-mailinglist targeting the same issue[3]. Why does this option
override the flags (config/mt-ospace)? Bug or feature?

So now I'm stuck. Should we build without the optspace-option as we already
have "-Os" in the target cflags. Does this setting have another impact than
setting this two flags? OpenWRT for example sets their flags[4] on make and
overrides the configured values. But this seems like a hack too as other
flags could get lost.

Regards
Oliver

[1] http://freetz.org/browser/trunk/toolchain/make/target/gcc/gcc.mk
[2]
http://freetz.org/browser/trunk/toolchain/make/target/gcc/4.4.5/101-soft-float.patch?rev=6186
[3] http://sourceware.org/ml/newlib/2007/msg00828.html
[4] https://dev.openwrt.org/browser/trunk/toolchain/gcc/common.mk#L174

Gcc: 4.5.3
Binutils: 2.21.51.0.9
uClibc: 0.9.31
Linux: 2.6.32

-- 
View this message in context: http://old.nabble.com/Optimizing-target-libraries-for-target-arch-tp31700174p31700174.html
Sent from the Sourceware - crossgcc list mailing list archive at Nabble.com.


--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]