PATCH: Support libtool -no-undefined under GNU/Linux (also *BSD, other GNU ld systems)
Loren James Rittle
rittle@latour.rsch.comm.mot.com
Thu Jun 5 23:03:00 GMT 2003
> 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
More information about the Gcc-patches
mailing list