libtool-patches
[Top][All Lists]
Advanced

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

Re: [RFC] Custom tag interface


From: Scott James Remnant
Subject: Re: [RFC] Custom tag interface
Date: Thu, 18 Mar 2004 04:04:06 +0000

On Thu, 2004-03-18 at 02:55, Bob Friesenhahn wrote:

> On Wed, 17 Mar 2004, Scott James Remnant wrote:
> 
> > This is currently a Request For Comments only, if people like this patch
> > I'll make any necessary changes, write up some documentation for it and
> > mail a proper patch later.
> 
> Will these changes support multiple actual compilers for the same
> language, or only aliases for the same compiler?  For example, a
> Solaris user may use both GCC and Sun's commercial compiler and it
> would be useful to for the installed libtool to support both.
> 
My intent is that in the future, this should certainly be supported;
this patch takes the first step towards doing that.  The next one would
be changing the _LT_LANG_*_CONFIG macros to actually *call* AC_PROG_CXX
and the like, rather than using AC_REQUIRE to ensure that they have been
called.

There could probably be some logic like this:

        m4_if([$1], _LT_LANG_TAG_CXX,
          [AC_REQUIRE(AC_PROG_CXX)],
          [AC_PROG_CXX])

So for the automatic/first "LT_LANG(C++)" invocation it'd act like it
does now, for every subsequent one would do all the tests again.  Then
you could do something like:

        save_CXX=$CXX; CXX="/opt/sfw/bin/gcc"
        LT_LANG(C++, GNUCC)
        CXX=$save_CXX

        save_CXX=$CXX; CXX="/opt/SUNWspro/bin/cc"
        LT_LANG(C++, SUNCC)
        CXX=$save_CXX

> Also, sometimes compilers support major modes.  For example, the same
> compiler front end may support 32-bit and 64-bit compilation.  It is
> possible that the compiler behaves sufficiently differently between
> the two modes that it would be useful for libtool to be able to
> support each as a separate tag.  Is this possible?
> 
Same way:

        save_CFLAGS=$CFLAGS; CFLAGS="-m32 $CFLAGS"
        LT_LANG(C, C64)
        CFLAGS=$save_CFLAGS

        save_CFLAGS=$CFLAGS; CFLAGS="-m64 $CFLAGS"
        LT_LANG(C, C64)
        CFLAGS=$save_CFLAGS


As I said, this isn't directly supported by this patch; but it's
certainly this patch would allow us to do if we chose to go down that
path.

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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