1*4882a593Smuzhiyun--- a/ltmain.sh 2014-07-31 10:43:01.634568799 -0300 2*4882a593Smuzhiyun+++ b/ltmain.sh 2014-07-31 10:44:14.032018999 -0300 3*4882a593Smuzhiyun@@ -226,8 +226,9 @@ 4*4882a593Smuzhiyun # line option must be used. 5*4882a593Smuzhiyun if test -z "$tagname"; then 6*4882a593Smuzhiyun $echo "$modename: unable to infer tagged configuration" 7*4882a593Smuzhiyun- $echo "$modename: specify a tag with \`--tag'" 1>&2 8*4882a593Smuzhiyun- exit $EXIT_FAILURE 9*4882a593Smuzhiyun+ $echo "$modename: defaulting to \`CC'" 10*4882a593Smuzhiyun+ $echo "$modename: if this is not correct, specify a tag with \`--tag'" 11*4882a593Smuzhiyun+# exit $EXIT_FAILURE 12*4882a593Smuzhiyun # else 13*4882a593Smuzhiyun # $echo "$modename: using $tagname tagged configuration" 14*4882a593Smuzhiyun fi 15*4882a593Smuzhiyun@@ -247,6 +248,11 @@ 16*4882a593Smuzhiyun arg="$1" 17*4882a593Smuzhiyun shift 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun+ # Make -static behave as -all-static 20*4882a593Smuzhiyun+ case $arg in 21*4882a593Smuzhiyun+ -static) arg="-all-static" ;; 22*4882a593Smuzhiyun+ esac 23*4882a593Smuzhiyun+ 24*4882a593Smuzhiyun case $arg in 25*4882a593Smuzhiyun -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; 26*4882a593Smuzhiyun *) optarg= ;; 27*4882a593Smuzhiyun@@ -1238,7 +1244,8 @@ 28*4882a593Smuzhiyun prevarg="$arg" 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun case $arg in 31*4882a593Smuzhiyun- -all-static) 32*4882a593Smuzhiyun+ # Make -static behave like -all-static 33*4882a593Smuzhiyun+ -all-static | -static) 34*4882a593Smuzhiyun if test -n "$link_static_flag"; then 35*4882a593Smuzhiyun compile_command="$compile_command $link_static_flag" 36*4882a593Smuzhiyun finalize_command="$finalize_command $link_static_flag" 37*4882a593Smuzhiyun@@ -2146,8 +2153,14 @@ 38*4882a593Smuzhiyun absdir="$abs_ladir" 39*4882a593Smuzhiyun libdir="$abs_ladir" 40*4882a593Smuzhiyun else 41*4882a593Smuzhiyun- dir="$libdir" 42*4882a593Smuzhiyun- absdir="$libdir" 43*4882a593Smuzhiyun+ # Adding 'libdir' from the .la file to our library search paths 44*4882a593Smuzhiyun+ # breaks crosscompilation horribly. We cheat here and don't add 45*4882a593Smuzhiyun+ # it, instead adding the path where we found the .la. -CL 46*4882a593Smuzhiyun+ dir="$abs_ladir" 47*4882a593Smuzhiyun+ absdir="$abs_ladir" 48*4882a593Smuzhiyun+ libdir="$abs_ladir" 49*4882a593Smuzhiyun+ #dir="$libdir" 50*4882a593Smuzhiyun+ #absdir="$libdir" 51*4882a593Smuzhiyun fi 52*4882a593Smuzhiyun else 53*4882a593Smuzhiyun dir="$ladir/$objdir" 54*4882a593Smuzhiyun@@ -2272,7 +2285,7 @@ 55*4882a593Smuzhiyun { test "$prefer_static_libs" = no || test -z "$old_library"; }; then 56*4882a593Smuzhiyun if test "$installed" = no; then 57*4882a593Smuzhiyun notinst_deplibs="$notinst_deplibs $lib" 58*4882a593Smuzhiyun- need_relink=yes 59*4882a593Smuzhiyun+ need_relink=no 60*4882a593Smuzhiyun fi 61*4882a593Smuzhiyun # This is a shared library 62*4882a593Smuzhiyun 63*4882a593Smuzhiyun@@ -5169,6 +5182,10 @@ 64*4882a593Smuzhiyun # Replace all uninstalled libtool libraries with the installed ones 65*4882a593Smuzhiyun newdependency_libs= 66*4882a593Smuzhiyun for deplib in $dependency_libs; do 67*4882a593Smuzhiyun+ # Replacing uninstalled with installed can easily break crosscompilation, 68*4882a593Smuzhiyun+ # since the installed path is generally the wrong architecture. -CL 69*4882a593Smuzhiyun+ newdependency_libs="$newdependency_libs $deplib" 70*4882a593Smuzhiyun+ continue 71*4882a593Smuzhiyun case $deplib in 72*4882a593Smuzhiyun *.la) 73*4882a593Smuzhiyun name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` 74*4882a593Smuzhiyun@@ -5487,10 +5504,13 @@ 75*4882a593Smuzhiyun # At present, this check doesn't affect windows .dll's that 76*4882a593Smuzhiyun # are installed into $libdir/../bin (currently, that works fine) 77*4882a593Smuzhiyun # but it's something to keep an eye on. 78*4882a593Smuzhiyun- if test "$inst_prefix_dir" = "$destdir"; then 79*4882a593Smuzhiyun- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 80*4882a593Smuzhiyun- exit $EXIT_FAILURE 81*4882a593Smuzhiyun- fi 82*4882a593Smuzhiyun+ # 83*4882a593Smuzhiyun+ # This breaks install into our staging area. -PB 84*4882a593Smuzhiyun+ # 85*4882a593Smuzhiyun+ # if test "$inst_prefix_dir" = "$destdir"; then 86*4882a593Smuzhiyun+ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 87*4882a593Smuzhiyun+ # exit $EXIT_FAILURE 88*4882a593Smuzhiyun+ # fi 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun if test -n "$inst_prefix_dir"; then 91*4882a593Smuzhiyun # Stick the inst_prefix_dir data into the link command. 92