Mercurial > hg > shark
changeset 5:de3c83019ef5
Now with Zero builds
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Mon, 22 Feb 2010 14:13:47 +0000 |
parents | ae1f23d5283f |
children | ae1e29fcfe57 |
files | Makefile build.sh |
diffstat | 2 files changed, 45 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Fri Feb 19 16:46:29 2010 +0000 +++ b/Makefile Mon Feb 22 14:13:47 2010 +0000 @@ -1,29 +1,22 @@ -JAVAHOME = /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 -PLATFORM = linux-amd64 -DATAMODEL = 64 +JAVADIR = /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64 +BOOTDIR = bootstrap -TARGETS = product debug +TARGETS = product debug productzero debugzero productshark debugshark default: product -BOOTDIR = $(PWD)/bootstrap - $(TARGETS): rm -Rf $(BOOTDIR) for i in 1.6.0 1.7.0/promoted; do \ mkdir -p $(BOOTDIR)/re/j2se/$$i/latest/binaries; \ - ln -s $(JAVAHOME) $(BOOTDIR)/re/j2se/$$i/latest/binaries/$(PLATFORM);\ + for j in amd64 zero shark; do \ + ln -s $(JAVADIR) $(BOOTDIR)/re/j2se/$$i/latest/binaries/linux-$$j; \ + done; \ done - $(MAKE) \ - HOTSPOT_BUILD_JOBS=5 \ - ALT_SLASH_JAVA=$(BOOTDIR) \ - ARCH_DATA_MODEL=$(DATAMODEL) \ - -C hotspot/make all_$@ copy_$@_jdk export_$@_jdk - @echo "---" - @echo "Shark is served: hotspot/build/linux/jdk-$(PLATFORM)" + sh build.sh $(BOOTDIR) $@ clean: rm -Rf $(BOOTDIR) rm -Rf hotspot/build -.PHONY: default $(TARGETS) clean +.PHONY: default $(TARGETS) build clean
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build.sh Mon Feb 22 14:13:47 2010 +0000 @@ -0,0 +1,37 @@ +if [ $# != 2 ]; then + echo 1>&2 "usage: `basename $0` BOOTDIR TARGET" + exit 1 +fi + +bootdir=$1 +case $2 in +*zero) arch=zero; mode=zero ;; +*shark) arch=shark; mode=shark ;; +*) arch=amd64; mode= ;; +esac +target=$(echo $2 | sed "s/$mode\$//") + +set -ex + +# Export variables needed for all builds +export ARCH_DATA_MODEL=64 + +# Export variables needed for Zero and Shark builds +if [ "$mode" != "" ]; then + export ZERO_BUILD=true + export ZERO_LIBARCH=amd64 + export ZERO_ENDIANNESS=little + export ZERO_ARCHDEF=AMD64 + export ZERO_ARCHFLAG=-m64 + export LIBFFI_CFLAGS=$(pkg-config --cflags libffi) + export LIBFFI_LIBS=$(pkg-config --libs libffi) +fi + +# Build it +make -C hotspot/make \ + HOTSPOT_BUILD_JOBS=5 \ + ALT_SLASH_JAVA=$PWD/$bootdir \ + all_$target$mode copy_${target}_jdk export_${target}_jdk + +set +x +echo "HotSpot is served: hotspot/build/linux/jdk-linux-$arch"