libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: darwin support


From: Christoph Pfisterer
Subject: Re: darwin support
Date: Sun, 22 Apr 2001 13:07:01 +0200

Simon Spero wrote:
Here are a few fixes that seem to make libtool better behaved under MacOS X 10.0.1 (darwin 1.3.1). Testing was done with dl compatibility library installed as libdl.

I second these fixes. libtool currently fails numerous tests on Darwin because of the quoting problems.

Changes:
1) change archive_cmd to look like version in darwin cvs tree. (quoting problems)

The libtool in Darwin CVS is not neccessarily a good source... I'd suggest a less intrusive patch, i.e. just changing `` to $(). It may also be a good idea to convert the `` quoting in library_names_spec and soname_spec. Since Darwin's /bin/sh is a zsh, portability should not be an issue. Patch below.

2) add hardcode_libdir_flag_spec. Hack, but fixed problems with isntall tests

The install tests are actually fixed by 1) and 3). Setting hardcode_libdir_flag_spec has no effect other than changing the message "how to hardcode library paths into programs" from "unsupported" to "immediate". (At least, that's what I think after reading the code.) Both messages are not quite right as Darwin ld hardcodes the path into the _library_. It then copies that path from the library header into the executable header during executable linking. There is a (complicated) flag to change the path that gets into the executable, but it's more efficient to link everything with the path for installation and use DYLD_LIBRARY_PATH (set as $shlibpath_var) for the uninstalled executable.

3) set lt_cv_deplibs_check_method.

Oops. Must have slipped when I submitted my previous patch. The is of course needed to have libtool support inter-library dependencies and fixes some of the tests. This really should go into the 1.4 release, even if the other parts of the patch are held back.

4) Add LIBADD_DL to LIBS when checking to see if  dlsym needs _

I didn't have problems with this, but then I didn't really check... Sounds like a good idea, also for other platforms.

Things now seem to work, but there are 2 failures when running the check:

1) hardcode.test
I can understand this one failing; don't know if it's harmful

This is to be expected given how hardcode.test works - see the explanations above.

2) quote.test
fails \\ quoting. may be related to problem with archive_cmd getting mangled.

It is related to archive_cmds, and it seems zsh is the source of the problem. This has been discussed on the libtool list in the last few days, although there is no real solution yet.

-chrisp


Alternative quoting patch:

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.160
diff -u -r1.160 libtool.m4
--- libtool.m4  2001/04/20 20:55:18     1.160
+++ libtool.m4  2001/04/22 10:57:24
@@ -1506,7 +1506,7 @@

   darwin* | rhapsody*)
     allow_undefined_flag='-undefined suppress'
- archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`' + archive_cmds='$CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linkopts -install_name $rpath/$soname $(test -n "$verstring" -a x$verstring != x0.0 && echo $verstring)'
     # We need to add '_' to the symbols in $export_symbols first
     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
     hardcode_direct=yes
@@ -1928,8 +1928,8 @@
   version_type=darwin
   need_lib_prefix=no
   need_version=no
- library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`' - soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`' + library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)' + soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
   shlibpath_overrides_runpath=yes
   shlibpath_var=DYLD_LIBRARY_PATH
   ;;

--
chrisp a.k.a. Christoph Pfisterer   "Any sufficiently advanced
address@hidden - http://chrisp.de      bug is indistinguishable
PGP key & geek code available        from a feature."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]