public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: crossgcc@sourceware.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 23:55:00 -0000	[thread overview]
Message-ID: <201201231855.42579.vapier@gentoo.org> (raw)
In-Reply-To: <201201232337.34642.yann.morin.1998@free.fr>

[-- Attachment #1: Type: Text/Plain, Size: 2532 bytes --]

On Monday 23 January 2012 17:37:34 Yann E. MORIN wrote:
> 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 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.

the problem is that people encode and select a variety of things at the 
compiler level without providing the equivalent linker settings.  such as 
sysroot, architecture, multilib, float abi, endian, etc...  by invoking 
everything through the compiler, all of that is taken care of for you.

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

this violates the standard.  autotools and make pass LDFLAGS directly to the 
compiler driver, and most every other build system out there follows suite.  
attempting to fight the accepted standard is a waste of time :P.

(this ignores the linux kernel build system, but that is the exception, not 
the rule)

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

forcibly splitting up the compiler and linker stages, as well as duplicating 
the flags (which don't have clear equivalents between `gcc` and `ld`) is a step 
back in time

> And what's worse, some packages are properly calling the linker 'ld', and
> needs LDFLAGS suitable for 'ld'

what packages (other than the kernel) ?
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2012-01-23 23:55 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
2012-01-23 23:55             ` Mike Frysinger [this message]

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