aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Schwinge <tschwinge@baylibre.com>2024-03-11 00:20:06 +0100
committerThomas Schwinge <tschwinge@baylibre.com>2024-03-11 00:20:26 +0100
commit41d0438ad2b99d4590425f46d53823d7ba41c043 (patch)
tree469706b23e7f673fe0cc9929bbb91a12f36857eb /gcc
parenta42ae248243087c45c491bd20a37514799e7962e (diff)
parentf330710912229678b65def1f6f52765baa3d0f7a (diff)
downloadgcc-41d0438ad2b99d4590425f46d53823d7ba41c043.zip
gcc-41d0438ad2b99d4590425f46d53823d7ba41c043.tar.gz
gcc-41d0438ad2b99d4590425f46d53823d7ba41c043.tar.bz2
Merge commit 'f330710912229678b65def1f6f52765baa3d0f7a' into HEAD
Diffstat (limited to 'gcc')
-rwxr-xr-xgcc/configure20
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/configure b/gcc/configure
index 6642612..75895af 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -14158,25 +14158,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm"
fi
fi
- for lt_tmp_nm in $lt_nm_to_check; do
+ for lt_tmp_nm in "$lt_nm_to_check"; do
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
- case "$lt_tmp_nm" in
+ # Strip out any user-provided options from the nm to test twice,
+ # the first time to test to see if nm (rather than its options) has
+ # an explicit path, the second time to yield a file which can be
+ # nm'ed itself.
+ tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`"
+ case "$tmp_nm_path" in
*/*|*\\*) tmp_nm="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`"
+ if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
- case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+ case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
*$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break
;;
*)
- case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
+ case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
*$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p"
break
@@ -19896,7 +19902,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19899 "configure"
+#line 19905 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -20002,7 +20008,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 20005 "configure"
+#line 20011 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H