[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug relating to func_infer_tag
From: |
Ralf Wildenhues |
Subject: |
Re: bug relating to func_infer_tag |
Date: |
Mon, 3 May 2010 20:06:18 +0200 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
* Ralf Wildenhues wrote on Sun, May 02, 2010 at 06:33:14PM CEST:
> * Bruno Haible wrote on Sun, May 02, 2010 at 04:01:39PM CEST:
> > Look at this: Automake apparently defines
> > CXXLINK = $(LIBTOOL) $(AM_LIBTOOLFLAGS) ...
> > by default, and
> > CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) ...
> > if it has spotted an LT_LANG([CXX]) invocation.
> >
> > Why does is not define
> > CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) ...
> > unconditionally?
>
> I haven't doug that out yet, sorry.
Well, automake looks for presence of LT_SUPPORTED_TAG([CXX]) as
documented in `info Libtool "Trace interface"'. If that trace cannot be
found, then automake has to assume that there exists no tag for C++.
Now, the generated libtool script may still accept a given compiler
without a --tag=... argument, if its name matches that of a different
language. This functionality is useful in the following example: you
have Objective C or Objective C++ compilers, which need special
treatment from Automake (there are pending patches for this), but not
necessarily special treatment from Libtool, as they may coincide with C
or C++ compilers.
The missing links here are: the internal Libtool macros _LT_SETUP and
_LT_LANG invoke LT_SUPPORTED_TAG with CC and other arguments; _LT_SETUP
is called by LT_INIT, and _LT_LANG is called by LT_LANG with the
respective argument, or invoked automatically by code tacked onto the
end of AC_PROG_{CXX,F77,FC}, AM_PROG_GCJ.
As such, if you really cannot cope with AC_PROG_CXX, your replacement
code should be calling LT_LANG([C++]), as documented in `info Libtool
LT_INIT'. However, I recommend against this, for reasons also given
earlier.
Cheers,
Ralf