libtool-patches
[Top][All Lists]
Advanced

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

Re: New flag -XCClinker


From: Robert Boehne
Subject: Re: New flag -XCClinker
Date: Mon, 28 Oct 2002 20:32:20 -0600

Albert:

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.

Robert

Albert Chin wrote:
> 
> On Mon, Oct 28, 2002 at 07:47:37AM -0600, Boehne, Robert wrote:
> > I've found that -Xlinker and -Xcompiler -Wl, && -Wc,
> > were not quite enough.  The problem appeared when I
> > needed to make sure a linking flag was passed to the
> > C++ compiler driver as-is.  Without this patch, the only
> > way I could get these flags in the right place was to
> > set CXX to "$CXX -flag1 -flag2" and that broke a few
> > configure tests.  In general, I think non-C compilers
> > need a flag like this when it should be passed at link
> > time to the compiler driver.
> 
> What error did CXXFLAGS="-flag1 -flag2" give you?
> 
> --
> 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]