/hg/icedtea: 11 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Thu May 20 06:51:32 PDT 2010


changeset 40357adde7f6 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=40357adde7f6
author: Andrew John Hughes <ahughes at redhat.com>
date: Wed May 19 19:39:45 2010 +0100

	Patch splashscreen to build against libpng 1.4.

	2010-05-19 Andrew John Hughes <ahughes at redhat.com>

	 Patch splashscreen to build against libpng 1.4.
		* Makefile.am: Bump JDK changeset and SHA256 sum.


changeset 216f095954ab in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=216f095954ab
author: Xerxes R?nby <xerxes at zafena.se>
date: Mon Feb 01 12:28:24 2010 +0100

	Update Shark for LLVM r94686 API change.

	2010-02-01 Xerxes R?nby <xerxes at zafena.se>

	 * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
	(SharkCompiler::SharkCompiler): Use sharkContext::module
	instead of sharkContext::module_provider when using LLVM 2.7
	to handle LLVM r94686 API change.
		* ports/hotspot/src/share/vm/shark/sharkContext.hpp
	(sharkContext::module): Made public when using LLVM 2.7.
	(sharkContext::module_provider): Undefine when using LLVM 2.7.
		* ports/hotspot/src/share/vm/shark/llvmHeaders.hpp
	(llvm/ModuleProvider.h): Undefine when using LLVM 2.7.


changeset 3f733a43a8b2 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=3f733a43a8b2
author: Andrew John Hughes <ahughes at redhat.com>
date: Thu May 20 14:10:23 2010 +0100

	Re-designed frame embedding code so that the applet is dynamically
	packed into given handle. This increases stability and breaks
	reliance on the assumption that the browser will always provide a
	handle in a certain sequence.

	2010-02-02 Deepak Bhole <dbhole at redhat.com>

	 * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java:
	Re-designed frame embedding code so that the applet is
	dynamically packed into given handle.


changeset d145cab2903c in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=d145cab2903c
author: Deepak Bhole <dbhole at redhat.com>
date: Tue Feb 02 16:21:26 2010 -0500

	Added tests for JSObject.eval()


changeset 5fe7d106e8c7 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=5fe7d106e8c7
author: Deepak Bhole <dbhole at redhat.com>
date: Wed Feb 03 11:59:46 2010 -0500

	Encode new lines, carriage returns, and other special characters
	before sending them to Java side (de-coding code is already in
	effect on Java side).


changeset 4d70695b8a8a in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=4d70695b8a8a
author: Gary Benson <gbenson at redhat.com>
date: Thu May 20 14:21:12 2010 +0100

	Strip stupid options that llvm-config supplies

	2010-02-12 Gary Benson <gbenson at redhat.com>

	 * configure.ac: Strip stupid options that llvm-config
	supplies.


changeset ad06363a6947 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=ad06363a6947
author: Andrew John Hughes <ahughes at redhat.com>
date: Mon Feb 15 17:25:12 2010 +0000

	Add class file rewriter which will be used to solve the Rhino issue:
	http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=179 once
	hooked into the build.

	2010-02-15 Andrew John Hughes <ahughes at redhat.com>

	 * rewriter/agpl-3.0.txt,
		* rewriter/com/redhat/rewriter/ClassRewriter.java: Add class
	rewriter for fixing Rhino classes to use the
	com.sun.org.mozilla namespace, along with corresponding
	license.


changeset da2bf06b20e0 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=da2bf06b20e0
author: Edward Nevill (ed at camswl.com)
date: Thu May 20 14:28:33 2010 +0100

	Support generation of native libraries for JCK on ARM.

	2009-10-05 Edward Nevill <ed at camswl.com>

	 * contrib/jck/compile-native-code.sh: Support for
	generation of native libraries for JCK on ARM


changeset 6178ca4346ed in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=6178ca4346ed
author: Gary Benson <gbenson at redhat.com>
date: Tue Feb 16 15:54:50 2010 +0000

	Add s390 support to TCK setup helper script

	2010-02-16 Gary Benson <gbenson at redhat.com>

	 * contrib/jck/compile-native-code.sh: Add s390.


