public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: crossgcc@sourceware.org
Cc: Mike Frysinger <vapier@gentoo.org>,
	Bryan Hundven <bryanhundven@gmail.com>,
	Zhenqiang Chen <zhenqiang.chen@linaro.org>,
	Khem Raj <raj.khem@gmail.com>
Subject: Re: libstdc++ configure fail due to -EL option
Date: Mon, 23 Jan 2012 22:37:00 -0000	[thread overview]
Message-ID: <201201232337.34642.yann.morin.1998@free.fr> (raw)
In-Reply-To: <201201231708.18054.vapier@gentoo.org>

Zhenqiang, Bryan, Khem, Mike, All,

For now, the original issue is on gcc trunk, and so crosstool-NG is not
yet impacted. Let's revisit the issue after the gcc-4.7 release (4.7 is
not even branched).

On Monday 23 January 2012 23:08:16 Mike Frysinger wrote:
> On Monday 23 January 2012 16:08:39 Bryan Hundven wrote:
> > On Wed, Jan 18, 2012 at 2:28 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> > > LDFLAGS should take the form as needed by the compiler driver.  i.e.
> > > -Wl,-EL.
> > 
> > Well, we'd get the same error if we pass -Wl,-EL to ld, where that
> > would fix it for passing to gcc.
> 
> yes, but generally speaking, you should not be invoking the linker.  
> everything should be going through the compiler driver.

<IMHO mode="rant">
I don't care if everything "should be going through the compiler driver" or
directly through the actual linker.

What I find dubious is to pass the LDFLAGS to the compiler driver. The
LDFLAGS are for the linker. If one wants to use the compiler driver to do
the link, I don't care, but then the LDFLAGS should first be appropriately
munged to be suitable for the compiler driver, and not used as-is.
That's a job to be done in the Makefile.

It's in large parts the fault of gcc (the package) for providing a compiler
_driver_ in the first place. *Either* it does its job, and only its job,
to drive the _compilation_ (and preprocessing), and it is not used for other
phases, such as linking, *or* it also accepts to _fully_ impersonate the
linker. Currently, the gcc compiler driver recognises parts of the linker
flags (eg. -static), but chokes on others (eg. --fatal-warnings), which
makes it useless to effectively be called in-lieu of the linker.

And what's worse, some packages are properly calling the linker 'ld', and
needs LDFLAGS suitable for 'ld', while other packages use the (deffective?)
gcc driver, and need LDFLAGS escaped with -Wl. Which makes it impratical
to use in a homogeneous build system.

That's sad... :-(
</IMHO>

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  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

  parent reply	other threads:[~2012-01-23 22:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18  5:36 Zhenqiang Chen
2012-01-18  5:43 ` Bryan Hundven
2012-01-18  5:52 ` Khem Raj
2012-01-18  7:09   ` Zhenqiang Chen
2012-01-18  7:10     ` Bryan Hundven
2012-01-18  7:22     ` Khem Raj
2012-01-18  7:28       ` Bryan Hundven
2012-01-18  8:02       ` Yann E. MORIN
     [not found]         ` <CAJ+oik0gsKpXgzR4cOxhyujv+=H-fuFsuhRouch9T2hz73U2FA@mail.gmail.com>
2012-01-18  8:47           ` Yann E. MORIN
2012-01-18  8:52             ` Zhenqiang Chen
2012-01-18 10:28     ` Mike Frysinger
2012-01-23 21:08       ` Bryan Hundven
2012-01-23 22:08         ` Mike Frysinger
2012-01-23 22:13           ` Bryan Hundven
2012-01-23 22:37           ` Yann E. MORIN [this message]
2012-01-23 23:55             ` Mike Frysinger

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=201201232337.34642.yann.morin.1998@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=bryanhundven@gmail.com \
    --cc=crossgcc@sourceware.org \
    --cc=raj.khem@gmail.com \
    --cc=vapier@gentoo.org \
    --cc=zhenqiang.chen@linaro.org \
    /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).