changeset 22824:7b93939e093e

8031064: build_vm_def.sh not working correctly for new build cross compile Summary: move nm and awk code into vm.make Reviewed-by: dsamersoff, dholmes
author dlong
date Fri, 23 Jan 2015 22:39:24 -0500
parents 11b575a5169b
children a51071796915
files make/linux/makefiles/build_vm_def.sh make/linux/makefiles/vm.make
diffstat 2 files changed, 7 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/make/linux/makefiles/build_vm_def.sh	Fri Jan 30 10:40:08 2015 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-# If we're cross compiling use that path for nm
-if [ "$CROSS_COMPILE_ARCH" != "" ]; then 
-NM=$ALT_COMPILER_PATH/nm
-else
-NM=nm
-fi
-
-$NM --defined-only $* \
-    | awk '{
-              if ($3 ~ /^_ZTV/ || $3 ~ /^gHotSpotVM/) print "\t" $3 ";"
-              if ($3 ~ /^UseSharedSpaces$/) print "\t" $3 ";"
-              if ($3 ~ /^_ZN9Arguments17SharedArchivePathE$/) print "\t" $3 ";"
-          }' \
-    | sort -u
--- a/make/linux/makefiles/vm.make	Fri Jan 30 10:40:08 2015 +0100
+++ b/make/linux/makefiles/vm.make	Fri Jan 23 22:39:24 2015 -0500
@@ -245,8 +245,14 @@
 	rm -f $@
 	cat $^ > $@
 
+VMDEF_PAT  = ^_ZTV
+VMDEF_PAT := ^gHotSpotVM|$(VMDEF_PAT)
+VMDEF_PAT := ^UseSharedSpaces$$|$(VMDEF_PAT)
+VMDEF_PAT := ^_ZN9Arguments17SharedArchivePathE$$|$(VMDEF_PAT)
+
 vm.def: $(Res_Files) $(Obj_Files)
-	sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@
+	$(QUIETLY) $(NM) --defined-only $(Obj_Files) | sort -k3 -u | \
+	awk '$$3 ~ /$(VMDEF_PAT)/ { print "\t" $$3 ";" }' > $@
 
 mapfile_ext:
 	rm -f $@