changeset c2fd9278967c in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=c2fd9278967c
author: Xerxes R?nby <xerxes at zafena.se>
date: Wed Feb 17 14:46:46 2010 +0100

	Implemented Shark host CPU feature autotuner using LLVM 2.7 APIs.

	2010-02-17 Xerxes R?nby <xerxes at zafena.se>

	 * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
	(SharkCompiler::SharkCompiler): Implement host CPU feature
	autotuner using LLVM 2.7 APIs.
		* ports/hotspot/src/share/vm/shark/llvmHeaders.hpp: Define
	llvm/ADT/StringMap.h and llvm/System/Host.h depending on
	LLVM version. Allways define llvm/Support/CommandLine.h.


changeset 8dc6e1ff8ccf in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8dc6e1ff8ccf
author: Andrew John Hughes <ahughes at redhat.com>
date: Thu May 20 14:37:32 2010 +0100

	Fix a number of issues and enable the Rhino rewriter in the build.

	2010-02-17 Andrew John Hughes <ahughes at redhat.com>

	 PR icedtea/179
		* ChangeLog: Remove rogue whitespace highlighted by emacs.
		* Makefile.am: (REWRITER_SRCS): Sources for class file
	rewriter. Only set RHINO_JAR when WITH_RHINO is set. Point
	to rewritten JAR file in build directory. Add rewriter and
	license to EXTRA_DIST. Make icedtea, icedtea-debug and
	icedtea-boot depend on rewrite-rhino.stamp.
	(stamps/rewriter.stamp): Build the class file rewriter.
	(stamps/rewrite-rhino.stamp): Rewrite the system Rhino JAR
	file to use the sun.org.mozilla namespace to avoid conflicts.
	(rewriter): New alias for stamps/rewriter.stamp. (rewrite-
	rhino): Likewise for stamps/rewrite-rhino.stamp.
		* patches/icedtea-rhino.patch: Copy rather than symlink the
	JAR file. Only drop the internal suffix on the javascript
	package names.
		* rewriter/com/redhat/rewriter/ClassRewriter.java: (executor):
	Use a single threaded executor when debugging is enabled.
	(tasks): Store the Futures returned by the executor for
	later checking. (main(String[])): Log what happens when
	processFile returns and handle any exceptions using Futures.
	(call()): Ensure srcDir/destDir replacement always matches
	with a trailing slash to avoid odd rewrites. Loop directory
	creation to avoid possible race issues. Increase logging and
	fix a number of issues with the rewrite:
		  * Fix off-by-one loop bug so final entry is inspected.
		  * Handle double entries which occur with 8-byte entries
	(doubles and longs): http://java.sun.com/docs/books/jvms/sec
	ond_edition/html/ClassFile.doc.html#16628


diffstat:

16 files changed, 1719 insertions(+), 404 deletions(-)
ChangeLog                                                |  105 +
Makefile.am                                              |   62 -
configure.ac                                             |   37 
contrib/jck/compile-native-code.sh                       |    6 
patches/icedtea-rhino.patch                              |   20 
plugin/icedteanp/IcedTeaNPPlugin.cc                      |   33 
plugin/icedteanp/java/sun/applet/PluginAppletViewer.java |  788 +++++++-------
plugin/tests/LiveConnect/PluginTest.java                 |   11 
plugin/tests/LiveConnect/common.js                       |    3 
plugin/tests/LiveConnect/index.html                      |    2 
plugin/tests/LiveConnect/jjs_eval_test.js                |   57 +
ports/hotspot/src/share/vm/shark/llvmHeaders.hpp         |    7 
ports/hotspot/src/share/vm/shark/sharkCompiler.cpp       |   32 
ports/hotspot/src/share/vm/shark/sharkContext.hpp        |    6 
rewriter/agpl-3.0.txt                                    |  661 +++++++++++
rewriter/com/redhat/rewriter/ClassRewriter.java          |  293 +++++

diffs (truncated from 2570 to 500 lines):

