libtool-patches
[Top][All Lists]
Advanced

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

Re: linking a shared library with -pthread omits -pthread on the link li


From: Bob Friesenhahn
Subject: Re: linking a shared library with -pthread omits -pthread on the link line.
Date: Sun, 15 Dec 2002 00:33:12 -0600 (CST)

On Sat, 14 Dec 2002, Albert Chin wrote:

> On Sat, Dec 14, 2002 at 05:43:45PM -0600, Bob Friesenhahn wrote:
> > On Sat, 14 Dec 2002, Albert Chin wrote:
> >
> > > Because libtool knows nothing about $CFLAGS, it's not possible for it
> > > to know about the appropriate switch (+DD64 in this case) to build
> > > 64-bit object files. Even though the answer was in $CFLAGS, libtool
> > > doesn't get passed $CFLAGS. My solution was CC="cc +DD64".
> > >
> > > So, do we teach libtool to inherit $CFLAGS?
> >
> > That would be a very bad idea indeed.  Libtool would loose all value
> > as a stand-alone utility if we were to do this.
>
> Huh? If "libtool --mode=link" causes a program to get built, I think
> it makes sense to use $CFLAGS.

Not really.  Note that CFLAGS is peculiar to a given project which
uses libtool to control the compile/link, but the libtool may be
derived from simply downloading GNU libtool and installing it.  If
libtool was simply an extension to Automake (which it could have been)
then the story would be entirely different.

If I do

 libtool --mode=link gcc -pg blah blah

then I want the -pg passed to gcc used as the linker regardless of the
options used when libtool is installed.

> So is the following behaviour correct?
>   $ sh pdemo-make.conf
>   ...
>   /bin/sh ./libtool --mode=link cc  +O2 -Ae -z +ESlit +Onofltacc
>   +DAportable +Oentrysched +Odataprefetch +Onolimit   -o helldl
>   -export-dynamic -dlpreopen libhello.la longer_file_name_dlmain.o
>   rm -f .libs/helldl.nm .libs/helldl.nmS .libs/helldl.nmT
>   creating .libs/helldlS.c
>   extracting global C symbols from `./.libs/libhello.a'
>   (cd .libs && cc -c  +Z -DPIC "helldlS.c")

I can't say.

Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

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