]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: When using gcc, pass -mfoo to the linker
authorBob Friesenhahn <bfriesen@simple.dallas.tx.us>
Tue, 19 Nov 2002 04:42:08 +0000 (04:42 +0000)
committerBob Friesenhahn <bfriesen@simple.dallas.tx.us>
Tue, 19 Nov 2002 04:42:08 +0000 (04:42 +0000)
via $compiler_flags in order to pass architecture information to
the linker (e.g. 32 vs 64-bit). This may also be accomplished via
-Wl,-mfoo but this is not reliable with gcc because gcc may use
-mfoo to select a different linker, different libraries, etc, while
-Wl,-mfoo simply passes -mfoo to the linker. If there is a better
solution, please let me know what it is.

ChangeLog
ltmain.in

index ffbec28f9637b04a0e8c27e97bd75be9e6a1093f..de7b6524784f64f853b7f7cf843264120cc2a540 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-11-18  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
+
+       * ltmain.in: When using gcc, pass -mfoo to the linker
+       via $compiler_flags in order to pass architecture information to
+       the linker (e.g. 32 vs 64-bit). This may also be accomplished via
+       -Wl,-mfoo but this is not reliable with gcc because gcc may use
+       -mfoo to select a different linker, different libraries, etc, while
+       -Wl,-mfoo simply passes -mfoo to the linker. If there is a better
+       solution, please let me know what it is.
+
 2002-11-18  Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
 
        * tests/Makefile.am: Conditional assignment of FFLAGS = @FFLAGS@
index 1d39321334c12b819e23da4851315bc70e6922e5..604ba608716e4555e70882b0d59968877a8f0a5e 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1283,6 +1283,29 @@ EOF
        continue
        ;;
 
+      # gcc -m* arguments should be passed to the linker via $compiler_flags
+      # in order to pass architecture information to the linker
+      # (e.g. 32 vs 64-bit).  This may also be accomplished via -Wl,-mfoo
+      # but this is not reliable with gcc because gcc may use -mfoo to
+      # select a different linker, different libraries, etc, while
+      # -Wl,-mfoo simply passes -mfoo to the linker.
+      -m*)
+       # Unknown arguments in both finalize_command and compile_command need
+       # to be aesthetically quoted because they are evaled later.
+       arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+       case $arg in
+       *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \   ]*|*]*|"")
+         arg="\"$arg\""
+         ;;
+       esac
+        compile_command="$compile_command $arg"
+        finalize_command="$finalize_command $arg"
+        if test "$with_gcc" = "yes" ; then
+          compiler_flags="$compiler_flags $arg"
+        fi
+        continue
+        ;;
+
       -no-fast-install)
        fast_install=no
        continue