[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Should libtool link in libgcc when building a shared library?
From: |
Steve Ellcey |
Subject: |
Should libtool link in libgcc when building a shared library? |
Date: |
Wed, 23 Mar 2005 09:47:45 -0800 (PST) |
I would just like to verify that the intended behaviour of libtool, when
using GCC to build a shared library, is to *not* automatically include
'-lgcc' on the link line used to build the shared library.
Is that the correct, intended behaviour?
The reason I ask is I am trying to port libffi (part of GCC) to IA64
HP-UX and am using the HP-UX linker. libffi has a dependency on libgcc,
but is currently not including '-lgcc' on the link line that builds
libffi. This causes the HP linker to issue a warning when I link a
program against libffi.
In the 1.4 (?) based libtool that is in the GCC sources, some platforms
use GCC to link and when they do that they get -lgcc automatically. I
made this change (locally) and it fixed my problem, but when I look at
the latest libtool sources I see that platforms that use GCC to link now
also use '-nostdlib' and thus would not get the '-lgcc' automatically.
So it seems like the change I made is not the correct change (since it
would get undone if and when GCC updated to libtool 1.5.*. Rather I
need to add an explicit '-lgcc' to the libtool command line that creates
libffi instead. Does that sound right?
Steve Ellcey
address@hidden
- Should libtool link in libgcc when building a shared library?,
Steve Ellcey <=