summaryrefslogtreecommitdiffstats
path: root/ltmain.sh
diff options
context:
space:
mode:
authorAndreas Tobler <a.tobler@schweiz.ch>2003-11-19 06:29:32 +0100
committerAndreas Tobler <andreast@gcc.gnu.org>2003-11-19 06:29:32 +0100
commit43d8d958ceabe3fa77308f115e2e616d307b9b3d (patch)
treea48bbeae29df42ceed0c81554bc0e2cce1f201d5 /ltmain.sh
parentconfig.gcc (powerpc-*-darwin*): Add libgcc build specification file. (diff)
downloadgcc-43d8d958ceabe3fa77308f115e2e616d307b9b3d.tar.gz
gcc-43d8d958ceabe3fa77308f115e2e616d307b9b3d.tar.bz2
gcc-43d8d958ceabe3fa77308f115e2e616d307b9b3d.tar.xz
libtool.m4: Sync darwin bits from libtool cvs to build a gcc with shared/dylibed libraries.
2003-11-19 Andreas Tobler <a.tobler@schweiz.ch> * libtool.m4: Sync darwin bits from libtool cvs to build a gcc with shared/dylibed libraries. * ltmain.sh: Likewise. * ltcf-c.sh: Likewise, disable shared library build for OS-X < 10.3. * ltcf-cxx.sh: Likewise. * ltcf-gcj.sh: Likewise. * ltconfig: Likewise. From-SVN: r73729
Diffstat (limited to 'ltmain.sh')
-rw-r--r--ltmain.sh59
1 files changed, 58 insertions, 1 deletions
diff --git a/ltmain.sh b/ltmain.sh
index 5d4281c54d2..5ccf95c7d1d 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -1111,6 +1111,19 @@ EOF
1111 finalize_command="$finalize_command $wl$qarg" 1111 finalize_command="$finalize_command $wl$qarg"
1112 continue 1112 continue
1113 ;; 1113 ;;
1114 framework)
1115 case $host in
1116 *-*-darwin*)
1117 case "$deplibs " in
1118 *" $qarg.framework "*) ;;
1119 *) deplibs="$deplibs $qarg.framework" # this is fixed later
1120 ;;
1121 esac
1122 ;;
1123 esac
1124 prev=
1125 continue
1126 ;;
1114 *) 1127 *)
1115 eval "$prev=\"\$arg\"" 1128 eval "$prev=\"\$arg\""
1116 prev= 1129 prev=
@@ -1363,6 +1376,10 @@ EOF
1363 prev=xlinker 1376 prev=xlinker
1364 continue 1377 continue
1365 ;; 1378 ;;
1379 -framework)
1380 prev=framework
1381 continue
1382 ;;
1366 1383
1367 # Some other compiler flag. 1384 # Some other compiler flag.
1368 -* | +*) 1385 -* | +*)
@@ -1841,6 +1858,13 @@ EOF
1841 *) . ./$lib ;; 1858 *) . ./$lib ;;
1842 esac 1859 esac
1843 1860
1861 case $host in
1862 *-*-darwin*)
1863 # Convert "-framework foo" to "foo.framework" in dependency_libs
1864 test -n "$dependency_libs" && dependency_libs=`$echo "X$dependency_libs" | $Xsed -e 's/-framework \([^ $]*\)/\1.framework/g'`
1865 ;;
1866 esac
1867
1844 if test "$linkmode,$pass" = "lib,link" || 1868 if test "$linkmode,$pass" = "lib,link" ||
1845 test "$linkmode,$pass" = "prog,scan" || 1869 test "$linkmode,$pass" = "prog,scan" ||
1846 { test $linkmode = oldlib && test $linkmode = obj; }; then 1870 { test $linkmode = oldlib && test $linkmode = obj; }; then
@@ -2446,6 +2470,7 @@ EOF
2446 case $outputname in 2470 case $outputname in
2447 lib*) 2471 lib*)
2448 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` 2472 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2473 eval shared_ext=\"$shrext\"
2449 eval libname=\"$libname_spec\" 2474 eval libname=\"$libname_spec\"
2450 ;; 2475 ;;
2451 *) 2476 *)
@@ -2457,6 +2482,7 @@ EOF
2457 if test "$need_lib_prefix" != no; then 2482 if test "$need_lib_prefix" != no; then
2458 # Add the "lib" prefix for modules if required 2483 # Add the "lib" prefix for modules if required
2459 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` 2484 name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2485 eval shared_ext=\"$shrext\"
2460 eval libname=\"$libname_spec\" 2486 eval libname=\"$libname_spec\"
2461 else 2487 else
2462 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` 2488 libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
@@ -2644,7 +2670,16 @@ EOF
2644 # Clear the version info if we defaulted, and they specified a release. 2670 # Clear the version info if we defaulted, and they specified a release.
2645 if test -z "$vinfo" && test -n "$release"; then 2671 if test -z "$vinfo" && test -n "$release"; then
2646 major= 2672 major=
2647 verstring="0.0" 2673 case $version_type in
2674 darwin)
2675 # we can't check for "0.0" in archive_cmds due to quoting
2676 # problems, so we reset it completely
2677 verstring=
2678 ;;
2679 *)
2680 verstring="0.0"
2681 ;;
2682 esac
2648 if test "$need_version" = no; then 2683 if test "$need_version" = no; then
2649 versuffix= 2684 versuffix=
2650 else 2685 else
@@ -3020,6 +3055,14 @@ EOF
3020 fi 3055 fi
3021 fi 3056 fi
3022 fi 3057 fi
3058 # Time to change all our "foo.framework" stuff back to "-framework foo"
3059 case $host in
3060 *-*-darwin*)
3061 newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
3062 dependency_libs=`$echo "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
3063 ;;
3064 esac
3065 # Done checking deplibs!
3023 # Done checking deplibs! 3066 # Done checking deplibs!
3024 deplibs=$newdeplibs 3067 deplibs=$newdeplibs
3025 fi 3068 fi
@@ -3088,6 +3131,7 @@ EOF
3088 3131
3089 # Get the real and link names of the library. 3132 # Get the real and link names of the library.
3090 eval library_names=\"$library_names_spec\" 3133 eval library_names=\"$library_names_spec\"
3134 eval shared_ext=\"$shrext\"
3091 set dummy $library_names 3135 set dummy $library_names
3092 realname="$2" 3136 realname="$2"
3093 shift; shift 3137 shift; shift
@@ -3533,6 +3577,19 @@ EOF
3533 ;; 3577 ;;
3534 esac 3578 esac
3535 3579
3580 case $host in
3581 *-*-darwin*)
3582 # Don't allow lazy linking, it breaks C++ global constructors
3583 if test "$tagname" = CXX ; then
3584 compile_command="$compile_command ${wl}-bind_at_load"
3585 finalize_command="$finalize_command ${wl}-bind_at_load"
3586 fi
3587 # Time to change all our "foo.framework" stuff back to "-framework foo"
3588 compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
3589 finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).framework% -framework \1%g'`
3590 ;;
3591 esac
3592
3536 compile_command="$compile_command $compile_deplibs" 3593 compile_command="$compile_command $compile_deplibs"
3537 finalize_command="$finalize_command $finalize_deplibs" 3594 finalize_command="$finalize_command $finalize_deplibs"
3538 3595