]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Unfortunately, libtool has no way of telling if unrecognized
authorAlbert Chin-A-Young <china@thewrittenword.com>
Tue, 14 Sep 2004 21:23:43 +0000 (21:23 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 14 Sep 2004 21:23:43 +0000 (21:23 +0000)
compiler flags need an argument or not, and can disect options and
pass parts through incorrectly.  This changeset reverts both
2004-09-06 Albert Chin-A-Young (topmost) and 2004-09-05 Albert
Chin-A-Young below, and recognises more options explicitly:

* config/ltmain.in (func_mode_link): Pass through options needed
to compile in 64-bit mode with gcc, and the SGI, Sun, HP and IBM
compilers.

ChangeLog
config/ltmain.in

index 7f8fa8a3436ebf6d391b1152e2c391782f23f96f..eb7a26312af5b975c0e90a9230b175ece6b8c39d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2004-09-14  Albert Chin-A-Young  <china@thewrittenword.com>
+
+       Unfortunately, libtool has no way of telling if unrecognized
+       compiler flags need an argument or not, and can disect options and
+       pass parts through incorrectly.  This changeset reverts both
+       2004-09-06 Albert Chin-A-Young (topmost) and 2004-09-05 Albert
+       Chin-A-Young below, and recognises more options explicitly:
+
+       * config/ltmain.in (func_mode_link): Pass through options needed
+       to compile in 64-bit mode with gcc, and the SGI, Sun, HP and IBM
+       compilers.
+
 2004-09-13  Gary V. Vaughan  <gary@gnu.org>
 
        * m4/libtool.m4 (_LT_CMD_GLOBALS_SYMBOLS): Fix a typo I made when
index c1c59f764eac5aae425d2320ea1b885ec9ccdda4..18ea0885453bd2537632ce787e21c6eace78e91f 100644 (file)
@@ -2963,6 +2963,26 @@ func_mode_link ()
        continue
        ;;
 
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m* pass through architecture-specific compiler args for GCC
+      -64|-mips[0-9]||-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-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"
+      compiler_flags="$compiler_flags $arg"
+      continue
+      ;;
+
       # Some other compiler flag.
       -* | +*)
        # Unknown arguments in both finalize_command and compile_command need
@@ -2973,10 +2993,6 @@ func_mode_link ()
          arg="\"$arg\""
          ;;
        esac
-
-       if test -z "$prev"; then
-         compiler_flags="$compiler_flags $arg"
-       fi
        ;;
 
       *.$objext)