libtool.m4: fix the NM="/nm/over/here -B/option/with/path" case

My previous nm patch handled all cases but one -- if the user set NM in
the environment to a path which contained an option, libtool's nm
detection tries to run nm against a copy of nm with the options in it:
e.g. if NM was set to "nm --blargle", and nm was found in /usr/bin, the
test would try to run "/usr/bin/nm --blargle /usr/bin/nm --blargle".
This is unlikely to be desirable: in this case we should run
"/usr/bin/nm --blargle /usr/bin/nm".

Furthermore, as part of this nm has to detect when the passed-in $NM
contains a path, and in that case avoid doing a path search itself.
This too was thrown off if an option contained something that looked
like a path, e.g. NM="nm -B../prev-gcc"; libtool then tries to run
"nm -B../prev-gcc nm" which rarely works well (and indeed it looks
to see whether that nm exists, finds it doesn't, and wrongly concludes
that nm -p or whatever does not work).

Fix all of these by clipping all options (defined as everything
including and after the first " -") before deciding whether nm
contains a path (but not using the clipped value for anything else),
and then removing all options from the path-modified nm before
looking to see whether that nm existed.

NM=my-nm now does a path search and runs e.g.
  /usr/bin/my-nm -B /usr/bin/my-nm

NM=/usr/bin/my-nm now avoids a path search and runs e.g.
  /usr/bin/my-nm -B /usr/bin/my-nm

NM="my-nm -p../wombat" now does a path search and runs e.g.
  /usr/bin/my-nm -p../wombat -B /usr/bin/my-nm

NM="../prev-binutils/new-nm -B../prev-gcc" now avoids a path search:
  ../prev-binutils/my-nm -B../prev-gcc -B ../prev-binutils/my-nm

This seems to be all combinations, including those used by GCC bootstrap
(which, before this commit, fails to bootstrap when configured
--with-build-config=bootstrap-lto, because the lto plugin is now using
--export-symbols-regex, which requires libtool to find a working nm,
while also using -B../prev-gcc to point at the lto plugin associated
with the GCC just built.)

Regenerate all affected configure scripts.

	* libtool.m4 (LT_PATH_NM): Handle user-specified NM with
	options, including options containing paths.
This commit is contained in:
Nick Alcock
2021-12-03 16:33:25 +00:00
parent ee41183df4
commit caf606c90d
12 changed files with 244 additions and 147 deletions

20
bfd/configure vendored
View File

@ -5409,25 +5409,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -11086,7 +11092,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11089 "configure" #line 11095 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11192,7 +11198,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11195 "configure" #line 11201 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

20
binutils/configure vendored
View File

@ -5273,25 +5273,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -10981,7 +10987,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10984 "configure" #line 10990 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11087,7 +11093,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11090 "configure" #line 11096 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

20
gas/configure vendored
View File

@ -4988,25 +4988,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -10696,7 +10702,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10699 "configure" #line 10705 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -10802,7 +10808,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10805 "configure" #line 10811 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

20
gprof/configure vendored
View File

@ -4890,25 +4890,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -10598,7 +10604,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10601 "configure" #line 10607 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -10704,7 +10710,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10707 "configure" #line 10713 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

20
gprofng/configure vendored
View File

@ -6457,25 +6457,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -12136,7 +12142,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 12139 "configure" #line 12145 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -12242,7 +12248,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 12245 "configure" #line 12251 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

20
ld/configure vendored
View File

@ -5745,25 +5745,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -11454,7 +11460,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11457 "configure" #line 11463 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11560,7 +11566,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11563 "configure" #line 11569 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

175
libbacktrace/configure vendored
View File

