1 From beca4a2c25ee86e4020f8b8bddc4d8e0ed3430b3 Mon Sep 17 00:00:00 2001
2 From: Andrew Childs <andrew.childs@bibo.com.ph>
3 Date: Tue, 22 Feb 2022 11:28:04 +0900
4 Subject: [PATCH] Revert "libtool.m4: fix nm BSD flag detection"
6 This reverts commit bef9ef8ca0f941d743c77cc55b5fe7985990b2a7.
9 libtool.m4 | 88 ++++++++++++++++++++++++++----------------------------
10 2 files changed, 43 insertions(+), 54 deletions(-)
12 diff --git a/ChangeLog b/ChangeLog
13 index 18e8b6835da..c12f07403c3 100644
18 * src-release.sh (GDB_SUPPPORT_DIRS): Add libbacktrace.
20 -2021-09-27 Nick Alcock <nick.alcock@oracle.com>
23 - * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided
24 - NM, if there is one. Run nm on itself, not on /dev/null, to avoid
25 - errors from nms that refuse to work on non-regular files. Remove
26 - other workarounds for this problem. Strip out blank lines from the
29 2021-09-27 Nick Alcock <nick.alcock@oracle.com>
32 diff --git a/libtool.m4 b/libtool.m4
33 index a216bb14e99..7a711249304 100644
36 @@ -3200,55 +3200,53 @@ _LT_DECL([], [file_magic_cmd], [1],
40 -# find the pathname to a BSD- or MS-compatible name lister, and any flags
41 -# needed to make it compatible
42 +# find the pathname to a BSD- or MS-compatible name lister
43 AC_DEFUN([LT_PATH_NM],
44 [AC_REQUIRE([AC_PROG_CC])dnl
45 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
46 [if test -n "$NM"; then
47 - # Let the user override the nm to test.
48 - lt_nm_to_check="$NM"
50 - lt_nm_to_check="${ac_tool_prefix}nm"
51 - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
52 - lt_nm_to_check="$lt_nm_to_check nm"
55 - for lt_tmp_nm in $lt_nm_to_check; do
56 - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
57 - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
59 - test -z "$ac_dir" && ac_dir=.
60 - case "$lt_tmp_nm" in
61 - */*|*\\*) tmp_nm="$lt_tmp_nm";;
62 - *) tmp_nm="$ac_dir/$lt_tmp_nm";;
64 - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
65 - # Check to see if the nm accepts a BSD-compat flag.
66 - # Adding the `sed 1q' prevents false positives on HP-UX, which says:
67 - # nm: unknown option "B" ignored
68 - case `"$tmp_nm" -B "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
69 - *$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
73 - case `"$tmp_nm" -p "$tmp_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
75 - lt_cv_path_NM="$tmp_nm -p"
79 - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
80 - continue # so that we can try to find one that supports BSD flags
89 - : ${lt_cv_path_NM=no}])
90 + # Let the user override the test.
93 + lt_nm_to_check="${ac_tool_prefix}nm"
94 + if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
95 + lt_nm_to_check="$lt_nm_to_check nm"
97 + for lt_tmp_nm in $lt_nm_to_check; do
98 + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
99 + for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
101 + test -z "$ac_dir" && ac_dir=.
102 + tmp_nm="$ac_dir/$lt_tmp_nm"
103 + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
104 + # Check to see if the nm accepts a BSD-compat flag.
105 + # Adding the `sed 1q' prevents false positives on HP-UX, which says:
106 + # nm: unknown option "B" ignored
107 + # Tru64's nm complains that /dev/null is an invalid object file
108 + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
109 + */dev/null* | *'Invalid file or object type'*)
110 + lt_cv_path_NM="$tmp_nm -B"
114 + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
116 + lt_cv_path_NM="$tmp_nm -p"
120 + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
121 + continue # so that we can try to find one that supports BSD flags
130 + : ${lt_cv_path_NM=no}
132 if test "$lt_cv_path_NM" != "no"; then