Hi Tim,
Excellent bug report Tim! Although unable to reproduce the bug with my
shells, I have committed the attached patch, which I think will fix the
problem for you.
On Wednesday 11 July 2001 7:42 pm, Tim Mooney wrote:
>The problem is coming from the
>
> output_verbose_link_cmd
>
> for alpha-dec-osf5.x (the osf4* | osf5* case)
>
> The whole thing is being eval'ed, and apparently the
>
> *)
>
> for the "catchall" case is therefore being globbed, which results in
> a list containing all the files in the current directory. It doesn't
> know how to parse anything beyond the first one, so the shell complains
> about it. If I had to guess, I would bet that any platform where the
> same output_verbose_link_cmd is used would cause the same problem.
>
> Tim
Cheers,
Gary.
--
())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/
2001-07-11 Gary V. Vaughan <[EMAIL PROTECTED]>
* libtool.m4 (_LT_AC_LANG_CXX_CONFIG) [hpux, linux, osf,
solaris]: output_verbose_link_cmd have unquoted `*' in case
statements for these architectures. Be sure to quote them
with a sed expression before passing to eval.
Reported by Tim Mooney <[EMAIL PROTECTED]>
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/libtool.m4,v
retrieving revision 1.189
diff -u -r1.189 libtool.m4
--- libtool.m4 2001/07/09 21:36:00 1.189
+++ libtool.m4 2001/07/11 22:22:50
@@ -126,6 +126,9 @@
# double_quote_subst'ed string.
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
# Constants:
rm="rm -f"
@@ -2861,8 +2864,13 @@
# Sentinel used to keep track of whether or not we are before
# the conftest object file.
pre_test_object_deps_done=no
+
+ # The `*' in the case matches for architectures that use `case' in
+ # $output_verbose_cmd can trigger glob expansion during the loop
+ # eval without this substitution.
+ output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e
+\"$no_glob_subst\"`"
- for p in `eval $output_verbose_link_cmd`; do
+ for p in `eval "$output_verbose_link_cmd"`; do
case $p in