libtool-patches
[Top][All Lists]
Advanced

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

Darwin shared lib support


From: Daniel Johnson
Subject: Darwin shared lib support
Date: Thu, 6 Sep 2001 14:06:14 -0400

There is a problem with Libtool's support of Darwin shared libs. In Libtool 1.4, the Darwin specific code was in the non-GNU ld section of libtool.m4; however, in the current version it has moved into the GNU ld section. Since Darwin doesn't use GNU ld, the code is never run and Libtool thinks Darwin can't build shared libs. The code needs to be moved back to the non-GNU section. I've included a diff from the current CVS source. I THINK I did this right, but since I'm a total newbie at this... It works on my system anyway. :) I hope someone else finds this of use.

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.223
diff -u -d -b -w -r1.223 libtool.m4
--- libtool.m4  2001/09/02 23:32:13     1.223
+++ libtool.m4  2001/09/06 17:14:49
@@ -4434,27 +4434,6 @@
$CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
       ;;

-    darwin* | rhapsody*)
-      case "$host_os" in
-      rhapsody* | darwin1.[[012]])
-        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
-        ;;
-      *) # Darwin 1.3 on
- _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
-        ;;
-      esac
-
-      # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
-      #        yet detect zsh echo's removal of \ escapes.
- _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
-      # We need to add '_' to the symbols in $export_symbols first
- #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
-      ;;
-
     netbsd*)
       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
@@ -4683,6 +4662,27 @@
       # FIXME: Should let the user specify the lib program.
_LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
       fix_srcfile_path='`cygpath -w "$srcfile"`'
+      ;;
+
+    darwin* | rhapsody*)
+      case "$host_os" in
+      rhapsody* | darwin1.[[012]])
+        _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+        ;;
+      *) # Darwin 1.3 on
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+        ;;
+      esac
+
+      # FIXME: Relying on posixy $() will cause problems for
+ # cross-compilation, but unfortunately the echo tests do not
+      #        yet detect zsh echo's removal of \ escapes.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
+      # We need to add '_' to the symbols in $export_symbols first
+ #_LT_AC_TAGVAR(archive_expsym_cmds, $1)="$_LT_AC_TAGVAR(archive_cmds, $1)"' && strip -s $export_symbols'
+      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
       ;;

     dgux*)


--
Daniel Johnson
address@hidden



reply via email to

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