changeset 5088:0d6f95e05945

. OpenBSD nm(1) doesn't have -U or -j, so provide an OpenBSD specific implementation based on linux version. This change may be appropriate for other BSD's as well if they use mapfiles.
author kurt
date Mon, 28 Apr 2014 12:29:31 -0400
parents efdc42254e31
children 12d8178183b7
files make/bsd/makefiles/build_vm_def.sh
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/make/bsd/makefiles/build_vm_def.sh	Sun Apr 27 17:18:59 2014 -0400
+++ b/make/bsd/makefiles/build_vm_def.sh	Mon Apr 28 12:29:31 2014 -0400
@@ -7,6 +7,16 @@
 NM=nm
 fi
 
+if [ `uname` == "OpenBSD" ] ; then
+$NM $* \
+    | awk '{
+              if ($2 != "U") if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
+              if ($2 != "U") if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";"
+              if ($2 != "U") if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";"
+          }' \
+    | sort -u
+else
 $NM -Uj $* | awk '
    { if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 }
    '
+fi