This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: references to compilation library in libstdc.la
- From: Phil Edwards <phil at codesourcery dot com>
- To: Ton Hospel <gcc at ton dot iguana dot be>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 6 Jan 2004 00:56:02 -0500
- Subject: Re: references to compilation library in libstdc.la
- References: <btdbbd$rs3$1@post.home.lunix>
On Tue, Jan 06, 2004 at 03:51:09AM +0000, Ton Hospel wrote:
> dependency_libs=' -L/home/tonh/src/gcc-3.4-20031231/build/i686-pc-linux-gnu/libs
> tdc++-v3/src -L/home/tonh/src/gcc-3.4-20031231/build/i686-pc-linux-gnu/libstdc++
> -v3/src/.libs -lm -lm -lm -L/home/tonh/src/gcc-3.4-20031231/build/gcc -L/usr/i68
> 6-pc-linux-gnu/bin -L/usr/i686-pc-linux-gnu/lib -L/usr/lib/../i686-pc-linux-gnu/
> lib -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s'
A longstanding well-known bug in libtool. There's a PR for it in the
various bugtrackers.
> - First of all it refers to my compilation directory, which i think should
> leave no effects like this in my install (I assume that line DOES have
> actual effects).
Yep. The problem here is that, given "-L/arbitrary/path", should libtool
retain the option and path, or throw it out? If it's a system or installation
directory, it should keep it, but if it's in the build tree, it should throw
it out. Of course, the script has no way of knowing what /arbitrary/path is.
> - Second it refers to places like -L/usr/i686-pc-linux-gnu/lib that only have
> some very old stuff I'm not sure this recent gcc should be referring to
This sounds more like distro vendor solutions.
> - Third it has all these repeats of libraries like three times -lm, which
> seems a bit overkill
Yep. Each of those -lfoo's come from a different place (libtool scripts,
various makefiles, builtin strings, etc). Collapsing "-lm -lm -lm" into a
single -lm is probably safe, but changing (say) "-lgcc -lgcc_s -lgcc -lgcc_s"
into "-lgcc -lgcc_s" is not.
> I don't really know when exactly this line is used (link scripts ?), but
Only if you use libtool to build/run your programs.
Phil
--
Sometimes I drive to run from all my demons.
Sometimes I drive so I can be alone.
Sometimes I drive to see the world in a different light.
Sometimes I drive for no reason at all. - Assemblage 23