changeset 1542:4829edfaa376

Fixes PR #310. 2009-05-08 Robert Schuster <robertschuster@fsfe.org> * Makefile.am: Introduce CROSS_COMPILATION variable to icedtea-ecj and icedtea build. * configure.ac: New --enable-experimental-openjdk-cross-compilation option. * patches/icedtea-disable-cc-incompatible-sanity-checks.patch: New patch file (SCA is in place for Robert Schuster).
author Robert Schuster <robertschuster@fsfe.org>
date Fri, 08 May 2009 15:56:01 +0200
parents acaa4872ca75
children 89b733da1bbe
files ChangeLog Makefile.am configure.ac patches/icedtea-disable-cc-incompatible-sanity-checks.patch
diffstat 4 files changed, 139 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 08 14:21:44 2009 +0200
+++ b/ChangeLog	Fri May 08 15:56:01 2009 +0200
@@ -1,3 +1,12 @@
+2009-05-08  Robert Schuster  <robertschuster@fsfe.org>
+
+	* Makefile.am: Introduce CROSS_COMPILATION variable to icedtea-ecj
+	and icedtea build.
+	* configure.ac: New --enable-experimental-openjdk-cross-compilation
+	option.
+	* patches/icedtea-disable-cc-incompatible-sanity-checks.patch: New patch
+	file (SCA is in place for Robert Schuster).
+
 2009-05-08  Robert Schuster  <robertschuster@fsfe.org>
 
 	* configure.ac: Use --cxxflags instead of --cflags for llvm-config.
--- a/Makefile.am	Fri May 08 14:21:44 2009 +0200
+++ b/Makefile.am	Fri May 08 15:56:01 2009 +0200
@@ -186,6 +186,11 @@
 	NO_DOCS="true"
 endif
 
+if ENABLE_CROSS_COMPILATION
+ICEDTEA_ENV += \
+	"CROSS_COMPILATION=true"
+endif
+
 if USE_ALT_JAR
 ICEDTEA_ENV += \
 	ALT_JAR_CMD="$(ALT_JAR_CMD)"
@@ -263,6 +268,11 @@
 	NO_DOCS="true"
 endif
 
+if ENABLE_CROSS_COMPILATION
+ICEDTEA_ENV_ECJ += \
+	"CROSS_COMPILATION=true"
+endif
+
 env-ecj:
 	@echo 'unset JAVA_HOME'
 	@echo 'export $(ICEDTEA_ENV_ECJ)'
@@ -652,6 +662,7 @@
 	patches/icedtea-java2d-mitre-join.patch \
 	patches/icedtea-java2d-stroker-internal-joint.patch \
 	patches/icedtea-java2d-stroker-internal-close-joint.patch \
+	patches/icedtea-disable-cc-incompatible-sanity-checks.patch \
 	$(DISTRIBUTION_PATCHES)
 
 stamps/extract.stamp: stamps/download.stamp
--- a/configure.ac	Fri May 08 14:21:44 2009 +0200
+++ b/configure.ac	Fri May 08 15:56:01 2009 +0200
@@ -151,6 +151,15 @@
 AM_CONDITIONAL([ENABLE_DOCS], [test x$ENABLE_DOCS = xyes])
 AC_MSG_RESULT(${ENABLE_DOCS})
 
