bug-libtool
[Top][All Lists]
Advanced

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

bug in cvs libtool tag detection for same-basename compilers


From: Karl Chen
Subject: bug in cvs libtool tag detection for same-basename compilers
Date: Wed, 07 Aug 2002 18:38:13 -0700

Hi, I believe there is a bug in libtool (current cvs) for "TAG" detection.

libtool decides which compiler flags to use based on the command line by checking the basename of the command-line command and the basename of each tag's command. I'm sure you already know that, just making sure we're on the same page.

This works for "gcc" and "g++" and "g77" but it doesn't work in a lot of other cases. Examples:
    KAI C++:
"KCC" is a C++ compiler but "KCC --c" is a C compiler. There is no command for just C.

    gcc:
"gcc" is a C compiler as well as C++ and other compiler (depending on file extension), although people usually use g++ for C++ just to simplify linking. Also "gcc -x c++" is a C++ compiler but that is a little contrived anyway.

If I have CC="KCC --c" and CXX="KCC", then libtool will not compile C++ programs because it will look at the command line, see "KCC", compare to the first tag which happens to be C, whose base commandname is "KCC", and decide to compile it as a C program.

One possible more-robust fix using automake is to use "--tag=CXX" to the libtool C++ command-line in LTCXX (or whatever); similar for other languages.

Currently I'm kludging around it by having autoconf create a script "KCC--c" which just contains a call to "${CXX} --c \"address@hidden"", and set CC=KCC--c if "$CC"="$CXX --c".
I'm using KCC 3.4 and 4.0 on osf 5.1.



--
Karl Chen / address@hidden / (925)-422-7509





reply via email to

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