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

Re: C++ transition stumbling blocks?



On Thu, 2003-01-23 at 07:59, Marcelo E. Magallon wrote:

> On Thu, Jan 23, 2003 at 04:25:06PM +0900, Junichi Uekawa wrote:
> 
>  > > $ /bin/sh ../libtool --mode=link g++  -g -O2  -o libGLU.la -rpath /usr/local/lib -version-info 4:500:3 -L../src dummy.lo -lGL     libnurbs/interface/libNIFac.la libnurbs/internals/libNInt.la    libnurbs/nurbtess/libNTess.la   libtess/libtess.la      libutil/libutil.la 
>  > 
>  > I seem to remember seeing in some cases gcc was invoked for linkage 
>  > even when g++ was specified. I don't remember having tracked it down
>  > or fixed it; would you be able to check if it's really invoking 
>  > gcc or g++ for linking ?
> 
>  Sure:
> 
>  /bin/sh ../libtool --mode=link g++  -g -O2  -o libGLU.la -rpath /usr/local/lib -version-info 4:500:3 -L../src dummy.lo -lGL 	libnurbs/interface/libNIFac.la 	libnurbs/internals/libNInt.la 	libnurbs/nurbtess/libNTess.la 	libtess/libtess.la 	libutil/libutil.la 
> 
>  rm -fr .libs/libGLU.la .libs/libGLU.* .libs/libGLU.*
>  
>  gcc -shared  dummy.lo -Wl,--whole-archive libnurbs/interface/.libs/libNIFac.al libnurbs/internals/.libs/libNInt.al libnurbs/nurbtess/.libs/libNTess.al libtess/.libs/libtess.al libutil/.libs/libutil.al -Wl,--no-whole-archive  -L/usr/X11R6/lib -L/build/buildd/mesa-5.0.0/build/swr/src /build/buildd/mesa-5.0.0/build/swr/src/.libs/libGL.so  -Wl,-soname -Wl,libGLU.so.1 -o .libs/libGLU.so.1.3.500
> 
>  Any clue as to why that happens?
> 
libtool deliberately uses it's value of $CC (=gcc) to create archives of
shared libraries, rather than the compiler you give it on the command
line.

This is fixed in libtool CVS, which is a whole lot more intelligent
about it[0], unfortunately that's too huge a patch to try and include in
the Debian libtool package.

I've been thinking about trying to package libtool CVS up for Debian,
possible as an alternate package, simply because it fixes just about
every bug and problem I know about!

Scott

[0] It has different config sections depending on the compiler you give,
    it still uses it's value of $CC, but if you give g++ it's value of
    $CC is "g++"
-- 
Scott James Remnant     Have you ever, ever felt like this?  Had strange
http://netsplit.com/      things happen?  Are you going round the twist?

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


Reply to: