libtool
[Top][All Lists]
Advanced

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

[PATCH] dyld port


From: Wilfredo Sanchez
Subject: [PATCH] dyld port
Date: Tue, 21 Nov 2000 17:05:42 -0800

  Below is an updated patch for Darwin (Mac OS X) and Rhapsody (Mac
OS X Server).  It is probably also correct or close to correct for
OpenStep 4.2, which also uses dyld, but I don't run OpenStep and
haven't tried it out there.

  I've tested this successfully with PHP4.

        -Fred


Index: ChangeLog
===================================================================
RCS file: /cvs/Darwin/Commands/GNU/libtool/libtool/ChangeLog,v
retrieving revision 1.1.1.2
retrieving revision 1.3
diff -u -d -b -w -r1.1.1.2 -r1.3
--- ChangeLog   2000/08/09 21:27:27     1.1.1.2
+++ ChangeLog   2000/11/22 00:47:10     1.3
@@ -1,3 +1,10 @@
+2000-08-23  Wilfredo Sanchez  <address@hidden>
+
+       * ltconfig.in: (darwin*) New port for dyld platforms.
+                      (rhapsody*) Use dyld port.
+       * ltmain.in: (darwin*) New port for dyld platforms.
+                    (rhapsody*) Use dyld port.
+
 2000-05-27  Gary V. Vaughan  <address@hidden>
 
        GNU libtool 1.3.5 was released.
Index: ltconfig.in
===================================================================
RCS file: /cvs/Darwin/Commands/GNU/libtool/libtool/ltconfig.in,v
retrieving revision 1.1.1.2
retrieving revision 1.4
diff -u -d -b -w -r1.1.1.2 -r1.4
--- ltconfig.in 2000/08/09 21:27:29     1.1.1.2
+++ ltconfig.in 2000/11/10 06:09:31     1.4
@@ -678,6 +678,10 @@
   cygwin* | mingw* | os2*)
     # We can build DLLs from non-PIC.
     ;;
+  darwin* | rhapsody*)
+    # Common symbols not allowed in MH_DYLIB files
+    pic_flag='-fno-common'
+    ;;
   amigaos*)
     # FIXME: we need at least 68020 code to build shared libraries, but
     # adding the `-m68020' flag to GCC prevents building anything better,
@@ -1367,6 +1371,16 @@
     hardcode_shlibpath_var=no
     ;;
 
+  darwin* | rhapsody*)
+    allow_undefined_flag='-undefined warning'
+    archive_cmds='$CC $(if test "$module" = "yes"; then echo -bundle; else 
echo -dynamiclib; fi) $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts'
+    #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols $lib'
+    hardcode_direct=yes
+    hardcode_libdir_flag_spec='-install_name $libdir/$(basename $lib)'
+    hardcode_shlibpath_var=no
+    whole_archive_flag_spec='-all_load $convenience'
+    ;;
+
   hpux9* | hpux10* | hpux11*)
     case "$host_os" in
     hpux9*) archive_cmds='$rm $objdir/$soname~$LD -b +b $install_libdir -o 
$objdir/$soname $libobjs $deplibs $linkopts~test $objdir/$soname = $lib || mv 
$objdir/$soname $lib' ;;
@@ -1439,12 +1453,6 @@
     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
     hardcode_libdir_separator=:
     ;;
-  rhapsody*)
-    archive_cmds='$CC -bundle -undefined suppress -o $lib $libobjs $deplibs 
$linkopts'
-    hardcode_libdir_flags_spec='-L$libdir'
-    hardcode_direct=yes
-    hardcode_shlibpath_var=no
-    ;;
                                        
   sco3.2v5*)
     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
@@ -1915,6 +1923,18 @@
   esac
   ;;
 
+darwin* | rhapsody*)
+  deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+  file_magic_cmd=/usr/bin/file
+  file_magic_test_file=`echo 
/System/Library/Frameworks/System.framework/Versions/*/System | head -1`
+  library_names_spec='${libname}.$(if test "$module" = "yes"; then echo so; 
else echo dylib; fi)'
+  need_lib_prefix=no
+  need_version=no
+  postinstall_cmds='chmod +x $lib'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  ;;
+
 gnu*)
   version_type=linux
   need_lib_prefix=no
@@ -2051,14 +2071,6 @@
   deplibs_check_method='pass_all'
   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc 
/usr/lib /usr/local/lib /var/shlib"
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-rhapsody*)
-  version_type=sunos
-  library_names_spec='${libname}.so'
-  soname_spec='${libname}.so'
-  shlibpath_var=DYLD_LIBRARY_PATH
-  deplibs_check_method=pass_all
   ;;
 
 sco3.2v5*)
Index: ltmain.in
===================================================================
RCS file: /cvs/Darwin/Commands/GNU/libtool/libtool/ltmain.in,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -d -b -w -r1.1.1.2 -r1.2
--- ltmain.in   2000/08/09 21:27:30     1.1.1.2
+++ ltmain.in   2000/08/12 02:55:52     1.2
@@ -1079,6 +1079,10 @@
            # These systems don't actually have c library (as such)
            continue
            ;;
+         *-*-rhapsody* | *-*-darwin*)
+           # Darwin C library is in the System framework
+           deplibs="$deplibs -framework System"
+           ;;
          esac
        elif test "$arg" = "-lm"; then
          case "$host" in
@@ -1086,6 +1090,10 @@
            # These systems don't actually have math library (as such)
            continue
            ;;
+         *-*-rhapsody* | *-*-darwin*)
+           # Darwin math library is in the System framework
+           deplibs="$deplibs -framework System"
+           ;;
          esac
        fi
        deplibs="$deplibs $arg"
@@ -1795,8 +1803,8 @@
        *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
          # these systems don't actually have a c library (as such)!
          ;;
-        *-*-rhapsody*)
-         # rhapsody is a little odd...
+        *-*-rhapsody* | *-*-darwin*)
+         # Darwin C library is in the System framework
          deplibs="$deplibs -framework System"
          ;;
        *)

Wilfredo Sánchez, address@hidden
Open Source Engineering Lead
Apple Computer, Inc., Core Operating System Group
1 Infinite Loop, Cupertino, CA 94086, 408.974-5174



reply via email to

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