@ -5818,48 +5818,55 @@ if ${lt_cv_path_NM+:} false; then :
$as_echo_n "(cached) " >&6 $as_echo_n "(cached) " >&6
else else
if test -n "$NM"; then if test -n "$NM"; then
# Let the user override the test. # Let the user override the nm to test.
lt_cv_path_NM="$NM" lt_nm_to_check="$NM"
else else
lt_nm_to_check="${ac_tool_prefix}nm" lt_nm_to_check="${ac_tool_prefix}nm"
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
for lt_tmp_nm in $lt_nm_to_check; do fi
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for lt_tmp_nm in "$lt_nm_to_check"; do
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
IFS="$lt_save_ifs" for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
test -z "$ac_dir" && ac_dir=. IFS="$lt_save_ifs"
tmp_nm="$ac_dir/$lt_tmp_nm" test -z "$ac_dir" && ac_dir=.
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Strip out any user-provided options from the nm to test twice,
# Check to see if the nm accepts a BSD-compat flag. # the first time to test to see if nm (rather than its options) has
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # an explicit path, the second time to yield a file which can be
# nm: unknown option "B" ignored # nm'ed itself.
# Tru64's nm complains that /dev/null is an invalid object file tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`"
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in case "$tmp_nm_path" in
*/dev/null* | *'Invalid file or object type'*) */*|*\\*) tmp_nm="$lt_tmp_nm";;
lt_cv_path_NM="$tmp_nm -B" *) tmp_nm="$ac_dir/$lt_tmp_nm";;
break esac
;; 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
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in # Check to see if the nm accepts a BSD-compat flag.
*/dev/null*) # Adding the `sed 1q' prevents false positives on HP-UX, which says:
lt_cv_path_NM="$tmp_nm -p" # nm: unknown option "B" ignored
break 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
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but ;;
continue # so that we can try to find one that supports BSD flags *)
;; case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
esac *$tmp_nm*)
;; lt_cv_path_NM="$tmp_nm -p"
esac break
fi ;;
done *)
IFS="$lt_save_ifs" lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
done continue # so that we can try to find one that supports BSD flags
: ${lt_cv_path_NM=no} ;;
fi esac
;;
esac
fi
done
IFS="$lt_save_ifs"
done
: ${lt_cv_path_NM=no}
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
$as_echo "$lt_cv_path_NM" >&6; } $as_echo "$lt_cv_path_NM" >&6; }
@ -6480,7 +6487,7 @@ irix5* | irix6* | nonstopux*)
;; ;;
# This must be Linux ELF. # This must be Linux ELF.
linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) linux* | k*bsd*-gnu | kopensolaris*-gnu)
lt_cv_deplibs_check_method=pass_all lt_cv_deplibs_check_method=pass_all
;; ;;
@ -6576,6 +6583,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
plugin_option=
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
for plugin in $plugin_names; do
plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
if test x$plugin_so = x$plugin; then
plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
fi
if test x$plugin_so != x$plugin; then
plugin_option="--plugin $plugin_so"
break
fi
done
if test -n "$ac_tool_prefix"; then if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2 set dummy ${ac_tool_prefix}ar; ac_word=$2
@ -6669,6 +6689,19 @@ else
fi fi
test -z "$AR" && AR=ar test -z "$AR" && AR=ar
if test -n "$plugin_option"; then
if $AR --help 2>&1 | grep -q "\--plugin"; then
touch conftest.c
$AR $plugin_option rc conftest.a conftest.c
if test "$?" != 0; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5
$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;}
else
AR="$AR $plugin_option"
fi
rm -f conftest.*
fi
fi
test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AR_FLAGS" && AR_FLAGS=cru
@ -6873,6 +6906,11 @@ else
fi fi
test -z "$RANLIB" && RANLIB=: test -z "$RANLIB" && RANLIB=:
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
RANLIB="$RANLIB $plugin_option"
fi
fi
@ -6987,7 +7025,7 @@ osf*)
symcode='[BCDEGQRST]' symcode='[BCDEGQRST]'
;; ;;
solaris*) solaris*)
symcode='[BDRT]' symcode='[BCDRT]'
;; ;;
sco3.2v5*) sco3.2v5*)
symcode='[DT]' symcode='[DT]'
@ -7986,25 +8024,23 @@ _LT_EOF
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
$as_echo "$lt_cv_ld_force_load" >&6; } $as_echo "$lt_cv_ld_force_load" >&6; }
# Allow for Darwin 4-7 (macOS 10.0-10.3) although these are not expect to case $host_os in
# build without first building modern cctools / linker. rhapsody* | darwin1.[012])
case $host_cpu-$host_os in
*-rhapsody* | *-darwin1.[012])
_lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
*-darwin1.*) darwin1.*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
*-darwin*) darwin*) # darwin 5.x on
# darwin 5.x (macOS 10.1) onwards we only need to adjust when the # if running on 10.5 or later, the deployment target defaults
# deployment target is forced to an earlier version. # to the OS version, if on x86, and 10.4, the deployment
case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in # target defaults to 10.4. Don't you love it?
UNSET,*-darwin[89]*|UNSET,*-darwin[12][0123456789]*) case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
;; 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
_lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
10.[012][,.]*) 10.[012][,.]*)
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
;; 10.*)
*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
;; esac
esac
;; ;;
esac esac
if test "$lt_cv_apple_cc_single_mod" = "yes"; then if test "$lt_cv_apple_cc_single_mod" = "yes"; then
@ -9294,7 +9330,7 @@ _LT_EOF
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;; ;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no tmp_diet=no
if test "$host_os" = linux-dietlibc; then if test "$host_os" = linux-dietlibc; then
case $cc_basename in case $cc_basename in
@ -9803,7 +9839,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
if test "$GCC" = yes && test "$with_gnu_ld" = no; then if test "$GCC" = yes && test "$with_gnu_ld" = no; then
case $host_cpu in case $host_cpu in
hppa*64*) hppa*64*)
archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;; ;;
ia64*) ia64*)
archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
@ -9815,7 +9851,7 @@ if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
else else
case $host_cpu in case $host_cpu in
hppa*64*) hppa*64*)
archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;; ;;
ia64*) ia64*)
archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
@ -10708,7 +10744,7 @@ haiku*)
soname_spec='${libname}${release}${shared_ext}$major' soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LIBRARY_PATH shlibpath_var=LIBRARY_PATH
shlibpath_overrides_runpath=yes shlibpath_overrides_runpath=yes
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/beos/system/lib' sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes hardcode_into_libs=yes
;; ;;
@ -10815,12 +10851,7 @@ linux*oldld* | linux*aout* | linux*coff*)
;; ;;
# This must be Linux ELF. # This must be Linux ELF.
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
# uclinux* changes (here and below) have been submitted to the libtool
# project, but have not yet been accepted: they are GCC-local changes
# for the time being. (See
# https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html)
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* | uclinuxfdpiceabi)
version_type=linux version_type=linux
need_lib_prefix=no need_lib_prefix=no
need_version=no need_version=no
@ -11509,7 +11540,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11512 "configure" #line 11543 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11615,7 +11646,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11618 "configure" #line 11649 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

