# HG changeset patch # User Robert Schuster # Date 1242652657 -7200 # Node ID b7d03f4db639d1371552480de77d053e94218807 # Parent 8259687f8f78b9e45db877e1e15922fbfa13f693 2009-05-17 Robert Schuster * Makefile.am: Introduce CROSS_COMPILATION variable to icedtea-ecj and icedtea build. * configure.ac: New --enable-openjdk-cross-compilation option. * patches/icedtea-disable-cc-incompatible-sanity-checks.patch: New patch file (SCA is in place for Robert Schuster). diff -r 8259687f8f78 -r b7d03f4db639 ChangeLog --- a/ChangeLog Mon May 18 08:48:55 2009 +0200 +++ b/ChangeLog Mon May 18 15:17:37 2009 +0200 @@ -1,3 +1,12 @@ +2009-05-17 Robert Schuster + + * Makefile.am: Introduce CROSS_COMPILATION variable to icedtea-ecj + and icedtea build. + * configure.ac: New --enable-openjdk-cross-compilation + option. + * patches/icedtea-disable-cc-incompatible-sanity-checks.patch: New patch + file (SCA is in place for Robert Schuster). + 2009-05-17 Mark Wielaard * overlays/openjdk/jdk/src/share/classes/com/sun/media/sound/*, diff -r 8259687f8f78 -r b7d03f4db639 Makefile.am --- a/Makefile.am Mon May 18 08:48:55 2009 +0200 +++ b/Makefile.am Mon May 18 15:17:37 2009 +0200 @@ -199,6 +199,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)" @@ -276,6 +281,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)' @@ -650,6 +660,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 diff -r 8259687f8f78 -r b7d03f4db639 configure.ac --- a/configure.ac Mon May 18 08:48:55 2009 +0200 +++ b/configure.ac Mon May 18 15:17:37 2009 +0200 @@ -159,6 +159,15 @@ AM_CONDITIONAL([ENABLE_DOCS], [test x$ENABLE_DOCS = xyes]) AC_MSG_RESULT(${ENABLE_DOCS}) +# OpenJDK experimental cross-compilation support which is not yet complete +AC_MSG_CHECKING(whether to enable experimental OpenJDK cross-compilation support) +AC_ARG_ENABLE([openjdk-cross-compilation], + [AS_HELP_STRING([--enable-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], diff -r 8259687f8f78 -r b7d03f4db639 patches/icedtea-disable-cc-incompatible-sanity-checks.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-disable-cc-incompatible-sanity-checks.patch Mon May 18 15:17:37 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