[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using a different C++ Standard Library
From: |
Ralf Wildenhues |
Subject: |
Re: Using a different C++ Standard Library |
Date: |
Fri, 16 Dec 2005 19:55:10 +0100 |
User-agent: |
Mutt/1.5.9i |
Hi Liviu,
* Liviu Nicoara wrote on Thu, Dec 15, 2005 at 08:32:23PM CET:
>
> Since I posted the message I took the time to dig into the libtool
> script and the generated Makefiles looking for clues. I am afraid I do
> not have my exact original setup available for a cut&paste here but only
> an approximation:
>
> configure.ac:
> -------------
*snip*
> AC_PROG_CXX(aCC,CC,g++)
The arguments to AC_PROG_CXX should be separated by spaces:
AC_PROG_CXX([aCC CC g++])
I believe it searches all three of those by default though, so there's
no need to specify them.
> AC_PROG_LIBTOOL
>
> AC_PROG_MAKE_SET(gmake)
I don't think this takes an argument at all. If you want a different
make, do like this:
./configure MAKE=gmake
gmake
gmake install
> AM_PROG_AS
>
*snip*
> AC_SUBST([MY_CXX_EXTRA_CPPFLAGS],[${MY_CXX_EXTRA_CPPFLAGS};])
> AC_SUBST([MY_CXX_EXTRA_LDFLAGS], [${MY_CXX_EXTRA_LDFLAGS};])
> AC_SUBST([MY_CXX_EXTRA_LIBS], [${MY_CXX_EXTRA_LIBS};])
This can be reduced to just
AC_SUBST([MY_CXX_EXTRA_CPPFLAGS])
...
*snip*
> With this setup and invoking configure with the directory where stdlib
> is installed (--with-stdcxx=dir) I get what I posted previously.
OK.
> Please notice in my previous posting that the invocations of g++ had
> -nostdlib on the link line followed by a set of explicit link paths (-L)
> and the GNU C++ libraries.
>
> I have a workaround - which along with the explicit change of CXX to gcc
> can probably be qualified as an 'orrible 'ack: in order to link using
> gcc I place this line in my source/Makefile.am:
>
> CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS)
> $(AM_LDFLAGS) $(LDFLAGS) -o $@
>
> Please notice the missing --tag=CXX which accomplishes the goal.
The hack seems ok to me. You could also use --tag=CC explicitly.
> In response to your suggestions for a fix, more valuable to me as a user
> would probably be an option to indicate I only want minimal C++ language
> support. How about no C++ support at all and allowing me to indicate all
> libraries I need?
Well, that is just what I meant with the third alternative:
> Ralf Wildenhues wrote:
> >
> > Nope, your understanding is not flawed. We need to implement a way to
> > specify:
> > - I want the C++ stdlib linked in
> > - I want (possibly) only minimal runtime lib linked in
> > - none of the above.
:-)
Cheers,
Ralf