libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: address@hidden: Re: New flag -XCClinker


From: Boehne, Robert
Subject: RE: address@hidden: Re: New flag -XCClinker
Date: Wed, 30 Oct 2002 11:54:23 -0500

Albert,

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.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]