This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Support libtool -no-undefined under GNU/Linux (also *BSD,other GNU ld systems)
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: dupuy at sysd dot com
- Date: Thu, 5 Jun 2003 18:03:50 -0500 (CDT)
- Subject: Re: PATCH: Support libtool -no-undefined under GNU/Linux (also *BSD,other GNU ld systems)
- Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs
> Anyhow, for anyone who (still) cares, attached are unidiffs to vanilla
> libtool 1.5 that implement libtool's -no-undefined option on GNU/Linux
> and other platforms that use GNU ld (e.g. *BSD variants, although I've
> only tested on Linux and FreeBSD 4.8).
> I needed to add a -pthread flag so that on *BSD libtool could decide
> whether to add a dependency on -lc_r (to resolve undefined symbols) or
> just turn off the undefined symbol checking. While this does defeat the
> checking in the common case, that seemed preferable to creating shared
> libraries/modules that broke threaded applications. I figured that any
> application built with -pthread probably uses the extra functions in
> -lc_r, so adding a dependency there wasn't likely to break anything.
FYI, FreeBSD 5.0 has different rules about -lc and -lc_r than
FreeBSD 4 (in 5, both appear instead of -lc_r replacing -lc).
Regards,
Loren