diff -r 962e6e2b70f5 -r 8dc6e1ff8ccf ChangeLog
--- a/ChangeLog	Wed May 19 17:34:15 2010 +0100
+++ b/ChangeLog	Thu May 20 14:37:32 2010 +0100
@@ -1,3 +1,108 @@ 2010-01-26 Andrew John Hughes  <ahughes@
+2010-02-17 Andrew John Hughes  <ahughes at redhat.com>
+
+	PR icedtea/179
+	* ChangeLog: Remove rogue whitespace highlighted
+	by emacs.
+	* Makefile.am:
+	(REWRITER_SRCS): Sources for class file rewriter.
+	Only set RHINO_JAR when WITH_RHINO is set.  Point
+	to rewritten JAR file in build directory.  Add
+	rewriter and license to EXTRA_DIST.  Make icedtea,
+	icedtea-debug and icedtea-boot depend on rewrite-rhino.stamp.
+	(stamps/rewriter.stamp): Build the class file rewriter.
+	(stamps/rewrite-rhino.stamp): Rewrite the system Rhino JAR
+	file to use the sun.org.mozilla namespace to avoid conflicts.
+	(rewriter): New alias for stamps/rewriter.stamp.
+	(rewrite-rhino): Likewise for stamps/rewrite-rhino.stamp.
+	* patches/icedtea-rhino.patch:
+	Copy rather than symlink the JAR file.  Only drop the
+	internal suffix on the javascript package names.
+	* rewriter/com/redhat/rewriter/ClassRewriter.java:
+	(executor): Use a single threaded executor when
+	debugging is enabled.
+	(tasks): Store the Futures returned by the executor
+	for later checking.
+	(main(String[])): Log what happens when processFile
+	returns and handle any exceptions using Futures.
+	(call()): Ensure srcDir/destDir replacement always
+	matches with a trailing slash to avoid odd rewrites.
+	Loop directory creation to avoid possible race issues.
+	Increase logging and fix a number of issues with the rewrite:
+	  * Fix off-by-one loop bug so final entry is inspected.
+	  * Handle double entries which occur with 8-byte entries
+	    (doubles and longs):
+	http://java.sun.com/docs/books/jvms/second_edition/html/ClassFile.doc.html#16628
+
+2010-02-17  Xerxes RÃ¥nby  <xerxes at zafena.se>
+
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+	(SharkCompiler::SharkCompiler): Implement host CPU feature
+	autotuner using LLVM 2.7 APIs.
+	* ports/hotspot/src/share/vm/shark/llvmHeaders.hpp:
+	Define llvm/ADT/StringMap.h and llvm/System/Host.h
+	depending on LLVM version.
+	Allways define llvm/Support/CommandLine.h.
+
+2010-02-16  Gary Benson  <gbenson at redhat.com>
+
+	* contrib/jck/compile-native-code.sh: Add s390.
+
+2009-10-05  Edward Nevill    <ed at camswl.com>
+
+	* contrib/jck/compile-native-code.sh:
+	Support for generation of native libraries for JCK on ARM
+
+2010-02-15 Andrew John Hughes  <ahughes at redhat.com>
+
+	* rewriter/agpl-3.0.txt,
+	* rewriter/com/redhat/rewriter/ClassRewriter.java:
+	Add class rewriter for fixing Rhino classes
+	to use the com.sun.org.mozilla namespace,
+	along with corresponding license.
+
+2010-02-12  Gary Benson  <gbenson at redhat.com>
+
+	* configure.ac: Strip stupid options that llvm-config supplies.
+
+2010-02-03  Deepak Bhole <dbhole at redhat.com>
+
+	* plugin/icedteanp/IcedTeaNPPlugin.cc 
+	(plugin_create_applet_tag): Encode new lines, carriage returns, and other
+	special characters before sending them to Java side (de-coding code is
+	already in effect on Java side).
+
+2010-02-02  Deepak Bhole <dbhole at redhat.com>
+
+	* plugin/tests/LiveConnect/PluginTest.java
+	(jjsEvalTest): New function. Calls JSObject.eval() with given string.
+	* plugin/tests/LiveConnect/common.js: Added eval test suite as one of the
+	run options.
+	* plugin/tests/LiveConnect/index.html: Same.
+	* plugin/tests/LiveConnect/jjs_eval_test.js: Eval tests.
+
+2010-02-02  Deepak Bhole <dbhole at redhat.com>
+
+	* plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Re-designed frame
+	embedding code so that the applet is dynamically packed into given handle.
+
+2010-02-01  Xerxes RÃ¥nby  <xerxes at zafena.se>
+
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+	(SharkCompiler::SharkCompiler): Use sharkContext::module
+	instead of sharkContext::module_provider when using LLVM 2.7
+	to handle LLVM r94686 API change.
+	* ports/hotspot/src/share/vm/shark/sharkContext.hpp
+	(sharkContext::module): Made public when using LLVM 2.7.
+	(sharkContext::module_provider): Undefine when using LLVM 2.7.
+	* ports/hotspot/src/share/vm/shark/llvmHeaders.hpp
+	(llvm/ModuleProvider.h): Undefine when using LLVM 2.7.
+
+2010-05-19 Andrew John Hughes  <ahughes at redhat.com>
+
+	Patch splashscreen to build against libpng 1.4.
+	* Makefile.am:
+	Bump JDK changeset and SHA256 sum.
+
 2010-01-26 Andrew John Hughes  <ahughes at redhat.com>
 
 	* Makefile.am:
