[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linking a shared library with -pthread omits -pthread on the link l
From: |
Albert Chin |
Subject: |
Re: linking a shared library with -pthread omits -pthread on the link line. |
Date: |
Sun, 15 Dec 2002 11:14:29 -0600 |
User-agent: |
Mutt/1.4i |
On Sun, Dec 15, 2002 at 12:33:12AM -0600, Bob Friesenhahn wrote:
> 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.
I'm not arguing this point. What you want is correct.
> > 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.
The above case is the point of contention. Note that I asked libtool
to generate helldl. In the process of doing so, *libtool* creates
helldlS.c and compiles it. So, does libtool compile this
self-generated helldlS.c with $CFLAGS or not? If the latter, then we
must allow CC to be set to a command with spaces. This is the only
condition under which I would argue for libtool using $CFLAGS. But,
I'm happy with it using the flags passed in on the link line above.
--
albert chin (address@hidden)
- Re: linking a shared library with -pthread omits -pthread on the link line., (continued)
- Re: linking a shared library with -pthread omits -pthread on the link line., Albert Chin, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Max Bowsher, 2002/12/14
- RE: linking a shared library with -pthread omits -pthread on the link line., Howard Chu, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Max Bowsher, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Albert Chin, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Ossama Othman, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Albert Chin, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Bob Friesenhahn, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Albert Chin, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Bob Friesenhahn, 2002/12/15
- Re: linking a shared library with -pthread omits -pthread on the link line.,
Albert Chin <=
- Re: linking a shared library with -pthread omits -pthread on the link line., Max Bowsher, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Bob Friesenhahn, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Bob Friesenhahn, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Albert Chin, 2002/12/14
- Re: linking a shared library with -pthread omits -pthread on the link line., Max Bowsher, 2002/12/15
Re: linking a shared library with -pthread omits -pthread on the link line., Sascha Schumann, 2002/12/14