From 80212b13294cababfb41f643765ca00bdf8e55dd Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 4 Sep 2011 23:50:36 -0300 Subject: [PATCH] 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. --- lib/gen-version-script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.43.0