This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: okay, what's a "tagged combination" in libtool?


On Oct 16, 2000, Phil Edwards <pedwards@disaster.jaj.com> wrote:

> /bin/sh ../libtool --mode=compile /tec/build/3test/gcc/xgcc -B/tec/build/3test/gcc/
> -B/usr/local/SW/GCC/2.97-20001016-v3/sparc-sun-solaris2.8/bin/
> -B/usr/local/SW/GCC/2.97-20001016-v3/sparc-sun-solaris2.8/lib/ -isystem
> /usr/local/SW/GCC/2.97-20001016-v3/sparc-sun-solaris2.8/include -L/tec/build/3test/ld -DHAVE_CONFIG_H -I.
> -I../../../../unified/libstdc++-v3/libio -I.. -nostdinc++ -I.. -I../../../../unified/libstdc++-v3/include -I../libio
> -I../../../../unified/libstdc++-v3/libio -I/usr/local/SW/GCC/2.97-20001016-v3/include    -D_GNU_SOURCE -g  -g -O2 -c
> ../../../../unified/libstdc++-v3/libio/filedoalloc.c
> libtool: compile: unable to infer tagged configuration
> libtool: compile: specify a tag with `--tag'
> gmake[3]: *** [filedoalloc.lo] Error 1

> at the first attempt to build anything in the library.

A configuration tag is basically a set of libtool configuration values
associated with a compiler and a set of flags.  You may have noticed
that certain tests are done more than once with the new libtool setup:
one is for the C compiler, another is for the C++ compiler.

In general, libtool expects an argument such as `--tag=CXX' when using
the C++ compiler, because that will enable the settings detected when
C++ support was being configured.  However, when no such flag is given
in the command line, libtool attempts to figure it out by matching the
compiler name in each configuration section against a prefix of the
command line.  The problem is that, if the compiler name and its
initial flags stored in the libtool configuration file don't match
those in the command line, libtool can't decide which configuration to
use, and it gives up.

This problem usually happens when the top-level configure starts
passing a different compiler name or flags in CXX, but libstdc++-v3
uses the definition of CXX from config.cache for configuring libtool.
The hack around the problem is to clean up the target config.cache and
start over.  The correct solution is to add `--tag CXX' to
LTCXXCOMPILE and maybe CXXLINK, just after $(LIBTOOL), so that libtool
doesn't have to attempt to infer which configuration to use.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]