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]

Re: Success building seemingly native toolchain


Yann E. MORIN wrote:
Hello Richard!

Sorry for the long delay...
No problem!

On Tuesday 15 September 2009 18:58:24 Richard Strand wrote:
I had a problem where crosstool-ng would break when it was building NPTL
when using glibc 2.7 and above. As I am using i686 to build i486 I
suspect this was the "seemingly native toolchains do not build" bug.

Yes, you hit it.


I have now managed to successfully get this to build by setting
CT_TARGET_CFLAGS="-O2".

Ah! So far, CT_TARGET_CFLAGS is used only to build the C library (except uClibc) and gcc.

glibc (and eglibc) are known to mis-compile (or refuse to compile at
all) if -O is not specified in the CFLAGS. That's why it is currently
hard-coded in the scripts. It is not said in the gcc manual if -O
options are cumulative or if any -O option overrides any preceding
option; in the build scripts, -O is specified after CT_TARGET_CFLAGS.

I don't know about gcc, but building the final compiler is the only
place that uses CT_TARGET_CFLAGS. I can't say how this is used by the
gcc makefiles.

Is this a known workaround for the problem (I couldn't find anything on
it), and does this work for everyone else?

This is not a known workaround. But it might be as good as any thing
else. Was your toolchain fully working? If so, then we might consider
changing the -O into a -O2.

The toolchain is working perfectly for me and I've not run into any problems yet. Changing to -O2 sounds like a good idea as long as it doesn't break builds for any other architectures.


Regards,

--Richard Strand


-- 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]