public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: Richard Strand <richard.strand@icomera.com>
Cc: crossgcc@sourceware.org
Subject: Re: Success building seemingly native toolchain
Date: Mon, 28 Sep 2009 20:09:00 -0000	[thread overview]
Message-ID: <200909282209.56222.yann.morin.1998@anciens.enib.fr> (raw)
In-Reply-To: <4AAFC7B0.20605@icomera.com>

Hello Richard!

Sorry for the long delay...

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.

Thanks for the info!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| --==< ^_^ >==-- `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'



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

  reply	other threads:[~2009-09-28 20:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 16:58 Richard Strand
2009-09-28 20:09 ` Yann E. MORIN [this message]
2009-09-29 16:29   ` Martin Guy
2009-09-29 16:48   ` Richard Strand
2009-09-29 23:07     ` Oron Peled
2009-09-30 12:04       ` Richard Strand
2009-10-02 18:30   ` Richard Strand
2009-10-03 16:25     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200909282209.56222.yann.morin.1998@anciens.enib.fr \
    --to=yann.morin.1998@anciens.enib.fr \
    --cc=crossgcc@sourceware.org \
    --cc=richard.strand@icomera.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).