Christian Biesinger
2005-Nov-21 08:51 UTC
[Fontconfig] libtool -no-undefined: why windows only?
Christian Biesinger wrote:> It seems to me like that would be a useful flag on all > platforms, to avoid unintentionally leaving undefined references in the > library.Although it would be more useful if libtool actually made use of it for GNU ld (-z defs).
Christian Biesinger writes: > I saw that fontconfig uses the -no-undefined flag only on windows. Why > is that? Most probably because when it was ported to Windows one didn''t want to risk breaking anything on some Unix platform, so out of politeness the switch was introduced only on Windows. > It seems to me like that would be a useful flag on all platforms, > to avoid unintentionally leaving undefined references in the > library. I agree. Using -no-undefined (at least if it really would do what it says on Linux, I think it might not?) is good for programmer "discipline" and helps keeping code structure and DSO interdependencies cleaner. (Case in point: Evolution, where there are several cases of circular dependency among DSOs. Building that beast on Windows requires having separate bootstrap dummy import libraries...) --tml
Christian Biesinger
2005-Nov-21 08:51 UTC
[Fontconfig] libtool -no-undefined: why windows only?
Hi, I saw that fontconfig uses the -no-undefined flag only on windows. Why is that? It seems to me like that would be a useful flag on all platforms, to avoid unintentionally leaving undefined references in the library. But the real reason I''m sending this mail is that it causes problems for me on BeOS - not setting that flag means that libtool will not create shared libraries on some platforms, only static ones. With the attached patch, fontconfig still compiles fine for me on linux (FC4). It would be great if you could apply that patch. thanks, -biesi -------------- next part -------------- Index: src/Makefile.am ==================================================================RCS file: /cvs/fontconfig/fontconfig/src/Makefile.am,v retrieving revision 1.12 diff -p -u -6 -r1.12 Makefile.am --- src/Makefile.am 5 Dec 2004 05:49:20 -0000 1.12 +++ src/Makefile.am 30 Sep 2005 00:53:01 -0000 @@ -20,13 +20,12 @@ # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. if OS_WIN32 -no_undefined = -no-undefined export_symbols = -export-symbols fontconfig.def # gcc import library install/uninstall install-libtool-import-lib: $(INSTALL) .libs/libfontconfig.dll.a $(DESTDIR)$(libdir) @@ -97,13 +96,13 @@ libfontconfig_la_SOURCES = \ fcstr.c \ fcxml.c lib_LTLIBRARIES = libfontconfig.la libfontconfig_la_LDFLAGS = \ - -version-info @LT_VERSION_INFO@ $(no_undefined) $(export_symbols) + -version-info @LT_VERSION_INFO@ -no-undefined $(export_symbols) libfontconfig_la_LIBADD = $(FREETYPE_LIBS) $(EXPAT_LIBS) install-data-local: install-ms-import-lib install-libtool-import-lib uninstall-local: uninstall-ms-import-lib uninstall-libtool-import-lib