diff -r 962e6e2b70f5 -r 8dc6e1ff8ccf Makefile.am
--- a/Makefile.am	Wed May 19 17:34:15 2010 +0100
+++ b/Makefile.am	Thu May 20 14:37:32 2010 +0100
@@ -6,7 +6,7 @@ HOTSPOT_CHANGESET = 468593ef6b33
 HOTSPOT_CHANGESET = 468593ef6b33
 JAXP_CHANGESET  = 826bafcb6c4a
 JAXWS_CHANGESET = 1661166c82dc
-JDK_CHANGESET = 5d5ee1c92a1b
+JDK_CHANGESET = 3d1a836736bf
 LANGTOOLS_CHANGESET = a0499f48ec96
 OPENJDK_CHANGESET = 195fcceefddc
 
@@ -14,7 +14,7 @@ HOTSPOT_SHA256SUM = fc3a387938c2e479ff71
 HOTSPOT_SHA256SUM = fc3a387938c2e479ff71989d227baa655b8a68079a144f717081b40e15696cdb
 JAXP_SHA256SUM = 42d004e51a1f01d146ad230ce48996ddf8da3719fe571a41653f431d6b2e8a7b
 JAXWS_SHA256SUM = 4523909cd46fd61b5c6670bf932099d5899236a37a4058e7b2bcb855e503a0e4
-JDK_SHA256SUM = 5f6035185d862b36e0cb7ca4f5d5f7160914681dfcb33900fac45db1c439668e
+JDK_SHA256SUM = 637372a089a1d50dc85d098e8b897d01e001730dd0ed94a6d347243272dedeeb
 LANGTOOLS_SHA256SUM = 96f6be5d89195353f55ef775e0dec9bd9a5da7f869aba6ed428e4a2cac806991
 OPENJDK_SHA256SUM = 93c536e6bc4e962050a00321e88e694fc4e0000e2ad887b8de22830bfda2649f
 
