From: David Bremner Date: Mon, 5 Sep 2011 02:50:36 +0000 (-0300) Subject: lib/gen-version-script.sh: replace --defined argument to nm with awk X-Git-Tag: 0.8_rc0~3^2~4 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=80212b13294cababfb41f643765ca00bdf8e55dd lib/gen-version-script.sh: replace --defined argument to nm with awk OpenBSD nm apparently doesn't support --defined. The awk condition is based on the assumption that all defined symbols have some hex number in the first column. Thanks to Matthias Guedemann reporting the problem, and an earlier version of this patch. --- diff --git a/lib/gen-version-script.sh b/lib/gen-version-script.sh index ec801966..bf152cc9 100644 --- a/lib/gen-version-script.sh +++ b/lib/gen-version-script.sh @@ -12,7 +12,7 @@ HEADER=$1 shift printf '{\nglobal:\n' -nm --defined $* | awk '$3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \ +nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \ while read sym; do demangled=$(c++filt $sym) case $demangled in