libtool-patches
[Top][All Lists]
Advanced

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

More changes for darwin-8.0


From: Peter O'Gorman
Subject: More changes for darwin-8.0
Date: Thu, 16 Sep 2004 23:11:29 +0900
User-agent: Mozilla Thunderbird 0.7.3 (Macintosh/20040803)

Okay to commit?

Peter
--
Peter O'Gorman - http://www.pogma.com

Index: ChangeLog
2004-09-16  Peter O'Gorman  <address@hidden>

        * m4/libtool.m4 [darwin] (_LT_LANG_CXX_CONFIG): Changes for 10.4.
        * config/libtool.in [darwin]: ditto.

from  Ralf Wildenhues  <address@hidden>
Index: config/ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.in,v
retrieving revision 1.20
diff -u -3 -p -u -r1.20 ltmain.in
--- config/ltmain.in 15 Sep 2004 01:25:36 -0000 1.20
+++ config/ltmain.in 16 Sep 2004 04:28:41 -0000
@@ -5492,8 +5492,12 @@ EOF
       *-*-darwin*)
        # Don't allow lazy linking, it breaks C++ global constructors
        if test "$tagname" = CXX ; then
-       compile_command="$compile_command ${wl}-bind_at_load"
-       finalize_command="$finalize_command ${wl}-bind_at_load"
+         case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+           10.[0123])
+             compile_command="$compile_command ${wl}-bind_at_load"
+             finalize_command="$finalize_command ${wl}-bind_at_load"
+           ;;
+         esac
        fi
        # Time to change all our "foo.ltframework" stuff back to "-framework 
foo"
        compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ 
$]*\).ltframework% -framework \1%g'`
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.104
diff -u -3 -p -u -r1.104 libtool.m4
--- m4/libtool.m4 15 Sep 2004 01:39:18 -0000 1.104
+++ m4/libtool.m4 16 Sep 2004 04:28:45 -0000
@@ -3803,18 +3803,14 @@ _LT_EOF
          _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
          ;;
        *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace 
${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[[012]])
-               _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace 
${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined 
${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
+         case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+           10.[[012]])
+             _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace 
${wl}-undefined ${wl}suppress'
+             ;;
+           10.*)
+             _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined 
${wl}dynamic_lookup'
+             ;;
+         esac
          ;;
       esac
       _LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -4742,18 +4738,14 @@ if test "$caught_CXX_error" != yes; then
             _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined 
${wl}suppress'
             ;;
           *) # Darwin 1.3 on
-            if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-              _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace 
${wl}-undefined ${wl}suppress'
-            else
-              case ${MACOSX_DEPLOYMENT_TARGET} in
-                10.[[012]])
-                  _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace 
${wl}-undefined ${wl}suppress'
-                  ;;
-                10.*)
-                  _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined 
${wl}dynamic_lookup'
-                  ;;
-              esac
-            fi
+            case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+              10.[[012]])
+                _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace 
${wl}-undefined ${wl}suppress'
+                ;;
+              10.*)
+                _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined 
${wl}dynamic_lookup'
+                ;;
+            esac
             ;;
         esac
         _LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -4766,14 +4758,24 @@ if test "$caught_CXX_error" != yes; then
         if test "$GXX" = yes ; then
           lt_int_apple_cc_single_mod=no
           output_verbose_link_cmd='echo'
-          if $CC -dumpspecs 2>&1 | $GREP 'single_module' >/dev/null ; then
-            lt_int_apple_cc_single_mod=yes
-          fi
-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-           _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module 
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name 
$rpath/$soname $verstring'
-          else
-            _LT_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs 
-nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o 
$lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname 
$verstring'
-          fi
+          case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+          10.[[0123]])
+            # only use -single_module on bona fide Apple compilers.
+            if ($CC -v) && $CC -v 2>&1| grep Apple 2>&1 >/dev/null ; then
+              if $CC -dumpspecs 2>&1 | $GREP 'single_module' >/dev/null ; then
+                lt_int_apple_cc_single_mod=yes
+              fi
+            fi
+            if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+             _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module 
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name 
$rpath/$soname $verstring'
+            else
+              _LT_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs 
-nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o 
$lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname 
$verstring'
+            fi
+            ;;
+          *)
+            _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib 
$allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name 
$rpath/$soname $verstring'
+            ;;
+          esac
           _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib 
-bundle $libobjs $deplibs$compiler_flags'
           # Don't fix this by using the ld -exported_symbols_list flag,
          # it doesn't exist in older darwin ld's

reply via email to

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