+# OpenJDK cross-compilation support which is not yet complete
+AC_MSG_CHECKING(whether to enable experimental OpenJDK cross-compilation support)
+AC_ARG_ENABLE([experimental-openjdk-cross-compilation],
+	      [AS_HELP_STRING([--enable-experimental-openjdk-cross-compilation],
+	      		      [Enable experimental OpenJDK cross-compilation support])],
+	      [ENABLE_CROSS_COMPILATION="${enableval}"], [ENABLE_CROSS_COMPILATION="${cross_compiling}"])
+AM_CONDITIONAL([ENABLE_CROSS_COMPILATION], [test x$ENABLE_CROSS_COMPILATION = xyes])
+AC_MSG_RESULT(${ENABLE_CROSS_COMPILATION})
+
 AC_MSG_CHECKING(whether to include the XRender pipeline)
 AC_ARG_ENABLE([xrender],
 	      [AS_HELP_STRING([--disable-xrender],
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-disable-cc-incompatible-sanity-checks.patch	Fri May 08 15:56:01 2009 +0200
@@ -0,0 +1,110 @@
+Index: openjdk/jdk/make/common/shared/Sanity.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/shared/Sanity.gmk	2009-03-28 18:14:30.000000000 +0100
++++ openjdk/jdk/make/common/shared/Sanity.gmk	2009-03-28 18:20:33.000000000 +0100
+@@ -75,9 +75,14 @@
+         fi )
+   endif
+   ifneq ($(ARCH), ia64)
+-    # dummy program that outputs ALSA's version (created in target sane-alsa-versioncheck)
+-    ALSA_VERSION_CHECK = $(TEMPDIR)/alsaversioncheck
+-    ALSA_VERSION = `if [ -f "$(ALSA_VERSION_CHECK)" ] ; then $(ALSA_VERSION_CHECK) ; fi`
++    ifdef CROSS_COMPILATION
++      # assume alsa version is correct and do not check it
++      ALSA_VERSION = 1.0.0
++    else
++      # dummy program that outputs ALSA's version (created in target sane-alsa-versioncheck)
++      ALSA_VERSION_CHECK = $(TEMPDIR)/alsaversioncheck
++      ALSA_VERSION = `if [ -f "$(ALSA_VERSION_CHECK)" ] ; then $(ALSA_VERSION_CHECK) ; fi`
++    endif
+   endif
+ endif
+ 
+@@ -124,6 +129,15 @@
+ # Get ALL_SETTINGS defined
+ include $(JDK_MAKE_SHARED_DIR)/Sanity-Settings.gmk
+ 
++ifndef CROSS_COMPILATION
++MORE_PHONY_RULES = \
++	sane-freetype \
++  sane-cups \
++  sane-motif \
++  sane-alsa-versioncheck \
++  sane-alsa-headers
++endif
++
+ .PHONY: \
+ 	sane-copyrightyear\
+ 	sane-settings \
+@@ -153,8 +167,6 @@
+ 	sane-outputdir \
+ 	sane-alt_bootdir \
+ 	sane-bootdir \
+-	sane-motif \
+-        sane-cups \
+ 	sane-devtools_path \
+ 	sane-compiler_path \
+ 	sane-unixcommand_path \
+@@ -172,14 +184,14 @@
+ 	sane-compiler \
+ 	sane-link \
+ 	sane-cacerts \
+-	sane-alsa-versioncheck \
+-	sane-alsa-headers \
+ 	sane-ant_version \
+ 	sane-findbugs_version \
+ 	sane-zip_version \
+ 	sane-unzip_version \
+- 	sane-msvcrt_path \
+-        sane-freetype
++	sane-msvcrt_path \
++	$(MORE_PHONY_RULES)
++
++
+ 
+ ######################################################
+ # check for COPYRIGHT_YEAR variable
+Index: openjdk/jdk/make/common/Sanity.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Sanity.gmk	2009-03-28 18:14:30.000000000 +0100
++++ openjdk/jdk/make/common/Sanity.gmk	2009-03-28 18:17:44.000000000 +0100
+@@ -93,8 +93,11 @@
+     sane-ld_options \
+     sane-ld_run_path \
+     sane-alt_bootdir \
+-    sane-bootdir \
+-    sane-alsa-headers
++    sane-bootdir
++
++ifndef CROSS_COMPILATION
++sanity-all:: sane-alsa-headers
++endif
+ 
+ ifdef OPENJDK
+ sanity-all:: sane-freetype 
+@@ -110,17 +113,21 @@
+ #   (Which only happens with a full control build. The control makefiles are
+ #    the files that set BUILD_MOTIF).
+ #   We cannot sanity check something that has not been built yet. 
+-ifeq ($(PLATFORM), linux)
+-  ifneq ($(BUILD_MOTIF), true)
++ifndef CROSS_COMPILATION
++  ifeq ($(PLATFORM), linux)
++    ifneq ($(BUILD_MOTIF), true)
+ sanity-all:: \
+-    sane-motif
++  sane-motif
++    endif
+   endif
+ endif
+ 
+ # Always check cups header paths on solaris & linux
+-ifneq ($(PLATFORM), windows)
++ifndef CROSS_COMPILATION
++  ifneq ($(PLATFORM), windows)
+ sanity-all:: \
+     sane-cups
++  endif
+ endif
+ 
+ # Always check hotspot binary paths even if we are building them from scratch