diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2022-09-13 11:26:14 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2023-01-09 12:50:53 +0000 |
commit | 5e72265660fbbfdceafbb1a5a5aad79e835e31cd (patch) | |
tree | 6fbdd27aee312c0ad2c4d35b09e631f8129870d9 /opcodes/configure | |
parent | adad40b1df5f7ebffd6c9f90e23a334cf5020db5 (diff) | |
download | binutils-gdb-5e72265660fbbfdceafbb1a5a5aad79e835e31cd.tar.gz |
libtool.m4: adjust kludge for ignoring syntax errors
LT_PATH_NM considers an nm to support -p/-B if it returns
output that names the path being checked -- but since that is itself nm
(usually with a path attached), this can trigger false positives with
errors like
/usr/bin/nm: unknown option "B" ignored"
The test currently avoids this case for the single instance of HP-UX
by deleting all but the last line of the output. Keep on doing that
(so we don't do more work than we need to), but also explicitly
eliminate references to "unknown" and "invalid", with any leading
capitalization. This handles Darwin, which says
error: nm: invalid argument '-B'
Alas, we cannot check the exit code, because some nm's return nonzero
exit codes if no symbols are found!
Things were also erroneously failing if nm had actual symbols in it,
because we were getting output that did not mention nm by name (its
usual output). Identify things that look like valid nm output and
let it through.
PR libctf/29547
* libtool.m4 (LT_PATH_NM): Explicitly filter out 'unknown'
and 'invalid' errors when looking for valid output. Let
through actual valid nm output too.
Diffstat (limited to 'opcodes/configure')
0 files changed, 0 insertions, 0 deletions