IcedTea7 Zero/Shark build patch

Gary Benson gbenson at redhat.com
Mon Nov 16 09:31:13 PST 2009


Hi all,

Zero (and Shark) require different build variables to be set for the
upstream Zero than the ones we've currently been using.  This patch
should fix the way these are set.  I haven't tested this with Cacao,
or with the build-multiple-vms-at-once that doko contributed.  Is this
ok to commit?

Cheers,
Gary

-- 
http://gbenson.net/
-------------- next part --------------
diff -r 1d2d9efc77e6 Makefile.am
--- a/Makefile.am	Sun Nov 15 20:19:16 2009 +0000
+++ b/Makefile.am	Mon Nov 16 17:27:47 2009 +0000
@@ -427,21 +427,6 @@
 endif
 
 # OpenJDK build environment.
-if CORE_BUILD
-  ICEDTEA_CORE_BUILD = true
-else
-  ICEDTEA_CORE_BUILD =
-endif
-if ZERO_BUILD
-  ICEDTEA_ZERO_BUILD = true
-else
-  ICEDTEA_ZERO_BUILD =
-endif
-if SHARK_BUILD
-  ICEDTEA_SHARK_BUILD = yes
-else
-  ICEDTEA_SHARK_BUILD =
-endif
 
 JDK_UPDATE_VERSION = 0
 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION)
@@ -462,19 +447,6 @@
 	ENDORSED="-Djava.endorsed.dirs=$(ICEDTEA_ENDORSED_DIR)" \
 	CLASSPATH="" \
 	LD_LIBRARY_PATH="" \
-	CORE_BUILD="$(ICEDTEA_CORE_BUILD)" \
-	ZERO_BUILD="$(ICEDTEA_ZERO_BUILD)" \
-	ICEDTEA_SHARK_BUILD="$(ICEDTEA_SHARK_BUILD)" \
-	ZERO_LIBARCH="$(ZERO_LIBARCH)" \
-	ARCH_DATA_MODEL="$(ZERO_BITSPERWORD)" \
-	ZERO_ENDIANNESS="$(ZERO_ENDIANNESS)" \
-	ZERO_ARCHDEF="$(ZERO_ARCHDEF)" \
-	ZERO_ARCHFLAG="$(ZERO_ARCHFLAG)" \
-	LIBFFI_CFLAGS="$(LIBFFI_CFLAGS)" \
-	LIBFFI_LIBS="$(LIBFFI_LIBS)" \
-	LLVM_CFLAGS="$(LLVM_CFLAGS)" \
-	LLVM_LDFLAGS="$(LLVM_LDFLAGS)" \
-	LLVM_LIBS="$(LLVM_LIBS)" \
 	FREETYPE2_HEADERS="$(FREETYPE2_CFLAGS)" \
 	FT2_LIB="$(FREETYPE2_LIBS)" \
 	ALT_PARALLEL_COMPILE_JOBS="$(PARALLEL_JOBS)" \
@@ -494,6 +466,25 @@
 	DISABLE_INTREE_EC="true" \
 	ALT_DROPS_DIR="$(abs_top_builddir)/drops"
 
+if ZERO_BUILD
+ICEDTEA_ENV += \
+	ZERO_BUILD="true"\
+	ZERO_LIBARCH="$(ZERO_LIBARCH)" \
+	ARCH_DATA_MODEL="$(ZERO_BITSPERWORD)" \
+	ZERO_ENDIANNESS="$(ZERO_ENDIANNESS)" \
+	ZERO_ARCHDEF="$(ZERO_ARCHDEF)" \
+	ZERO_ARCHFLAG="$(ZERO_ARCHFLAG)" \
+	LIBFFI_CFLAGS="$(LIBFFI_CFLAGS)" \
+	LIBFFI_LIBS="$(LIBFFI_LIBS)"
+if SHARK_BUILD
+ICEDTEA_ENV += \
+	ICEDTEA_SHARK_BUILD="true" \
+	LLVM_CFLAGS="$(LLVM_CFLAGS)" \
+	LLVM_LDFLAGS="$(LLVM_LDFLAGS)" \
+	LLVM_LIBS="$(LLVM_LIBS)"
+endif
+endif
+
 if WITH_CACAO
 ICEDTEA_ENV += \
 	ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)"
@@ -1300,7 +1291,7 @@
 	touch $@
 
 clean-extract-jaxws:
-	if [ -d $(BUILD_OUTPUT_DIR)/jaxws ] ; then
+	if [ -d $(BUILD_OUTPUT_DIR)/jaxws ] ; then \
 	  (cd openjdk/jaxws ; \
 	   $(ANT) -Doutput.dir=$(BUILD_OUTPUT_DIR)/jaxws clobber ; \
 	   cd ../../); \
@@ -1315,13 +1306,12 @@
 	  link=$$(dirname $$target | sed 's/^.*ports/openjdk/'|sed "s#hotspot/build#hotspot/make#"); \
 	  ln -sfv $$target $$link; \
 	done
-	if ! test "x$(ICEDTEA_CORE_BUILD)$(ICEDTEA_SHARK_BUILD)$(WITH_CACAO)" \
-	  = "xno" ; then \
+	if ! test "x$(WITH_CACAO)" = "xno" ; then \
 	  mkdir -p openjdk/jdk/src/solaris/bin/$(BUILD_ARCH_DIR) ; \
 	  ln -sf $(abs_top_builddir)/jvm.cfg \
 	    openjdk/jdk/src/solaris/bin/$(BUILD_ARCH_DIR)/jvm.cfg ; \
 	fi
-	if ! test "x$(ICEDTEA_ZERO_BUILD)$(WITH_CACAO)" = "xno"; then \
+	if ! test "x$(WITH_CACAO)" = "xno"; then \
 	  ln -sf $(abs_top_builddir)/ergo.c \
 	    openjdk/jdk/src/solaris/bin/ergo_$(BUILD_ARCH_DIR).c; \
 	fi
@@ -1743,10 +1733,11 @@
 	  $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib
 endif
 if ZERO_BUILD
+if SHARK_BUILD
+	printf -- '-shark ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
+else
 	printf -- '-zero ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
 endif
-if SHARK_BUILD
-	printf -- '-shark ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
 endif
 if WITH_CACAO
 	printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
@@ -1818,10 +1809,11 @@
 	  $(BUILD_OUTPUT_DIR)-debug/j2sdk-image/jre/lib
 endif
 if ZERO_BUILD
+if SHARK_BUILD
+	printf -- '-shark ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
+else
 	printf -- '-zero ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
 endif
-if SHARK_BUILD
-	printf -- '-shark ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
 endif
 if WITH_CACAO
 	printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
diff -r 1d2d9efc77e6 acinclude.m4
--- a/acinclude.m4	Sun Nov 15 20:19:16 2009 +0000
+++ b/acinclude.m4	Mon Nov 16 17:27:47 2009 +0000
@@ -718,16 +718,6 @@
   AC_MSG_RESULT($use_zero)
   AM_CONDITIONAL(ZERO_BUILD, test "x${use_zero}" = xyes)
 
-  use_core=no
-  if test "x${WITH_CACAO}" != "xno"; then
-    use_core=yes;
-  elif test "x${use_zero}" = "xyes"; then
-    if test "x${use_shark}" = "xno"; then
-      use_core=yes;
-    fi
-  fi
-  AM_CONDITIONAL(CORE_BUILD, test "x${use_core}" = xyes)
-
   ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
   dnl can't use AC_CHECK_SIZEOF on multilib
   case "${ZERO_LIBARCH}" in


More information about the distro-pkg-dev mailing list