20
libctf/configure vendored
View File

@ -5951,25 +5951,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -11629,7 +11635,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11632 "configure" #line 11638 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11735,7 +11741,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11738 "configure" #line 11744 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

16
libtool.m4 vendored
View File

@ -3214,25 +3214,31 @@ AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break

20
opcodes/configure vendored
View File

@ -5357,25 +5357,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -11035,7 +11041,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11038 "configure" #line 11044 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -11141,7 +11147,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 11144 "configure" #line 11150 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

20
sim/configure vendored
View File

@ -6014,25 +6014,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -12635,7 +12641,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 12638 "configure" #line 12644 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -12741,7 +12747,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 12744 "configure" #line 12750 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H

20
zlib/configure vendored
View File

@ -4696,25 +4696,31 @@ else
lt_nm_to_check="$lt_nm_to_check nm" lt_nm_to_check="$lt_nm_to_check nm"
fi fi
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 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs" IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=. 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="$lt_tmp_nm";;
*) tmp_nm="$ac_dir/$lt_tmp_nm";; *) tmp_nm="$ac_dir/$lt_tmp_nm";;
esac 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. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # 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" *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
break 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*) *$tmp_nm*)
lt_cv_path_NM="$tmp_nm -p" lt_cv_path_NM="$tmp_nm -p"
break break
@ -10705,7 +10711,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10708 "configure" #line 10714 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -10811,7 +10817,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 10814 "configure" #line 10820 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H