* ltmain.in (-Wl, -Wc): Make commas argument separators, just like

in gcc.
This commit is contained in:
Alexandre Oliva 1999-12-18 07:02:40 +00:00 committed by Alexandre Oliva
parent 02772c8400
commit 811327bc67
2 changed files with 30 additions and 17 deletions

View File

@ -1,5 +1,8 @@
1999-12-18 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* ltmain.in (-Wl, -Wc): Make commas argument separators, just like
in gcc.
* ltmain.in (libtool_args): Get all arguments properly enclosed in
quotes and backslash-protected when needed.

View File

@ -1045,26 +1045,36 @@ compiler."
;;
-Wc,*)
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case "$arg" in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
esac
flag=`$echo "X$arg" | $Xsed -e 's/^-Wc,//'`
compiler_flags="$compiler_flags $flag"
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
case "$flag" in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
flag="\"$flag\""
;;
esac
compiler_flags="$compiler_flags $flag"
done
IFS="$save_ifs"
continue
;;
-Wl,*)
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
case "$arg" in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
esac
flag=`$echo "X$arg" | $Xsed -e 's/^-Wl,//'`
linker_flags="$linker_flags $flag"
compiler_flags="$compiler_flags $wl$flag"
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
case "$flag" in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
flag="\"$flag\""
;;
esac
compiler_flags="$compiler_flags $wl$flag"
linker_flags="$linker_flags $flag"
done
IFS="$save_ifs"
continue
;;
-Xcompiler)