libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Revert patch to pass through unrecognized options


From: Bob Friesenhahn
Subject: Re: Revert patch to pass through unrecognized options
Date: Tue, 14 Sep 2004 12:52:24 -0500 (CDT)

This patch seems to be an improvement over what we have today.

Bob

On Tue, 14 Sep 2004, Albert Chin wrote:

Per discussion on the libtool list:
 http://lists.gnu.org/archive/html/libtool/2004-09/msg00053.html

I don't want to do anything really complicated to solve this problem.
I think the patch below is sufficient. It doesn't pass through
everything but what it does allow should be sufficient.

--
albert chin (address@hidden)

-- snip snip
2004-09-14  Albert Chin-A-Young  <address@hidden>

        * config/ltmain.in (func_mode_link): Revert patch to pass
        through unrecognized -[arg], +[arg] options. Because libtool
        cannot know if the unrecognized compiler flag accepts an
        argument, it cannot correctly parse the command-line. Instead,
        we pass through options we recognized.

Index: config/ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.in,v
retrieving revision 1.17
diff -u -3 -p -r1.17 ltmain.in
--- config/ltmain.in    6 Sep 2004 00:11:00 -0000       1.17
+++ config/ltmain.in    14 Sep 2004 16:47:30 -0000
@@ -2963,6 +2964,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 +2994,6 @@ func_mode_link ()
          arg="\"$arg\""
          ;;
        esac
-
-       if test -z "$prev"; then
-         compiler_flags="$compiler_flags $arg"
-       fi
        ;;

      *.$objext)


_______________________________________________
Libtool-patches mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/libtool-patches


======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]