@@ -258,6 +258,8 @@ OPENJDK_BOOT_TREE = stamps/patch-boot.st
 
 PLUGIN_TEST_SRCS = $(abs_top_srcdir)/plugin/tests/LiveConnect/*.java
 
+REWRITER_SRCS = $(abs_top_srcdir)/rewriter/com/redhat/rewriter/ClassRewriter.java
+
 # Patch list
 
 ICEDTEA_PATCHES = \
@@ -507,7 +509,6 @@ ICEDTEA_ENV = \
 	JDK_HOME="" \
 	QUIETLY="" \
 	ANT_RESPECT_JAVA_HOME="TRUE" \
-	RHINO_JAR="$(RHINO_JAR)" \
 	DISTRIBUTION_ID="$(DIST_ID)" \
 	DERIVATIVE_ID="$(ICEDTEA_NAME) $(PACKAGE_VERSION)$(ICEDTEA_REV)" \
 	ALT_JIBX_LIBS_PATH="$(JIBX_DEPS_DIR)" \
@@ -542,6 +543,11 @@ if HAS_HOTSPOT_REVISION
 if HAS_HOTSPOT_REVISION
 ICEDTEA_ENV += \
 	HOTSPOT_BUILD_VERSION="$(HOTSPOT_REVISION)"
+endif
+
+if WITH_RHINO
+ICEDTEA_ENV += \
+	RHINO_JAR="$(abs_top_builddir)/rhino/rhino.jar"
 endif
 
 # OpenJDK boot build environment.
@@ -729,7 +735,9 @@ EXTRA_DIST = $(GENERATED_FILES) $(top_sr
 	tapset/hotspot.stp.in \
 	tapset/hotspot_jni.stp.in \
 	scripts/jni_create_stap.c \
-	scripts/jni_desc
+	scripts/jni_desc \
+	rewriter/agpl-3.0.txt \
+	$(REWRITER_SRCS)
 
 # Top-Level Targets
 # =================
@@ -1781,7 +1789,8 @@ stamps/icedtea.stamp: stamps/bootstrap-d
 stamps/icedtea.stamp: stamps/bootstrap-directory-symlink-stage2.stamp \
  stamps/download.stamp stamps/extract.stamp $(OPENJDK_TREE) \
  stamps/plugin.stamp $(JNLP_ABOUT_TARGET) stamps/cacao.stamp \
- stamps/netx-dist.stamp stamps/liveconnect-dist.stamp stamps/pulse-java.stamp
+ stamps/netx-dist.stamp stamps/liveconnect-dist.stamp stamps/pulse-java.stamp \
+ stamps/rewrite-rhino.stamp
 	$(ARCH_PREFIX) $(MAKE) \
 	  $(ICEDTEA_ENV) \
 	  -C openjdk/ \
@@ -1864,7 +1873,8 @@ stamps/icedtea-debug.stamp: stamps/boots
 stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink-stage2.stamp \
  stamps/download.stamp stamps/extract.stamp $(OPENJDK_TREE) \
  stamps/plugin.stamp $(JNLP_ABOUT_TARGET) stamps/cacao.stamp \
- stamps/netx-dist.stamp stamps/liveconnect-dist.stamp stamps/pulse-java.stamp
+ stamps/netx-dist.stamp stamps/liveconnect-dist.stamp stamps/pulse-java.stamp \
+ stamps/rewrite-rhino.stamp
 	$(ARCH_PREFIX) $(MAKE) \
 	  $(ICEDTEA_ENV) \
 	  -C openjdk/ \
@@ -1975,7 +1985,8 @@ clean-icedtea-debug-stage2:
 
 stamps/icedtea-boot.stamp: stamps/bootstrap-directory-symlink-stage1.stamp \
  stamps/download.stamp $(OPENJDK_BOOT_TREE) stamps/plugs.stamp \
- stamps/netx-dist.stamp stamps/liveconnect-dist.stamp stamps/cacao.stamp
+ stamps/netx-dist.stamp stamps/liveconnect-dist.stamp stamps/cacao.stamp \
+ stamps/rewrite-rhino.stamp
 	$(ARCH_PREFIX) $(MAKE) \
 	  $(ICEDTEA_ENV_BOOT) \
 	  -C openjdk-boot \
@@ -2269,6 +2280,39 @@ endif
 	rm -f stamps/pulse-java*.stamp
 
 # end of pulse-java
+
+# Rhino support
+
+stamps/rewriter.stamp: $(INITIAL_BOOTSTRAP_LINK_STAMP)
+if WITH_RHINO
+	(cd $(abs_top_srcdir)/rewriter ; \
+	 $(ICEDTEA_BOOT_DIR)/bin/javac -g \
+	 -d $(abs_top_builddir)/rewriter $(REWRITER_SRCS) \
+	)
+endif
+	mkdir -p stamps
+	touch stamps/rewriter.stamp
+
+stamps/rewrite-rhino.stamp: stamps/rewriter.stamp $(RHINO_JAR)
+if WITH_RHINO
+	mkdir -p rhino/rhino.{old,new}
+	(cd rhino/rhino.old ; jar xf $(RHINO_JAR))
+	$(ICEDTEA_BOOT_DIR)/bin/java -cp $(abs_top_builddir)/rewriter \
+	  com.redhat.rewriter.ClassRewriter \
+	  $(abs_top_builddir)/rhino/rhino.old $(abs_top_builddir)/rhino/rhino.new \
+	  org.mozilla sun.org.mozilla
+	(cd rhino/rhino.old ; \
+	 for files in `find -type f -not -name '*.class'` ; do \
+	   new_file=../rhino.new/`echo $$files|sed -e 's#org#sun/org#'` ; \
+	   mkdir -p `dirname $$new_file` ; \
+	   cp -v $$files $$new_file ; \
+	   sed -ie 's#org\.mozilla#sun.org.mozilla#g' $$new_file ; \
+	 done \
+	)
+	(cd rhino/rhino.new ; jar cfm ../rhino.jar META-INF/MANIFEST.MF sun )
+endif
+	mkdir -p stamps
+	touch stamps/rewrite-rhino.stamp
 
 # VisualVM
 
@@ -2785,6 +2829,10 @@ plugin: stamps/plugin.stamp
 
 plugin-tests: stamps/plugin-tests.stamp
 
+rewriter: stamps/rewriter.stamp
+
+rewrite-rhino: stamps/rewrite-rhino.stamp
+
 plugs: stamps/plugs.stamp
 
 pulse-java: stamps/pulse-java.stamp
diff -r 962e6e2b70f5 -r 8dc6e1ff8ccf configure.ac
--- a/configure.ac	Wed May 19 17:34:15 2010 +0100
+++ b/configure.ac	Thu May 20 14:37:32 2010 +0100
@@ -447,12 +447,39 @@ if test "x${SHARK_BUILD_TRUE}" = x || te
 if test "x${SHARK_BUILD_TRUE}" = x || test "x${ADD_SHARK_BUILD_TRUE}" = x; then
   FIND_TOOL([LLVM_CONFIG], [llvm-config])
   llvm_components="engine nativecodegen"
-  LLVM_CFLAGS=`$LLVM_CONFIG --cflags $llvm_components | \
-    sed -e 's/-O.//g' | sed -e 's/-fomit-frame-pointer//g' | \
-    sed -e 's/-pedantic//g' | sed -e 's/-D_DEBUG//g'`
+  dnl LLVM_CFLAGS
+  LLVM_CFLAGS=
+  for flag in $($LLVM_CONFIG --cxxflags $llvm_components); do
+    if echo "$flag" | grep -q '^-[[ID]]'; then
+      if test "$flag" != "-D_DEBUG"; then
+        if test "x$LLVM_CFLAGS" != "x"; then
+          LLVM_CFLAGS="$LLVM_CFLAGS "
+        fi
+        LLVM_CFLAGS="$LLVM_CFLAGS$flag"
+      fi
+    fi
+  done
+  dnl LLVM_LDFLAGS
+  LLVM_LDFLAGS=
+  for flag in $($LLVM_CONFIG --ldflags $llvm_components); do
+    if echo "$flag" | grep -q '^-L'; then
+      if test "x$LLVM_LDFLAGS" != "x"; then
+        LLVM_LDFLAGS="$LLVM_LDFLAGS "
+      fi
+      LLVM_LDFLAGS="$LLVM_LDFLAGS$flag"
+    fi
+  done
+  dnl LLVM_LIBS
+  LLVM_LIBS=
+  for flag in $($LLVM_CONFIG --libs $llvm_components); do
+    if echo "$flag" | grep -q '^-l'; then
+      if test "x$LLVM_LIBS" != "x"; then
+        LLVM_LIBS="$LLVM_LIBS "
+      fi
+      LLVM_LIBS="$LLVM_LIBS$flag"
+    fi
+  done
   LLVM_CFLAGS="$LLVM_CFLAGS -DSHARK_LLVM_VERSION=`$LLVM_CONFIG --version | sed 's/\.//;s/svn.*//'`"
