]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* m4/libtool.m4 [darwin] (_LT_LANG_CXX_CONFIG): Changes for 10.4.
authorPeter O'Gorman <peter@pogma.com>
Fri, 17 Sep 2004 13:41:54 +0000 (13:41 +0000)
committerPeter O'Gorman <peter@pogma.com>
Fri, 17 Sep 2004 13:41:54 +0000 (13:41 +0000)
* config/libtool.in [darwin]: ditto.

ChangeLog
config/ltmain.in
m4/libtool.m4

index 784099f38b182c81870621352995f54044adc1fa..ada486080433d96165deae7c54088c11899437a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-17  Peter O'Gorman  <peter@pogma.com>
+
+       * m4/libtool.m4 [darwin] (_LT_LANG_CXX_CONFIG): Changes for 10.4.
+       * config/libtool.in [darwin]: ditto.
+
 2004-09-16  Gary V. Vaughan  <gary@gnu.org>
 
        My most recent `2004-09-02 Gary V. Vaughan' patch for mkdir_p
index 135710d5a776eadcf985e794c8a1c0b302a0e403..5109b192ac450bb0188d127012a2f7a67a6bc56e 100644 (file)
@@ -5511,9 +5511,14 @@ EOF
       case $host in
       *-*-darwin*)
        # Don't allow lazy linking, it breaks C++ global constructors
+       # But is supposedly fixed on 10.4 or later (yay!).
        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 c5820bd46316f43df8453f82f7537eab10c3df66..da2a362efc6078ecc6af30edc98fac112b7fcc36 100644 (file)
@@ -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