summaryrefslogtreecommitdiff
path: root/binutils/configure
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/configure')
-rwxr-xr-xbinutils/configure17
1 files changed, 10 insertions, 7 deletions
diff --git a/binutils/configure b/binutils/configure
index 20fd420dbaa..492ca4cede9 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -5120,15 +5120,18 @@ else
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:
+ # We discard lines that mention 'unknown', 'invalid', or 'usage', hopefully
+ # placating systems like Darwin and HP-UX, which mention the name of nm
+ # in error output.
# nm: unknown option "B" ignored
- case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
- *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
+ case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | $GREP -v '^ *$' | $GREP -v 'nknown ' | $GREP -v 'nvalid ' | $GREP -v 'sage: ' | sed '1q'` in
+ *$tmp_nm*|*\ \ \ [A-Za-z]\ *|*[0-9a-f][0-9a-f][0-9a-f]\ [A-Za-z]\ *)
+ lt_cv_path_NM="$tmp_nm -B"
break
;;
*)
- case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
- *$tmp_nm*)
+ case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | $GREP -v '^ *$' | $GREP -v 'nknown ' | $GREP -v 'nvalid ' | $GREP -v 'sage: ' | sed '1q'` in
+ *$tmp_nm*|*\ \ \ [A-Za-z]\ *|*[0-9a-f][0-9a-f][0-9a-f]\ [A-Za-z]\ *)
lt_cv_path_NM="$tmp_nm -p"
break
;;
@@ -10817,7 +10820,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10820 "configure"
+#line 10823 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10923,7 +10926,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10926 "configure"
+#line 10929 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H