/hg/icedtea: Add -Xprefer:source so disable bootstrap works. Di...

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Mon Dec 21 05:35:05 PST 2009


changeset 03d84febc75e in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=03d84febc75e
author: Andrew John Hughes <ahughes at redhat.com>
date: Mon Dec 21 13:40:28 2009 +0000

	Add -Xprefer:source so disable bootstrap works. Disable building
	bootstrap classes when sun.awt.SunToolkit is present.

	2009-12-21 Andrew John Hughes <ahughes at redhat.com>

	 * Makefile.am: Only set ICEDTEA_BOOTSTRAP_DIRS and
	build rt-class-files when sun.awt.SunToolkit is
	missing. Support -Xprefer:source. Move MEMORY_LIMIT to
	IT_JAVACFLAGS. (liveconnect.stamp): Remove MEMORY_LIMIT.
	(netx.stamp): Remove MEMORY_LIMIT. (extra-class-
	files.stamp): Remove MEMORY_LIMIT, add system rt.jar to
	classpath. (rt-class-files.stamp): Remove MEMORY_LIMIT.
	Make conditional on LACKS_SUN_AWT_TOOLKIT.
		* configure.ac: Check for sun.awt.SunToolkit and set
	LACKS_SUN_AWT_TOOLKIT if missing.


diffstat:

3 files changed, 30 insertions(+), 6 deletions(-)
ChangeLog    |   17 +++++++++++++++++
Makefile.am  |   18 ++++++++++++------
configure.ac |    1 +

diffs (115 lines):

diff -r c865cb07202d -r 03d84febc75e ChangeLog
--- a/ChangeLog	Tue Dec 15 14:06:44 2009 +0000
+++ b/ChangeLog	Mon Dec 21 13:40:28 2009 +0000
@@ -1,3 +1,20 @@ 2009-12-15  Andrew John Hughes  <ahughes
+2009-12-21  Andrew John Hughes  <ahughes at redhat.com>
+
+	* Makefile.am:
+	Only set ICEDTEA_BOOTSTRAP_DIRS and build
+	rt-class-files when sun.awt.SunToolkit is
+	missing.  Support -Xprefer:source.  Move
+	MEMORY_LIMIT to IT_JAVACFLAGS.
+	(liveconnect.stamp): Remove MEMORY_LIMIT.
+	(netx.stamp): Remove MEMORY_LIMIT.
+	(extra-class-files.stamp): Remove MEMORY_LIMIT,
+	add system rt.jar to classpath.
+	(rt-class-files.stamp): Remove MEMORY_LIMIT.
+	Make conditional on LACKS_SUN_AWT_TOOLKIT.
+	* configure.ac:
+	Check for sun.awt.SunToolkit and set
+	LACKS_SUN_AWT_TOOLKIT if missing.
+
 2009-12-15  Andrew John Hughes  <ahughes at redhat.com>
 
 	* Makefile.am:
diff -r c865cb07202d -r 03d84febc75e Makefile.am
--- a/Makefile.am	Tue Dec 15 14:06:44 2009 +0000
+++ b/Makefile.am	Mon Dec 21 13:40:28 2009 +0000
@@ -107,6 +107,7 @@ SOURCEPATH_DIRS = $(abs_top_builddir)/ge
 SOURCEPATH_DIRS = $(abs_top_builddir)/generated:$(OPENJDK_SOURCEPATH_DIRS):$(NETX_SRCDIR)
 
 # Sources used from OpenJDK.
+if LACKS_SUN_AWT_TOOLKIT
 ICEDTEA_BOOTSTRAP_DIRS = \
 	$(JDK_SHARE)/com/sun/jdi \
 	$(JDK_SHARE)/com/sun/tools/jdi \
@@ -126,12 +127,13 @@ ICEDTEA_BOOTSTRAP_DIRS = \
 	$(JDK_SHARE)/sun/tools/java \
 	$(LANGTOOLS)/com/sun/mirror \
 	$(LANGTOOLS)/com/sun/tools/apt
+endif
 
 # Settings for javac
 
 IT_LANGUAGE_SOURCE_VERSION=5
 IT_CLASS_TARGET_VERSION=5
-IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS)
+IT_JAVAC_SETTINGS=-g -encoding utf-8 $(JAVACFLAGS) $(MEMORY_LIMIT) $(PREFER_SOURCE)
 IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION)
 
 # Conditional defintions
@@ -209,8 +211,10 @@ endif
 # as an argument to javac
 if BOOTSTRAPPING
   MEMORY_LIMIT =
+  PREFER_SOURCE = 
 else
   MEMORY_LIMIT = -J-Xmx1024m
+  PREFER_SOURCE = -Xprefer:source
 endif
 
 if WITH_CACAO
@@ -2032,7 +2036,7 @@ stamps/liveconnect.stamp: liveconnect-so
 stamps/liveconnect.stamp: liveconnect-source-files.txt stamps/netx.stamp
 	if test "x${LIVECONNECT_DIR}" != x; then \
 	  mkdir -p $(abs_top_builddir)/liveconnect ; \
-	  $(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) $(IT_JAVACFLAGS) \
+	  $(ICEDTEA_BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
 	      -d $(abs_top_builddir)/liveconnect \
 	      -classpath $(abs_top_builddir)/lib/rt:$(abs_top_builddir)/netx.build:$(SYSTEM_JDK_DIR)/jre/lib/rt.jar \
 	      -sourcepath $(SOURCEPATH_DIRS) \
@@ -2072,7 +2076,7 @@ netx-source-files.txt:
 
 stamps/netx.stamp: netx-source-files.txt stamps/rt-class-files.stamp
 	mkdir -p $(abs_top_builddir)/netx.build
-	$(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) $(IT_JAVACFLAGS) \
+	$(ICEDTEA_BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
 	    -d $(abs_top_builddir)/netx.build \
 	    -classpath $(abs_top_builddir)/lib/rt:$(SYSTEM_JDK_DIR)/jre/lib/rt.jar \
 	    -sourcepath $(SOURCEPATH_DIRS) \
@@ -2105,8 +2109,8 @@ extra-source-files.txt:
 
 stamps/extra-class-files.stamp: extra-source-files.txt stamps/netx.stamp
 	mkdir -p extra-lib
-	$(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) $(IT_JAVACFLAGS) -d extra-lib \
-	  -classpath $(abs_top_builddir)/lib/rt \
+	$(ICEDTEA_BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) -d extra-lib \
+	  -classpath $(abs_top_builddir)/lib/rt:$(SYSTEM_JDK_DIR)/jre/lib/rt.jar \
 	  -sourcepath $(abs_top_srcdir)/extra:$(SOURCEPATH_DIRS) \
 	  -bootclasspath \'\' \
 	  @extra-source-files.txt ; \
@@ -2546,10 +2550,12 @@ rt-source-files.txt: stamps/overlay.stam
 
 stamps/rt-class-files.stamp: $(INITIAL_BOOTSTRAP_LINK_STAMP) rt-source-files.txt
 	mkdir -p lib/rt
-	$(ICEDTEA_BOOT_DIR)/bin/javac $(MEMORY_LIMIT) $(IT_JAVACFLAGS) -d lib/rt \
+if LACKS_SUN_AWT_TOOLKIT
+	$(ICEDTEA_BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) -d lib/rt \
 	  -classpath $(SYSTEM_JDK_DIR)/jre/lib/rt.jar \
           -sourcepath '$(SOURCEPATH_DIRS)' \
           -bootclasspath \'\' @rt-source-files.txt ;
+endif
 	mkdir -p stamps
 	touch $@
 
diff -r c865cb07202d -r 03d84febc75e configure.ac
--- a/configure.ac	Tue Dec 15 14:06:44 2009 +0000
+++ b/configure.ac	Mon Dec 21 13:40:28 2009 +0000
@@ -199,6 +199,7 @@ IT_PR40630_CHECK
 IT_PR40630_CHECK
 IT_CHECK_FOR_CLASS([JAVAX_ANNOTATION_RESOURCE], [javax.annotation.Resource])
 IT_GETDTDTYPE_CHECK
+IT_CHECK_FOR_CLASS([SUN_AWT_TOOLKIT], [sun.awt.SunToolkit])
 IT_CHECK_ENABLE_WARNINGS
 
 FIND_RHINO_JAR



More information about the distro-pkg-dev mailing list