-  LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags $llvm_components`
-  LLVM_LIBS=`$LLVM_CONFIG --libs $llvm_components`
 fi
 AC_SUBST(LLVM_CFLAGS)
 AC_SUBST(LLVM_LDFLAGS)
diff -r 962e6e2b70f5 -r 8dc6e1ff8ccf contrib/jck/compile-native-code.sh
--- a/contrib/jck/compile-native-code.sh	Wed May 19 17:34:15 2010 +0100
+++ b/contrib/jck/compile-native-code.sh	Thu May 20 14:37:32 2010 +0100
@@ -19,6 +19,12 @@ fi
 
 arch=$(uname -m)
 case "$arch" in
+  arm*)
+    MFLAG=
+    ;;
+  s390)
+    MFLAG=-m31
+    ;;
   i?86|ppc)
     MFLAG=-m32
     ;;
diff -r 962e6e2b70f5 -r 8dc6e1ff8ccf patches/icedtea-rhino.patch
--- a/patches/icedtea-rhino.patch	Wed May 19 17:34:15 2010 +0100
+++ b/patches/icedtea-rhino.patch	Thu May 20 14:37:32 2010 +0100
@@ -54,7 +54,7 @@ diff -Nru openjdk.orig/jdk/make/common/R
  	$(CP) $(RT_JAR) $(JRE_IMAGE_DIR)/lib/rt.jar
  	$(CP) $(RESOURCES_JAR) $(JRE_IMAGE_DIR)/lib/resources.jar
  	$(CP) $(JSSE_JAR) $(JRE_IMAGE_DIR)/lib/jsse.jar
-+	$(LN) -sf $(RHINO_JAR) $(JRE_IMAGE_DIR)/lib/rhino.jar
++	$(CP) $(RHINO_JAR) $(JRE_IMAGE_DIR)/lib/rhino.jar
  	@# Generate meta-index to make boot and extension class loaders lazier
  	$(CD) $(JRE_IMAGE_DIR)/lib && \
  	    $(BOOT_JAVA_CMD) -jar $(BUILDMETAINDEX_JARFILE) \
@@ -66,7 +66,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla
  
  package com.sun.script.javascript;
 -import sun.org.mozilla.javascript.internal.*;
-+import org.mozilla.javascript.*;
++import sun.org.mozilla.javascript.*;
  import javax.script.*;
  import java.util.*;
  
@@ -78,7 +78,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla
  
  import javax.script.Invocable;
 -import sun.org.mozilla.javascript.internal.*;
-+import org.mozilla.javascript.*;
++import sun.org.mozilla.javascript.*;
  
  /**
   * This class implements Rhino-like JavaAdapter to help implement a Java
@@ -90,7 +90,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla
  package com.sun.script.javascript;
  
 -import sun.org.mozilla.javascript.internal.*;
-+import org.mozilla.javascript.*;
++import sun.org.mozilla.javascript.*;
  import java.util.*;
  
  /**
@@ -102,7 +102,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla
  
  import java.util.*;
 -import sun.org.mozilla.javascript.internal.*;
-+import org.mozilla.javascript.*;
++import sun.org.mozilla.javascript.*;
  
  /**
   * This class prevents script access to certain sensitive classes.
@@ -114,7 +114,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla
  package com.sun.script.javascript;
  import javax.script.*;
 -import sun.org.mozilla.javascript.internal.*;
-+import org.mozilla.javascript.*;
++import sun.org.mozilla.javascript.*;
  
  /**
   * Represents compiled JavaScript code.
@@ -126,7 +126,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla
  import javax.script.*;
  import java.util.*;
 -import sun.org.mozilla.javascript.internal.*;
-+import org.mozilla.javascript.*;
++import sun.org.mozilla.javascript.*;
  import com.sun.script.util.*;
  
  /**
@@ -138,7 +138,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla
  import com.sun.script.util.*;
  import javax.script.*;
 -import sun.org.mozilla.javascript.internal.*;
-+import org.mozilla.javascript.*;
++import sun.org.mozilla.javascript.*;
  import java.lang.reflect.Method;
  import java.io.*;
  import java.util.*;
@@ -150,7 +150,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla
  package com.sun.script.javascript;
  
 -import sun.org.mozilla.javascript.internal.*;
-+import org.mozilla.javascript.*;
++import sun.org.mozilla.javascript.*;
  import javax.script.*;
  
  /**
@@ -162,7 +162,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla
  import java.lang.reflect.*;
  import static sun.security.util.SecurityConstants.*;
 -import sun.org.mozilla.javascript.internal.*;
-+import org.mozilla.javascript.*;
++import sun.org.mozilla.javascript.*;
  
  /**
   * This wrap factory is used for security reasons. JSR 223 script
diff -r 962e6e2b70f5 -r 8dc6e1ff8ccf plugin/icedteanp/IcedTeaNPPlugin.cc
--- a/plugin/icedteanp/IcedTeaNPPlugin.cc	Wed May 19 17:34:15 2010 +0100
+++ b/plugin/icedteanp/IcedTeaNPPlugin.cc	Thu May 20 14:37:32 2010 +0100
@@ -1575,13 +1575,40 @@ plugin_create_applet_tag (int16_t argc, 
           // characters will pass through the pipe.
           if (argv[i] != '\0')
             {
-              gchar* escaped = NULL;
+              // worst case scenario -> all characters are newlines or
+              // returns, each of which translates to 5 substitutions
+              char* escaped = (char*) calloc(((strlen(argv[i])*5)+1), sizeof(char));
 
-              escaped = g_strescape (argv[i], NULL);
+              strcpy(escaped, "");
+              for (int j=0; j < strlen(argv[i]); j++)
+              {
+                  if (argv[i][j] == '\r')
+                      strcat(escaped, "&#13;");
+                  else if (argv[i][j] == '\n')
+                      strcat(escaped, "&#10;");
+                  else if (argv[i][j] == '>')
+                      strcat(escaped, "&gt;");
+                  else if (argv[i][j] == '<')
+                      strcat(escaped, "&lt;");
+                  else if (argv[i][j] == '&')
+                      strcat(escaped, "&amp;");
+                  else
+                  {
+                      char* orig_char = (char*) calloc(2, sizeof(char));
+                      orig_char[0] = argv[i][j];
+                      orig_char[1] = '\0';
+
+                      strcat(escaped, orig_char);
+
+                      free(orig_char);
+                      orig_char = NULL;
+                  }
+              }
+
               parameters = g_strconcat (parameters, "<PARAM NAME=\"", argn[i],
                                         "\" VALUE=\"", escaped, "\">", NULL);
 
-              g_free (escaped);
+              free (escaped);
               escaped = NULL;
             }
         }
diff -r 962e6e2b70f5 -r 8dc6e1ff8ccf plugin/icedteanp/java/sun/applet/PluginAppletViewer.java
--- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Wed May 19 17:34:15 2010 +0100
+++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java	Thu May 20 14:37:32 2010 +0100
@@ -91,6 +91,7 @@ import java.net.URI;
 import java.net.URI;
 import java.net.URL;
 import java.security.AccessController;
+import java.security.AllPermission;
 import java.security.PrivilegedAction;
 import java.util.Enumeration;
 import java.util.HashMap;
@@ -114,18 +115,199 @@ import com.sun.jndi.toolkit.url.UrlUtil;
   * Lets us construct one using unix-style one shot behaviors
   */
 
- class PluginAppletViewerFactory
+ class PluginAppletPanelFactory
  {
-     public PluginAppletViewer createAppletViewer(int identifier,
-                                                  long handle, int x, int y,
-                                                 URL doc, Hashtable atts) {
-         PluginAppletViewer pluginappletviewer = new PluginAppletViewer(identifier, handle, x, y, doc, atts, System.out, this);
-         return pluginappletviewer;
+
+     public AppletPanel createPanel(PluginStreamHandler streamhandler,
+                                    int identifier,
+                                    long handle, int x, int y,
+                                    final URL doc, final Hashtable atts) {
+
+         AppletViewerPanel panel = (AppletViewerPanel) AccessController.doPrivileged(new PrivilegedAction() {
+             public Object run() {
+                    try {
+                        AppletPanel panel = new NetxPanel(doc, atts, false);
+                        AppletViewerPanel.debug("Using NetX panel");
+                        PluginDebug.debug(atts.toString());
+                        return panel;
+                    } catch (Exception ex) {
+                        AppletViewerPanel.debug("Unable to start NetX applet - defaulting to Sun applet", ex);
+                        return new AppletViewerPanel(doc, atts);
+                    }
+             }
+         });



More information about the distro-pkg-dev mailing list