|
From: | Boehne, Robert |
Subject: | RE: address@hidden: Re: New flag -XCClinker |
Date: | Thu, 31 Oct 2002 11:58:11 -0500 |
Albert,
If -Xlinker was exactly equivalent to -Wl, then that would
be the case, but it isn't. I've seen reference to a few instances
on the libtool list where that wasn't the case, as well as a
few of my own. The reason is that -Xlinker is interpreted by
Libtool, not just the compiler, same reason we'd need -XCClinker
IMHO.
Thanks,
Rob
-----Original Message-----
From: Albert Chin [mailto:address@hidden]
Sent: Thursday, October 31, 2002 10:25 AM
To: address@hidden
Subject: Re: address@hidden: Re: New flag -XCClinker
On Wed, Oct 30, 2002 at 11:54:23AM -0500, Boehne, Robert wrote:
> I don't think -XCClinker and -Xlinker are the same at all,
> -Xlinker is used to pass a flag to $LD (i.e. ld).
> When doing piecewise linking, CXXFLAGS doesn't work to
> add a flag (maybe not just during piecewise linking, I'm not sure)
> at link time, but -Xlinker does unfortunately tacking -Wl, on
> to the front. Maybe I'm fixing the wrong problem, let me
> know what you think.
Ok, maybe I'm misunderstanding. Does -XCClinker make sense *only* when
the program doing the linking is *not* ld? If so, then I think the
code for -Xlinker should be modified so that $wl is added when ld is
used for linking. However, when ld is not used for linking, then don't
use $wl. Wouldn't this provide the same use as -XCClinker?
> Rob
>
> -----Original Message-----
> From: Albert Chin [mailto:address@hidden]
> Sent: Wednesday, October 30, 2002 8:33 AM
> To: address@hidden
> Subject: address@hidden: Re: New flag -XCClinker
>
>
> On Mon, Oct 28, 2002 at 08:32:20PM -0600, Robert Boehne wrote:
> > In this case I'm using Compaq cxx under Tru64 with
> > "-nolibcxx -nocxxstd". These two flags are only
> > relevant to linking, and the cxx compiler ignores
> > them unless it is invoked to link. Having both of these
> > flags on when linking a library is a good thing,
> > -nolibcxx prevents linking with old IO streams
> > (we want the new ones) and -nocxxstd with this compiler
> > prevents linking the static only libcxxstd.a.
> > When linking an executable, as some AC_TRY_* macros do,
> > both of these flags together will prevent any c++ runtime
> > from being used. That causes all tests (where linking
> > is needed) to fail. By setting CXXFLAGS, Libtool
> > will propogate these two flags down to the link
> > step, but not when piecewise linking is invoked.
> > Because the linker doesn't recognize either flag, they
> > can't be added with -Wl, or -Xlinker.
> > In short, I thought it would be an improvement to have
> > a command switch in Libtool that would pass a link-specific
> > flag directly to the compiler driver, just like -Xlinker
> > but without -Wl, appended to it. I could have found
> > other ways around this, but it seemed to me that the
> > -XCClinker flag would often be useful to others.
>
> Are you using -XCClinker in combination with autoconf? If so, how do
> you specify -XCClinker (same question for -Xlinker). I would imagine
> CXXFLAGS="-XCClinker -nolibcxx -XCClinker -nocxxstd" would also cause
> all tests to fail. Does specifying -Xlinker [option] pass -Wl,[option]
> to the linker? If so, is that correct?
>
> I understand the difference between the "compiler driver" and
> "linker". However, if they are the same (in most cases for C++), then
> shouldn't -Xlinker options be passed to the compiler driver without
> $wl?
>
> --
> albert chin (address@hidden)
>
>
> _______________________________________________
> Libtool-patches mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/libtool-patches
>
--
albert chin (address@hidden)
_______________________________________________
Libtool-patches mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/libtool-patches
[Prev in Thread] | Current Thread | [Next in Thread] |