libtool
[Top][All Lists]
Advanced

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

RE: libtool doesn't hardcode libg2c when linking with g77


From: Boehne, Robert
Subject: RE: libtool doesn't hardcode libg2c when linking with g77
Date: Wed, 21 Aug 2002 10:33:30 -0400

David,

If we hardcode the path, the resulting programs would insist
that the compiler be installed in the same place on any
user's machine.  It would not be possible to swap out a
different version of the library either.  The short answer
is that if you need to change $LIBATH/$SHLIB_PATH/$LD_LIBRARY_PATH/%PATH%
(or whatever) then you should, hardcoding the path will cause other problems.
(IMHO)

Robert


-----Original Message-----
From: Albert Chin [mailto:address@hidden]
Sent: Saturday, August 17, 2002 7:05 AM
To: address@hidden
Subject: Re: libtool doesn't hardcode libg2c when linking with g77


On Fri, Aug 16, 2002 at 03:25:18PM -0400, John David Anglin wrote:
> > > Is this really libtool's job though? Not even the system linker
> > > would handle this.
> >
> > I'm not entirely sure.  I brought it up because libtool hardcodes
> > paths for libraries that are explicitly specified.  So, why not
> > hardcode all the shared libraries used in a link?
>
> Here is an easier wat to get the correct result.  Of course, this
> just applies to "gcc":
>
> # ./libtool --mode=link g77 -o main main.o `g77 -print-file-name=libg2c.la`
> g77 -o main main.o  /opt/gnu64/lib/libg2c.sl -lm -Wl,--rpath -Wl,/opt/gnu64/lib -Wl,--rpath -Wl,/opt/gnu64/lib

This works because you pass libg2c.la to libtool. If the -L, -l, or
.la file is not on the command-line to libtool, how is it suppose to
find the library?

--
albert chin (address@hidden)


_______________________________________________
Libtool mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/libtool


reply via email to

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