aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README24
-rw-r--r--classes/java-library.bbclass58
-rw-r--r--classes/java-native.bbclass9
-rw-r--r--classes/java.bbclass184
-rw-r--r--conf/layer.conf9
-rw-r--r--recipes-core/ant/ant-native_1.8.1.bb66
-rwxr-xr-xrecipes-core/ant/files/ant10
-rw-r--r--recipes-core/antlr/antlr_2.7.7.bb33
-rwxr-xr-xrecipes-core/antlr/files/runantlr11
-rw-r--r--recipes-core/bcel/bcel_5.2.bb29
-rw-r--r--recipes-core/cacao/cacaoh-openjdk-native.inc31
-rw-r--r--recipes-core/cacao/cacaoh-openjdk-native_0.99.4.bb7
-rw-r--r--recipes-core/classpath/classpath-0.98/SimpleName.diff66
-rw-r--r--recipes-core/classpath/classpath-0.98/ecj_java_dir.patch37
-rw-r--r--recipes-core/classpath/classpath-0.98/fix-gmp.patch19
-rw-r--r--recipes-core/classpath/classpath-0.98/javanet-local.patch37
-rw-r--r--recipes-core/classpath/classpath-0.98/miscompilation.patch13
-rw-r--r--recipes-core/classpath/classpath-0.98/sun-security-getproperty.patch503
-rw-r--r--recipes-core/classpath/classpath-0.98/toolwrapper-exithook.patch46
-rw-r--r--recipes-core/classpath/classpath-initial-0.93/miscompilation.patch13
-rw-r--r--recipes-core/classpath/classpath-initial_0.93.bb37
-rw-r--r--recipes-core/classpath/classpath-native.inc34
-rw-r--r--recipes-core/classpath/classpath-native_0.98.bb29
-rw-r--r--recipes-core/classpath/classpath.inc86
-rw-r--r--recipes-core/classpath/classpath_0.98.bb13
-rw-r--r--recipes-core/classpath/files/autotools.patch24
-rw-r--r--recipes-core/classpathx/gnujaf-1.1.1/datadir_java.patch23
-rw-r--r--recipes-core/classpathx/gnujaf_1.1.1.bb35
-rw-r--r--recipes-core/classpathx/gnumail-1.1.2/datadir_java.patch25
-rw-r--r--recipes-core/classpathx/gnumail_1.1.2.bb39
-rw-r--r--recipes-core/classpathx/inetlib-1.1.1/datadir_java.patch23
-rw-r--r--recipes-core/classpathx/inetlib_1.1.1.bb31
-rw-r--r--recipes-core/cup/cup_0.10k.bb47
-rwxr-xr-xrecipes-core/cup/files/cup5
-rw-r--r--recipes-core/ecj/ecj-bootstrap-native.bb38
-rw-r--r--recipes-core/ecj/ecj-initial.bb32
-rwxr-xr-xrecipes-core/ecj/files/ecj-initial.in1
-rwxr-xr-xrecipes-core/ecj/files/ecj.in12
-rw-r--r--recipes-core/ecj/libecj-bootstrap.inc68
-rw-r--r--recipes-core/ecj/libecj-bootstrap_3.6.2.bb7
-rw-r--r--recipes-core/fastjar/fastjar.inc16
-rw-r--r--recipes-core/fastjar/fastjar/jartool.patch114
-rw-r--r--recipes-core/fastjar/fastjar_0.98.bb9
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/build-hacks-native.patch15
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/disable-library-checks.patch141
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-disable-compilation.patch513
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-freetype.patch13
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-zlib.patch61
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-fix-jar-path.patch29
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-hotspot-make-arch-sane-for-x86.patch1130
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-javac-in.patch28
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-jdk-sane-x86-arch.patch240
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-sane-x86-arch-name.patch47
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-unbreak-float.patch18
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/build-hacks-native.patch15
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/disable-library-checks.patch141
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-disable-compilation.patch513
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-fix-freetype.patch13
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-fix-zlib.patch61
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-fix-jar-path.patch43
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch1130
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-javac-in.patch28
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-jdk-build-sizer-32-on-amd64.patch36
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-jdk-sane-x86-arch.patch240
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-sane-x86-arch-name.patch47
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-unbreak-float.patch18
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8.11/build-hacks-native.patch15
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8.11/disable-library-checks.patch141
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-disable-compilation.patch513
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-fix-freetype.patch13
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-fix-zlib.patch61
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-hotspot-make-arch-sane-for-x86.patch1130
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-jdk-sane-x86-arch.patch216
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-sane-x86-arch-name.patch38
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-unbreak-float.patch18
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8/build-hacks-native.patch15
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8/disable-library-checks.patch141
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-disable-compilation.patch513
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-fix-freetype.patch13
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-fix-zlib.patch61
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8/icedtea-hotspot-make-arch-sane-for-x86.patch1130
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8/icedtea-jdk-sane-x86-arch.patch186
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8/icedtea-sane-x86-arch-name.patch38
-rw-r--r--recipes-core/icedtea/icedtea6-native-1.8/icedtea-unbreak-float.patch18
-rw-r--r--recipes-core/icedtea/icedtea6-native.inc215
-rw-r--r--recipes-core/icedtea/icedtea6-native_1.7.10.bb36
-rw-r--r--recipes-core/icedtea/icedtea6-native_1.8.11.bb58
-rw-r--r--recipes-core/jacl/jacl_1.4.1.bb29
-rw-r--r--recipes-core/jakarta-commons/commons-beanutils_1.8.0.bb13
-rw-r--r--recipes-core/jakarta-commons/commons-cli_1.1.bb10
-rw-r--r--recipes-core/jakarta-commons/commons-codec_1.3.bb10
-rw-r--r--recipes-core/jakarta-commons/commons-collections3_3.2.1.bb11
-rw-r--r--recipes-core/jakarta-commons/commons-collections_2.1.1.bb9
-rw-r--r--recipes-core/jakarta-commons/commons-configuration_1.5.bb24
-rw-r--r--recipes-core/jakarta-commons/commons-digester_1.8.bb15
-rw-r--r--recipes-core/jakarta-commons/commons-discovery_0.4.bb13
-rw-r--r--recipes-core/jakarta-commons/commons-el_1.0.bb17
-rw-r--r--recipes-core/jakarta-commons/commons-fileupload_1.2.1.bb17
-rw-r--r--recipes-core/jakarta-commons/commons-httpclient_3.1.bb16
-rw-r--r--recipes-core/jakarta-commons/commons-io_1.4.bb8
-rw-r--r--recipes-core/jakarta-commons/commons-jxpath_1.3.bb13
-rw-r--r--recipes-core/jakarta-commons/commons-lang_2.4.bb9
-rw-r--r--recipes-core/jakarta-commons/commons-logging_1.1.1.bb19
-rw-r--r--recipes-core/jakarta-commons/commons-net_1.4.1.bb24
-rw-r--r--recipes-core/jakarta-commons/commons-pool_1.4.bb8
-rw-r--r--recipes-core/jakarta-commons/jakarta-commons.inc60
-rw-r--r--recipes-core/jakarta-libs/avalon-framework-api_4.3.bb34
-rw-r--r--recipes-core/jakarta-libs/bsf_2.4.0.bb33
-rw-r--r--recipes-core/jakarta-libs/log4j1.2_1.2.15.bb37
-rw-r--r--recipes-core/jakarta-libs/logkit_1.2.2.bb33
-rw-r--r--recipes-core/jakarta-libs/oro_2.0.8.bb25
-rw-r--r--recipes-core/jakarta-libs/poi_3.0.bb27
-rw-r--r--recipes-core/jakarta-libs/regexp_1.5.bb25
-rwxr-xr-xrecipes-core/jamvm/files/java-initial17
-rw-r--r--recipes-core/jamvm/jamvm-initial/jamvm-initial.patch63
-rw-r--r--recipes-core/jamvm/jamvm-initial/libffi.patch68
-rw-r--r--recipes-core/jamvm/jamvm-initial_1.4.5.bb47
-rw-r--r--recipes-core/jamvm/jamvm.inc47
-rw-r--r--recipes-core/jamvm/jamvm/jamvm-jni_h-noinst.patch13
-rw-r--r--recipes-core/jamvm/jamvm/libffi.patch69
-rw-r--r--recipes-core/jamvm/jamvm_git.bb15
-rw-r--r--recipes-core/jcraft/jsch_0.1.40.bb31
-rw-r--r--recipes-core/jcraft/jzlib_1.0.7.bb24
-rw-r--r--recipes-core/jdepend/jdepend_2.9.bb25
-rw-r--r--recipes-core/jikes/files/javac.jikes2
-rw-r--r--recipes-core/jikes/jikes-initial.bb24
-rw-r--r--recipes-core/jikes/jikes_1.22.bb36
-rwxr-xr-xrecipes-core/jlex/files/jlex5
-rw-r--r--recipes-core/jlex/jlex_1.2.6.bb47
-rw-r--r--recipes-core/junit/junit4_4.3.1.bb29
-rw-r--r--recipes-core/junit/junit_3.8.2.bb39
-rw-r--r--recipes-core/llvm/llvm-common.bb19
-rw-r--r--recipes-core/llvm/llvm-common/llvm-config10
-rw-r--r--recipes-core/llvm/llvm.inc218
-rw-r--r--recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch14
-rw-r--r--recipes-core/llvm/llvm2.9_2.9.bb25
-rw-r--r--recipes-core/openjdk/openjdk-6-common.inc518
-rw-r--r--recipes-core/openjdk/openjdk-6-release-6b18.inc100
-rw-r--r--recipes-core/openjdk/openjdk-6/build-hacks.patch31
-rw-r--r--recipes-core/openjdk/openjdk-6/cacao-disable-stackbase-check.patch12
-rw-r--r--recipes-core/openjdk/openjdk-6/cacao-libtoolize.patch18
-rw-r--r--recipes-core/openjdk/openjdk-6/cacao-vfp-compat.patch37
-rw-r--r--recipes-core/openjdk/openjdk-6/fix-llvm-libs.patch13
-rw-r--r--recipes-core/openjdk/openjdk-6/fix_hotspot_crosscompile.patch94
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-crosscompile-fix.patch229
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-fix-jar-command.patch13
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-hasgettransfer.patch131
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-hostbuildcc.patch12
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-hotspot-glibc-version.patch23
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-hotspot-isfinte.patch15
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-hotspot-isnanf.patch21
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-hotspot-loadavg.patch28
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-jdk-RTLD_NOLOAD.patch13
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-jdk-iconv-uclibc.patch39
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-jdk-remove-unused-backtrace.patch41
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-jdk-unpack-uclibc.patch12
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-launcher-stdc++.patch13
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-libnet-renaming.patch148
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-llvm_headers.patch29
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-remove_werror.patch14
-rw-r--r--recipes-core/openjdk/openjdk-6/icedtea-unbreak-float.patch18
-rw-r--r--recipes-core/openjdk/openjdk-6/jvm.cfg41
-rw-r--r--recipes-core/openjdk/openjdk-6/mkbc_returncode.patch11
-rw-r--r--recipes-core/openjdk/openjdk-6/shark-arm-linux-cpu-detection.patch113
-rw-r--r--recipes-core/openjdk/openjdk-6/shark-build-openjdkdir.patch13
-rw-r--r--recipes-core/openjdk/openjdk-6/zero-cmpswap-long.patch20
-rw-r--r--recipes-core/openjdk/openjdk-6_6b18-1.8.11.bb11
-rw-r--r--recipes-core/rhino/rhino/rhino8
-rw-r--r--recipes-core/rhino/rhino/rhino-jsc8
-rw-r--r--recipes-core/rhino/rhino_1.7r2.bb46
-rw-r--r--recipes-core/servlet-api/jsp2.0_5.5.26.bb45
-rw-r--r--recipes-core/servlet-api/servlet2.3_4.1.37.bb48
-rw-r--r--recipes-core/servlet-api/servlet2.4_5.5.26.bb41
-rw-r--r--recipes-core/xalan-j/xalan-j_2.7.1.bb65
-rw-r--r--recipes-core/xerces-j/xerces-j_2.9.1.bb61
-rw-r--r--recipes-core/xml-commons/dom4j-1.6.1/debian.patch1628
-rw-r--r--recipes-core/xml-commons/dom4j_1.6.1.bb35
-rw-r--r--recipes-core/xml-commons/jaxen_1.1.1.bb33
-rw-r--r--recipes-core/xml-commons/jaxme_0.5.2.bb64
-rw-r--r--recipes-core/xml-commons/jaxp1.3_1.3.04.bb34
-rw-r--r--recipes-core/xml-commons/jdom_1.1.bb26
-rw-r--r--recipes-core/xml-commons/xml-commons-resolver1.1_1.2.bb42
-rw-r--r--recipes-core/xml-commons/xom-1.1/04_remove_sun_import.patch27
-rw-r--r--recipes-core/xml-commons/xom_1.1.bb42
-rw-r--r--recipes-core/xml-commons/xpp2_2.1.10.bb34
-rw-r--r--recipes-core/xml-commons/xpp3_1.1.3.4.O.bb49
186 files changed, 16635 insertions, 0 deletions
diff --git a/README b/README
new file mode 100644
index 0000000..926e5bf
--- /dev/null
+++ b/README
@@ -0,0 +1,24 @@
+This layer depends on:
+
+URI: git://git.openembedded.org/openembedded-core
+branch: master
+revision: HEAD
+
+URI: git://git.openembedded.org/meta-openembedded
+branch: master
+revision: HEAD
+
+You should define at lease the following variables in a distro include file or local.conf
+
+PREFERRED_PROVIDER_virtual/java-native = "jamvm-native"
+PREFERRED_PROVIDER_virtual/javac-native = "ecj-bootstrap-native"
+
+PREFERRED_VERSION_cacaoh-native = "0.99.3"
+
+PREFERRED_VERSION_openjdk-6-jre = "6b18-1.8.11"
+PREFERRED_VERSION_icedtea6-native = "1.8.11"
+
+
+Send pull requests to openembedded-devel@lists.openembedded.org
+
+Main layer maintainers: Henning Heinold <heinold@inf.fu-berlin.de>
diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass
new file mode 100644
index 0000000..4396bb3
--- /dev/null
+++ b/classes/java-library.bbclass
@@ -0,0 +1,58 @@
+# Inherit this bbclass for each java recipe that builds a Java library (jar file[s]).
+#
+# It automatically adds important build dependencies, defines JPN (Java Package Name)
+# a package named ${JPN} whose contents are those of ${datadir}/java (the jar location).
+#
+# The JPN is basically lib${PN}-java but takes care of the fact that ${PN} already
+# starts with "lib" and/or ends with "-java". In case the "lib" prefix is part of
+# your package's normal name (e.g. liberator) the guessing is wrong and you have
+# to set JPN manually!
+
+inherit java
+
+# use java_stage for native packages
+JAVA_NATIVE_STAGE_INSTALL = "1"
+
+def java_package_name(d):
+ import bb;
+
+ pre=""
+ post=""
+
+ pn = bb.data.getVar('PN', d, 1)
+ if not pn.startswith("lib"):
+ pre='lib'
+
+ if not pn.endswith("-java"):
+ post='-java'
+
+ return pre + pn + post
+
+JPN ?= "${@java_package_name(d)}"
+
+DEPENDS_prepend = "virtual/javac-native fastjar-native "
+
+PACKAGES = "${JPN}"
+
+PACKAGE_ARCH_${JPN} = "all"
+
+FILES_${JPN} = "${datadir_java}"
+
+# File name of the libraries' main Jar file
+JARFILENAME = "${BP}.jar"
+
+# Space-separated list of alternative file names.
+ALTJARFILENAMES = "${BPN}.jar"
+
+# Java "source" distributions often contain precompiled things
+# we want to delete first.
+do_removebinaries() {
+ find ${WORKDIR} -name "*.jar" -exec rm {} \;
+ find ${WORKDIR} -name "*.class" -exec rm {} \;
+}
+
+addtask removebinaries after do_unpack before do_patch
+
+do_install() {
+ oe_jarinstall ${JARFILENAME} ${ALTJARFILENAMES}
+}
diff --git a/classes/java-native.bbclass b/classes/java-native.bbclass
new file mode 100644
index 0000000..cade7b1
--- /dev/null
+++ b/classes/java-native.bbclass
@@ -0,0 +1,9 @@
+# This is to be used by recipes which rely on java-library.bbclass
+# infrastructure and are a *-native recipe which needs to install
+# jar files into staging.
+#
+# This class has nothing to do with Java's JNI.
+
+inherit native
+
+NATIVE_INSTALL_WORKS = "1"
diff --git a/classes/java.bbclass b/classes/java.bbclass
new file mode 100644
index 0000000..6a45065
--- /dev/null
+++ b/classes/java.bbclass
@@ -0,0 +1,184 @@
+# Defines the commonly used target directories and provides a convenience
+# function to install jar files.
+#
+# All the default directory locations herein resemble locations chosen in
+# the Debian distribution.
+
+# Jar location on target
+datadir_java ?= ${datadir}/java
+
+# JNI library location on target
+libdir_jni ?= ${libdir}/jni
+
+# JVM bundle location on target
+libdir_jvm ?= ${libdir}/jvm
+
+STAGING_DATADIR_JAVA ?= ${STAGING_DATADIR}/java
+STAGING_LIBDIR_JNI ?= ${STAGING_LIBDIR}/jni
+STAGING_LIBDIR_JVM ?= ${STAGING_LIBDIR}/jvm
+
+STAGING_DATADIR_JAVA_NATIVE ?= ${STAGING_DATADIR_NATIVE}/java
+STAGING_LIBDIR_JNI_NATIVE ?= ${STAGING_LIBDIR_NATIVE}/jni
+STAGING_LIBDIR_JVM_NATIVE ?= ${STAGING_LIBDIR_NATIVE}/jvm
+
+oe_jarinstall() {
+ # Purpose: Install a jar file and create all the given symlinks to it.
+ # Example:
+ # oe_jarinstall foo-1.3.jar foo.jar
+ # Installs foo-1.3.jar and creates symlink foo.jar.
+ #
+ # oe_jarinstall -r foo-1.3.jar foo_1_3.jar foo.jar
+ # Installs foo_1_3.jar as foo-1.3.jar and creates a symlink to this.
+ #
+ dir=${D}${datadir_java}
+ destname=""
+ while [ "$#" -gt 0 ]; do
+ case "$1" in
+ -r)
+ shift
+ destname=$1
+ ;;
+ -*)
+ oefatal "oe_jarinstall: unknown option: $1"
+ ;;
+ *)
+ break;
+ ;;
+ esac
+ shift
+ done
+
+ jarname=$1
+ destname=${destname:-`basename $jarname`}
+ shift
+
+ install -d $dir
+ install -m 0644 $jarname $dir/$destname
+
+ # Creates symlinks out of the remaining arguments.
+ while [ "$#" -gt 0 ]; do
+ if [ -e $dir/$1 -o -h $dir/$1 ]; then
+ oewarn "file was in the way. removing:" $dir/$1
+ rm $dir/$1
+ fi
+ ln -s $destname $dir/$1
+ shift
+ done
+}
+
+oe_makeclasspath() {
+ # Purpose: Generate a classpath variable from the given Jar file names
+ # where the ".jar" has been omitted. The string is stored in the script
+ # variable whose name is given in the first argument to this function.
+ #
+ # oe_makeclasspath cp foo baz bar
+ # Stores ${datadir_java}/foo.jar:${datadir_java}/baz.jar:${datadir_java}/bar.jar
+ # in variable "cp".
+ #
+ # oe_makeclasspath bootcp -s foo baz bar
+ # Stores ${STAGING_DATADIR_JAVA}/foo.jar:${STAGING_DATADIR_JAVA}/baz.jar:${STAGING_DATADIR_JAVA}/bar.jar
+ # in variable "bootcp".
+ #
+ # Provide the -s at the beginning otherwise strange things happen.
+ # If -s is given the function checks whether the requested jar file exists
+ # and exits with an error message if it cannot be found.
+ #
+ # Note: In order to encourage usage of the DEPENDS variable, the function
+ # can accept recipe names. If a recipe has no corresponding Jar file it
+ # is ignored. Be careful with recipes where the recipe name is different
+ # from the the Jar file name!
+ dir=${datadir_java}
+ classpath=
+ delimiter=
+ retval=$1
+
+ shift
+
+ while [ "$#" -gt 0 ]; do
+ case "$1" in
+ -s)
+ # take jar files from native staging if this is a -native recipe
+ if [ ${PACKAGE_ARCH} = ${BUILD_ARCH} ]; then
+ dir=${STAGING_DATADIR_JAVA_NATIVE}
+ else
+ dir=${STAGING_DATADIR_JAVA}
+ fi
+ ;;
+ -*)
+ oefatal "oe_makeclasspath: unknown option: $1"
+ ;;
+ *)
+ file=$dir/$1.jar
+
+ if [ -e $file ]; then
+ classpath=$classpath$delimiter$file
+ delimiter=":"
+ fi
+
+ ;;
+ esac
+ shift
+ done
+
+ eval $retval="$classpath"
+}
+
+# Creates a simple wrapper script for your Java program.
+# The script is written to ${PN} by default.
+#
+# Parameters are as follows:
+# [options] <output file> <main class> [jar files ...]
+#
+# Options are
+# -o <name> where name is the output file name
+#
+# It can only take jar files from ${datadir_java}!
+oe_java_simple_wrapper() {
+ delimiter=
+ mainclass=
+ classpath=
+ output=${PN}
+
+ while [ "$#" -gt 0 ]; do
+ case "$1" in
+ -o)
+ shift
+ output=$1
+ ;;
+ -*)
+ oefatal "oe_java_simple_wrapper: unknown option: $1"
+ ;;
+ *)
+ if [ $mainclass ]
+ then
+ classpath=$classpath$delimiter${datadir_java}/$1
+ delimiter=":"
+ else
+ mainclass=$1
+ fi
+ ;;
+ esac
+ shift
+ done
+
+ oenote "Creating simple Java wrapper script"
+ oenote "Output File: $output"
+ oenote "Main Class: $mainclass"
+ oenote "Classpath: $classpath"
+
+ echo "#!/bin/sh" > $output
+ echo "# This file is autogenerated by the oe_java_simple_wrapper function of OpenEmbedded" >> $output
+ echo >> $output
+ echo "# You can provide additional VM arguments by setting the VMARGS environment variable." >> $output
+ echo "CLASSPATH_ARG=\"-cp $classpath\"" >> $output
+ echo >> $output
+ echo "MAIN_CLASS=$mainclass" >> $output
+ echo >> $output
+ echo "# Allows overriding the VM by setting the JAVA environment variable." >> $output
+ echo "if [ x\${JAVA} = x ]" >> $output
+ echo "then" >> $output
+ echo " JAVA=java" >> $output
+ echo "fi" >> $output
+ echo >> $output
+ echo "exec \${JAVA} \${VMARGS} \${CLASSPATH_ARG} \${MAIN_CLASS} \${@}" >> $output
+}
diff --git a/conf/layer.conf b/conf/layer.conf
new file mode 100644
index 0000000..2d6fffe
--- /dev/null
+++ b/conf/layer.conf
@@ -0,0 +1,9 @@
+# We have a conf and classes directory, append to BBPATH
+BBPATH .= ":${LAYERDIR}"
+
+# We have a recipes directory, add to BBFILES
+BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
+
+BBFILE_COLLECTIONS += "meta-java"
+BBFILE_PATTERN_meta-java := "^${LAYERDIR}/"
+BBFILE_PRIORITY_meta-java = "10"
diff --git a/recipes-core/ant/ant-native_1.8.1.bb b/recipes-core/ant/ant-native_1.8.1.bb
new file mode 100644
index 0000000..5ea8c16
--- /dev/null
+++ b/recipes-core/ant/ant-native_1.8.1.bb
@@ -0,0 +1,66 @@
+DESCRIPTION = "Another Neat Tool - build system for Java"
+AUTHOR = "Apache Software Foundation"
+HOMEPAGE = "http://ant.apache.org"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=503bb72c4dd62dd216d6820d5b869442"
+
+SRC_URI = "http://ftp.riken.jp/net/apache/ant/source/apache-ant-${PV}-src.tar.gz \
+ file://ant \
+ "
+
+S = "${WORKDIR}/apache-ant-${PV}"
+
+inherit java-library java-native
+
+DEPENDS = " \
+ jsch-native bsf-native xalan-j-native xerces-j-native \
+ xml-commons-resolver1.1-native gnumail-native gnujaf-native \
+ bcel-native regexp-native log4j1.2-native antlr-native oro-native \
+ junit-native jdepend-native commons-net-native commons-logging-native \
+ "
+
+do_removecruft() {
+ # Removes thing that need proprietary Jar files or are otherwise problematic
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/image
+ rm -rf ${S}/src/main/org/apache/tools/ant/types/optional/image
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/ejb
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/scm
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/starteam
+ rm -rf ${S}/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
+}
+
+addtask removecruft before do_patch after do_unpack
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s jsch bsf xalan2 xercesImpl resolver gnumail gnujaf bcel regexp log4j1.2 antlr oro junit jdepend commons-net commons-logging
+ cp=build:$cp
+
+ find src/main -name "*.java" > java_files
+
+ javac -sourcepath src/main -cp $cp -d build @java_files
+
+ mkdir -p build/org/apache/tools/ant/types/conditions
+
+ cp -r src/resources/org build/
+ (cd src/main && find . \( -name "*.properties" -or -name "*.xml" -or -name "*.mf" \) -exec cp {} ../../build/{} \;)
+
+ echo "VERSION=${PV}" > build/org/apache/tools/ant/version.txt
+ echo "DATE=`date -R`" >> build/org/apache/tools/ant/version.txt
+
+ fastjar -C build -c -f ${JARFILENAME} .
+
+ oe_makeclasspath cp -s ecj-bootstrap jsch bsf xalan2 xercesImpl resolver gnumail gnujaf bcel regexp log4j1.2 antlr oro junit jdepend commons-net commons-logging
+ cp=${STAGING_DATADIR_JAVA_NATIVE}/ant.jar:${STAGING_DATADIR}/classpath/tools.zip:$cp
+ sed -i -e"s|@JAR_FILE@|$cp|" ${WORKDIR}/ant
+}
+
+do_install_append() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/ant ${D}${bindir}
+}
+
+SRC_URI[md5sum] = "9e5960bd586d9425c46199cdd20a6fbc"
+SRC_URI[sha256sum] = "4f39057af228663c3cfb6dcfbee603a071a7e3cf48c95c30869ed81c5fcf21c8"
+
diff --git a/recipes-core/ant/files/ant b/recipes-core/ant/files/ant
new file mode 100755
index 0000000..bb282a9
--- /dev/null
+++ b/recipes-core/ant/files/ant
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+export CLASSPATH
+CLASSPATH=$CLASSPATH:@JAR_FILE@
+
+if [ ! $JAVA ];then
+ JAVA=java
+fi
+
+$JAVA org.apache.tools.ant.launch.Launcher $*
diff --git a/recipes-core/antlr/antlr_2.7.7.bb b/recipes-core/antlr/antlr_2.7.7.bb
new file mode 100644
index 0000000..105b5e8
--- /dev/null
+++ b/recipes-core/antlr/antlr_2.7.7.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "Framework for constructing recognizers, interpreters, compilers, and translators"
+HOMEPAGE = "http://www.antlr2.org"
+# see http://www.antlr2.org/license.html
+LICENSE = "PD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=361934e706423915b4d9f413ad37fb65"
+
+SRC_URI = "http://www.antlr2.org/download/${BP}.tar.gz"
+SRC_URI_virtclass_native += "file://runantlr"
+
+inherit java-library
+
+do_configure_virtclass_native() {
+ sed -i -e"s|@JAR_FILE@|${STAGING_DATADIR_JAVA_NATIVE}/antlr.jar|" ${WORKDIR}/runantlr
+}
+
+do_compile() {
+ mkdir -p build
+
+ javac -sourcepath . -d build `find antlr -name "*.java"`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+do_install_virtclass_native() {
+ install ${D}${bindir}
+ install -m 0755 ${WORKDIR}/runantlr {D}${bindir}/
+}
+
+SRC_URI[md5sum] = "01cc9a2a454dd33dcd8c856ec89af090"
+SRC_URI[sha256sum] = "853aeb021aef7586bda29e74a6b03006bcb565a755c86b66032d8ec31b67dbb9"
+
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/antlr/files/runantlr b/recipes-core/antlr/files/runantlr
new file mode 100755
index 0000000..b924bf4
--- /dev/null
+++ b/recipes-core/antlr/files/runantlr
@@ -0,0 +1,11 @@
+#!/bin/sh
+echo Running 'java antlr.Tool $*' with @JAR_FILE@ appended to the CLASSPATH variable
+
+export CLASSPATH
+CLASSPATH=$CLASSPATH:@JAR_FILE@
+
+if [ ! $JAVA ];then
+ JAVA=java
+fi
+
+$JAVA antlr.Tool $*
diff --git a/recipes-core/bcel/bcel_5.2.bb b/recipes-core/bcel/bcel_5.2.bb
new file mode 100644
index 0000000..c831516
--- /dev/null
+++ b/recipes-core/bcel/bcel_5.2.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Java Bytecode manipulation library"
+AUTHOR = "Apache Software Foundation"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=44030f19e8bad73725f39d16fd05ff12"
+
+SRC_URI = "http://archive.apache.org/dist/jakarta/bcel/source/${BP}-src.tar.gz"
+
+inherit java-library
+
+DEPENDS = "xerces-j regexp"
+DEPENDS_virtclass-native = "xerces-j-native regexp-native"
+
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s xercesImpl regexp
+
+ javac -sourcepath src/java -d build -cp $cp `find src/java -name \*.java`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "905b7e718e30e7ca726530ecf106e532"
+SRC_URI[sha256sum] = "68039d59a38379d7b65ea3fc72276c43ba234776460e14361af35771bcaab295"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/cacao/cacaoh-openjdk-native.inc b/recipes-core/cacao/cacaoh-openjdk-native.inc
new file mode 100644
index 0000000..fcc38ad
--- /dev/null
+++ b/recipes-core/cacao/cacaoh-openjdk-native.inc
@@ -0,0 +1,31 @@
+DESCRIPTION = "Header generator for Cacao JVM - Needed for cross-compilation builds"
+HOMEPAGE = "http://www.cacaojvm.org/"
+LICENSE = "GPL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+DEPENDS = "libtool-native zlib-native virtual/javac-native classpath-native icedtea6-native"
+
+S = "${WORKDIR}/cacao-${PV}"
+
+inherit java autotools native
+
+EXTRA_OECONF = " \
+ --with-java-runtime-library=openjdk \
+ --with-java-runtime-library-classes=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/jre/lib/rt.jar \
+ --with-jni_md_h=${STAGING_INCDIR}/classpath \
+ --with-jni_h=${STAGING_INCDIR}/classpath \
+ --with-hpi_md_h=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/include/hpi \
+ --with-hpi_h=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/include/hpi \
+ "
+
+do_compile() {
+ # Compile the header generator only (and what is needed for it).
+ oe_runmake -C src/toolbox libtoolbox.la
+ oe_runmake -C src/vmcore libvmcore.la
+ oe_runmake -C src/cacaoh cacaoh
+}
+
+do_install() {
+ install -d ${D}${bindir}/cacaoh-${PV}
+ ${STAGING_BINDIR_NATIVE}/${HOST_SYS}-libtool --mode=install install -m 0755 src/cacaoh/cacaoh ${D}/${bindir}/cacaoh-openjdk-${PV}
+}
diff --git a/recipes-core/cacao/cacaoh-openjdk-native_0.99.4.bb b/recipes-core/cacao/cacaoh-openjdk-native_0.99.4.bb
new file mode 100644
index 0000000..2e7ff93
--- /dev/null
+++ b/recipes-core/cacao/cacaoh-openjdk-native_0.99.4.bb
@@ -0,0 +1,7 @@
+require cacaoh-openjdk-native.inc
+
+SRC_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-${PV}/cacao-${PV}.tar.bz2"
+
+SRC_URI[md5sum] = "63220327925ace13756ae334c55a3baa"
+SRC_URI[sha256sum] = "1dfc4903dc0172286df4f1740fd0f12749ac81d51c602290b47cbe83d51e1d56"
+
diff --git a/recipes-core/classpath/classpath-0.98/SimpleName.diff b/recipes-core/classpath/classpath-0.98/SimpleName.diff
new file mode 100644
index 0000000..ff2bec0
--- /dev/null
+++ b/recipes-core/classpath/classpath-0.98/SimpleName.diff
@@ -0,0 +1,66 @@
+Index: vm/reference/java/lang/VMClass.java
+===================================================================
+RCS file: /sources/classpath/classpath/vm/reference/java/lang/VMClass.java,v
+retrieving revision 1.20
+diff -u -r1.20 VMClass.java
+--- vm/reference/java/lang/VMClass.java 18 Sep 2007 21:52:38 -0000 1.20
++++ vm/reference/java/lang/VMClass.java 19 Apr 2008 15:19:00 -0000
+@@ -296,27 +296,43 @@
+ */
+ static String getSimpleName(Class klass)
+ {
++ int arrayCount = 0;
++ while (klass.isArray())
++ {
++ klass = klass.getComponentType();
++ ++arrayCount;
++ }
++ // now klass is the component type
++
++ String simpleComponentName = null;
+ if (isAnonymousClass(klass))
+- return "";
+- if (isArray(klass))
+ {
+- return getComponentType(klass).getSimpleName() + "[]";
++ simpleComponentName = "";
+ }
+- String fullName = getName(klass);
+- int pos = fullName.lastIndexOf("$");
+- if (pos == -1)
+- pos = 0;
+ else
+ {
+- ++pos;
+- while (Character.isDigit(fullName.charAt(pos)))
+- ++pos;
++ String fullName = getName(klass);
++ int pos = fullName.lastIndexOf("$");
++ if (pos != -1)
++ { //inner class or local class
++ // skip digits of local classes
++ while (Character.isDigit(fullName.charAt(pos+1)))
++ pos++;
++ }
++ else
++ {
++ pos = fullName.lastIndexOf(".");
++ }
++ simpleComponentName = fullName.substring(pos+1);
+ }
+- int packagePos = fullName.lastIndexOf(".", pos);
+- if (packagePos == -1)
+- return fullName.substring(pos);
+- else
+- return fullName.substring(packagePos + 1);
++
++ if (arrayCount == 0)
++ return simpleComponentName;
++
++ StringBuffer sb = new StringBuffer(simpleComponentName);
++ while (arrayCount-- > 0)
++ sb.append("[]");
++ return sb.toString();
+ }
+
+ /**
diff --git a/recipes-core/classpath/classpath-0.98/ecj_java_dir.patch b/recipes-core/classpath/classpath-0.98/ecj_java_dir.patch
new file mode 100644
index 0000000..1455a24
--- /dev/null
+++ b/recipes-core/classpath/classpath-0.98/ecj_java_dir.patch
@@ -0,0 +1,37 @@
+Index: classpath-0.98/lib/gen-classlist.sh.in
+===================================================================
+--- classpath-0.98.orig/lib/gen-classlist.sh.in 2010-06-24 21:18:02.776819217 +0200
++++ classpath-0.98/lib/gen-classlist.sh.in 2010-06-24 21:18:35.625566191 +0200
+@@ -148,4 +148,7 @@
+ done
+ fi
+
++# hack for javac that uses -d and do not make the directories
++@AWK@ -F " " '{print $1}' classes.1 | uniq | awk -F " " '{system("mkdir -p " $0)}'
++
+ exit 0
+Index: classpath-0.98/tools/Makefile.am
+===================================================================
+--- classpath-0.98.orig/tools/Makefile.am 2010-06-24 21:18:02.783479881 +0200
++++ classpath-0.98/tools/Makefile.am 2010-06-24 21:20:04.925557253 +0200
+@@ -323,6 +323,8 @@
+ endif
+ ## Compile ASM separately as it is latin-1 encoded.
+ find $(srcdir)/external/asm -name '*.java' -print > asm.lst
++ @AWK@ -F "/" '{OFS=FS;gsub("/"$$2"/"$$3,"",$$0);gsub("/"$$NF,"",$$0); print $$0}' asm.lst | \
++ sort | uniq | @AWK@ -F " " '{system("mkdir -p asm/" $$0)}'
+ AC=`echo $(JCOMPILER) | sed -e 's/UTF-8/ISO-8859-1/g'`; \
+ $$AC -g -d asm @asm.lst
+ find $(srcdir)/gnu/classpath/tools \
+@@ -334,7 +336,10 @@
+ $(srcdir)/sun/rmi/rmic \
+ $(GJDOC_EX) \
+ -name '*.java' -print > classes.lst
+- $(JCOMPILER) -g -d classes @classes.lst
++ @AWK@ -F "/" '{OFS=FS;gsub("/"$$NF,"",$$0); print $$0}' classes.lst | \
++ sort | uniq | @AWK@ -F " " '{system("mkdir -p classes/" $$0)}'
++ BC=`echo $(JCOMPILER) | sed -e 's/UTF-8/ISO-8859-1/g'`; \
++ $$BC -g -d classes @classes.lst
+ cat classes.lst asm.lst > all-classes.lst
+ ## Copy over tools resource files.
+ @list=`cd $(srcdir)/resource && find gnu/classpath/tools com/sun/tools/javac \
diff --git a/recipes-core/classpath/classpath-0.98/fix-gmp.patch b/recipes-core/classpath/classpath-0.98/fix-gmp.patch
new file mode 100644
index 0000000..3f0dfbe
--- /dev/null
+++ b/recipes-core/classpath/classpath-0.98/fix-gmp.patch
@@ -0,0 +1,19 @@
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- classpath-0.98.orig/configure.ac
++++ classpath-0.98/configure.ac
+@@ -766,11 +766,11 @@ if test "x${COMPILE_JNI}" = xyes; then
+ dnl __gmpz_mul_si for earlier versions (>= 3.1).
+ dnl IMPORTANT: if you decide to look for __gmpz_combit, don't forget to
+ dnl change the name of the corresponding ac_ variable on lines 860...
+ if test "x${COMPILE_GMP}" = xyes; then
+ AC_CHECK_LIB(gmp, __gmpz_mul_si,
+- [GMP_CFLAGS=-I/usr/include
++ [GMP_CFLAGS=
+ GMP_LIBS=-lgmp ],
+ [GMP_CFLAGS=
+ GMP_LIBS= ])
+ AC_SUBST(GMP_CFLAGS)
+ AC_SUBST(GMP_LIBS)
diff --git a/recipes-core/classpath/classpath-0.98/javanet-local.patch b/recipes-core/classpath/classpath-0.98/javanet-local.patch
new file mode 100644
index 0000000..b8d1584
--- /dev/null
+++ b/recipes-core/classpath/classpath-0.98/javanet-local.patch
@@ -0,0 +1,37 @@
+Index: native/jni/java-net/local.c
+===================================================================
+RCS file: /sources/classpath/classpath/native/jni/java-net/local.c,v
+retrieving revision 1.4
+diff -u -r1.4 local.c
+--- native/jni/java-net/local.c 17 Apr 2007 21:46:27 -0000 1.4
++++ native/jni/java-net/local.c 27 Jun 2008 13:14:40 -0000
+@@ -73,27 +73,18 @@
+ return socket (PF_UNIX, stream ? SOCK_STREAM : SOCK_DGRAM, 0);
+ }
+
+-static int gcc_sucks = 0;
+-
+ int
+ local_bind (int fd, const char *addr)
+ {
+ struct sockaddr_un saddr;
+
+- /* For some reason, GCC 4.0.1 on Darwin/x86 MODIFIES the `addr'
+- pointer in the CALLER's STACK FRAME after calling this function,
+- but if we add this statement below, it doesn't! */
+- if (gcc_sucks)
+- fprintf (stderr, "bind %p\n", addr);
+-
+- if (strlen (addr) > sizeof (saddr.sun_path))
++ if (strlen (addr) >= sizeof (saddr.sun_path))
+ {
+ errno = ENAMETOOLONG;
+ return -1;
+ }
+
+- strncpy (saddr.sun_path, addr, sizeof (saddr.sun_path));
+- saddr.sun_path[sizeof (saddr.sun_path)] = '\0';
++ strcpy (saddr.sun_path, addr);
+ saddr.sun_family = AF_LOCAL;
+
+ return bind (fd, (struct sockaddr *) &saddr, SUN_LEN (&saddr));
diff --git a/recipes-core/classpath/classpath-0.98/miscompilation.patch b/recipes-core/classpath/classpath-0.98/miscompilation.patch
new file mode 100644
index 0000000..c61b214
--- /dev/null
+++ b/recipes-core/classpath/classpath-0.98/miscompilation.patch
@@ -0,0 +1,13 @@
+Index: classpath-0.97.2/native/jni/java-io/java_io_VMFile.c
+===================================================================
+--- classpath-0.97.2.orig/native/jni/java-io/java_io_VMFile.c 2008-10-10 15:24:54.000000000 +0200
++++ classpath-0.97.2/native/jni/java-io/java_io_VMFile.c 2008-10-10 15:25:36.000000000 +0200
+@@ -439,7 +439,7 @@
+ {
+ #ifndef WITHOUT_FILESYSTEM
+ const char *filename;
+- int result;
++ volatile int result;
+
+ /* Don't use the JCL convert function because it throws an exception
+ on failure */
diff --git a/recipes-core/classpath/classpath-0.98/sun-security-getproperty.patch b/recipes-core/classpath/classpath-0.98/sun-security-getproperty.patch
new file mode 100644
index 0000000..fb9cd9d
--- /dev/null
+++ b/recipes-core/classpath/classpath-0.98/sun-security-getproperty.patch
@@ -0,0 +1,503 @@
+Index: gnu/classpath/debug/Simple1LineFormatter.java
+===================================================================
+--- gnu/classpath/debug/Simple1LineFormatter.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/classpath/debug/Simple1LineFormatter.java 2009-03-19 19:00:47.000000000 +0100
+@@ -38,8 +38,6 @@
+
+ package gnu.classpath.debug;
+
+-import gnu.java.security.action.GetPropertyAction;
+-
+ import java.io.PrintWriter;
+ import java.io.StringWriter;
+ import java.security.AccessController;
+@@ -51,6 +49,8 @@
+ import java.util.logging.Formatter;
+ import java.util.logging.LogRecord;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A simple 1-line formatter to use instead of the 2-line SimpleFormatter used
+ * by default in the JDK logging handlers.
+Index: gnu/classpath/debug/SystemLogger.java
+===================================================================
+--- gnu/classpath/debug/SystemLogger.java.orig 2006-12-10 21:25:41.000000000 +0100
++++ gnu/classpath/debug/SystemLogger.java 2009-03-19 19:00:47.000000000 +0100
+@@ -38,13 +38,13 @@
+
+ package gnu.classpath.debug;
+
+-import gnu.java.security.action.GetPropertyAction;
+-
+ import java.security.AccessController;
+ import java.util.StringTokenizer;
+ import java.util.logging.Level;
+ import java.util.logging.Logger;
+
++import sun.security.action.GetPropertyAction;
++
+ public final class SystemLogger extends Logger
+ {
+ public static final SystemLogger SYSTEM = new SystemLogger();
+Index: gnu/java/security/PolicyFile.java
+===================================================================
+--- gnu/java/security/PolicyFile.java.orig 2008-06-16 00:07:30.000000000 +0200
++++ gnu/java/security/PolicyFile.java 2009-03-19 19:01:31.000000000 +0100
+@@ -41,7 +41,6 @@
+ import gnu.classpath.debug.SystemLogger;
+
+ import gnu.java.lang.CPStringBuilder;
+-import gnu.java.security.action.GetPropertyAction;
+
+ import java.io.File;
+ import java.io.IOException;
+@@ -74,6 +73,8 @@
+ import java.util.StringTokenizer;
+ import java.util.logging.Logger;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An implementation of a {@link java.security.Policy} object whose
+ * permissions are specified by a <em>policy file</em>.
+Index: gnu/java/security/action/GetPropertyAction.java
+===================================================================
+--- gnu/java/security/action/GetPropertyAction.java 2006-12-10 21:25:42.000000000 +0100
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,89 +0,0 @@
+-/* GetPropertyAction.java
+- Copyright (C) 2004 Free Software Foundation, Inc.
+-
+-This file is part of GNU Classpath.
+-
+-GNU Classpath is free software; you can redistribute it and/or modify
+-it under the terms of the GNU General Public License as published by
+-the Free Software Foundation; either version 2, or (at your option)
+-any later version.
+-
+-GNU Classpath is distributed in the hope that it will be useful, but
+-WITHOUT ANY WARRANTY; without even the implied warranty of
+-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+-General Public License for more details.
+-
+-You should have received a copy of the GNU General Public License
+-along with GNU Classpath; see the file COPYING. If not, write to the
+-Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+-02110-1301 USA.
+-
+-Linking this library statically or dynamically with other modules is
+-making a combined work based on this library. Thus, the terms and
+-conditions of the GNU General Public License cover the whole
+-combination.
+-
+-As a special exception, the copyright holders of this library give you
+-permission to link this library with independent modules to produce an
+-executable, regardless of the license terms of these independent
+-modules, and to copy and distribute the resulting executable under
+-terms of your choice, provided that you also meet, for each linked
+-independent module, the terms and conditions of the license of that
+-module. An independent module is a module which is not derived from
+-or based on this library. If you modify this library, you may extend
+-this exception to your version of the library, but you are not
+-obligated to do so. If you do not wish to do so, delete this
+-exception statement from your version. */
+-
+-package gnu.java.security.action;
+-
+-import java.security.PrivilegedAction;
+-
+-/**
+- * PrivilegedAction implementation that calls System.getProperty() with
+- * the property name passed to its constructor.
+- *
+- * Example of use:
+- * <code>
+- * GetPropertyAction action = new GetPropertyAction("http.proxyPort");
+- * String port = AccessController.doPrivileged(action);
+- * </code>
+- */
+-public class GetPropertyAction implements PrivilegedAction<String>
+-{
+- String name;
+- String value = null;
+-
+- public GetPropertyAction()
+- {
+- }
+-
+- public GetPropertyAction(String propName)
+- {
+- setParameters(propName);
+- }
+-
+- public GetPropertyAction(String propName, String defaultValue)
+- {
+- setParameters(propName, defaultValue);
+- }
+-
+- public String run()
+- {
+- return System.getProperty(name, value);
+- }
+-
+- public GetPropertyAction setParameters(String propName)
+- {
+- this.name = propName;
+- this.value = null;
+- return this;
+- }
+-
+- public GetPropertyAction setParameters(String propName, String defaultValue)
+- {
+- this.name = propName;
+- this.value = defaultValue;
+- return this;
+- }
+-}
+Index: gnu/java/security/key/dss/DSSKey.java
+===================================================================
+--- gnu/java/security/key/dss/DSSKey.java.orig 2008-03-16 23:04:49.000000000 +0100
++++ gnu/java/security/key/dss/DSSKey.java 2009-03-19 19:00:47.000000000 +0100
+@@ -41,7 +41,6 @@
+ import gnu.java.lang.CPStringBuilder;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.util.FormatUtil;
+
+ import java.math.BigInteger;
+@@ -51,6 +50,8 @@
+ import java.security.interfaces.DSAParams;
+ import java.security.spec.DSAParameterSpec;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A base asbtract class for both public and private DSS (Digital Signature
+ * Standard) keys. It encapsulates the three DSS numbers: <code>p</code>,
+Index: gnu/java/security/key/dss/DSSPrivateKey.java
+===================================================================
+--- gnu/java/security/key/dss/DSSPrivateKey.java.orig 2008-03-16 23:04:49.000000000 +0100
++++ gnu/java/security/key/dss/DSSPrivateKey.java 2009-03-19 19:00:47.000000000 +0100
+@@ -42,7 +42,6 @@
+
+ import gnu.java.security.Configuration;
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -50,6 +49,8 @@
+ import java.security.PrivateKey;
+ import java.security.interfaces.DSAPrivateKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An object that embodies a DSS (Digital Signature Standard) private key.
+ *
+Index: gnu/java/security/key/dss/DSSPublicKey.java
+===================================================================
+--- gnu/java/security/key/dss/DSSPublicKey.java.orig 2008-03-16 23:04:49.000000000 +0100
++++ gnu/java/security/key/dss/DSSPublicKey.java 2009-03-19 19:00:47.000000000 +0100
+@@ -41,7 +41,6 @@
+ import gnu.java.lang.CPStringBuilder;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -49,6 +48,8 @@
+ import java.security.PublicKey;
+ import java.security.interfaces.DSAPublicKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An object that embodies a DSS (Digital Signature Standard) public key.
+ *
+Index: gnu/java/security/key/rsa/GnuRSAKey.java
+===================================================================
+--- gnu/java/security/key/rsa/GnuRSAKey.java.orig 2008-03-16 23:04:49.000000000 +0100
++++ gnu/java/security/key/rsa/GnuRSAKey.java 2009-03-19 19:00:47.000000000 +0100
+@@ -41,7 +41,6 @@
+ import gnu.java.lang.CPStringBuilder;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.util.FormatUtil;
+
+ import java.math.BigInteger;
+@@ -49,6 +48,8 @@
+ import java.security.Key;
+ import java.security.interfaces.RSAKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A base asbtract class for both public and private RSA keys.
+ */
+Index: gnu/java/security/key/rsa/GnuRSAPrivateKey.java
+===================================================================
+--- gnu/java/security/key/rsa/GnuRSAPrivateKey.java.orig 2008-03-16 23:04:50.000000000 +0100
++++ gnu/java/security/key/rsa/GnuRSAPrivateKey.java 2009-03-19 19:00:47.000000000 +0100
+@@ -41,7 +41,6 @@
+ import gnu.java.lang.CPStringBuilder;
+
+ import gnu.java.security.Configuration;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.Registry;
+ import gnu.java.security.key.IKeyPairCodec;
+
+@@ -51,6 +50,8 @@
+ import java.security.interfaces.RSAPrivateCrtKey;
+ import java.security.interfaces.RSAPrivateKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An object that embodies an RSA private key.
+ * <p>
+Index: gnu/java/security/key/rsa/GnuRSAPublicKey.java
+===================================================================
+--- gnu/java/security/key/rsa/GnuRSAPublicKey.java.orig 2008-03-16 23:04:50.000000000 +0100
++++ gnu/java/security/key/rsa/GnuRSAPublicKey.java 2009-03-19 19:00:47.000000000 +0100
+@@ -41,7 +41,6 @@
+ import gnu.java.lang.CPStringBuilder;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -49,6 +48,8 @@
+ import java.security.PublicKey;
+ import java.security.interfaces.RSAPublicKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An object that encapsulates an RSA public key.
+ * <p>
+Index: gnu/javax/crypto/key/dh/GnuDHKey.java
+===================================================================
+--- gnu/javax/crypto/key/dh/GnuDHKey.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/javax/crypto/key/dh/GnuDHKey.java 2009-03-19 19:00:47.000000000 +0100
+@@ -39,7 +39,6 @@
+ package gnu.javax.crypto.key.dh;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.util.FormatUtil;
+
+ import java.math.BigInteger;
+@@ -49,6 +48,8 @@
+ import javax.crypto.interfaces.DHKey;
+ import javax.crypto.spec.DHParameterSpec;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A base asbtract class for both public and private Diffie-Hellman keys. It
+ * encapsulates the two DH numbers: <code>p</code>, and <code>g</code>.
+Index: gnu/javax/crypto/key/dh/GnuDHPrivateKey.java
+===================================================================
+--- gnu/javax/crypto/key/dh/GnuDHPrivateKey.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/javax/crypto/key/dh/GnuDHPrivateKey.java 2009-03-19 19:00:47.000000000 +0100
+@@ -40,7 +40,6 @@
+
+ import gnu.java.security.Configuration;
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -48,6 +47,8 @@
+
+ import javax.crypto.interfaces.DHPrivateKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An implementation of the Diffie-Hellman private key.
+ * <p>
+Index: gnu/javax/crypto/key/dh/GnuDHPublicKey.java
+===================================================================
+--- gnu/javax/crypto/key/dh/GnuDHPublicKey.java.orig 2006-07-11 18:03:59.000000000 +0200
++++ gnu/javax/crypto/key/dh/GnuDHPublicKey.java 2009-03-19 19:00:47.000000000 +0100
+@@ -39,7 +39,6 @@
+ package gnu.javax.crypto.key.dh;
+
+ import gnu.java.security.Registry;
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.key.IKeyPairCodec;
+
+ import java.math.BigInteger;
+@@ -47,6 +46,8 @@
+
+ import javax.crypto.interfaces.DHPublicKey;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * An implementation of the Diffie-Hellman public key.
+ * <p>
+Index: gnu/javax/crypto/sasl/plain/PasswordFile.java
+===================================================================
+--- gnu/javax/crypto/sasl/plain/PasswordFile.java.orig 2008-05-05 23:29:46.000000000 +0200
++++ gnu/javax/crypto/sasl/plain/PasswordFile.java 2009-03-19 19:00:47.000000000 +0100
+@@ -40,7 +40,6 @@
+
+ import gnu.java.lang.CPStringBuilder;
+
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.javax.crypto.sasl.NoSuchUserException;
+ import gnu.javax.crypto.sasl.UserAlreadyExistsException;
+
+@@ -58,6 +57,8 @@
+ import java.util.NoSuchElementException;
+ import java.util.StringTokenizer;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * A representation of a Plain password file.
+ */
+Index: gnu/javax/net/ssl/provider/X509TrustManagerFactory.java
+===================================================================
+--- gnu/javax/net/ssl/provider/X509TrustManagerFactory.java.orig 2006-12-10 21:25:43.000000000 +0100
++++ gnu/javax/net/ssl/provider/X509TrustManagerFactory.java 2009-03-19 19:00:47.000000000 +0100
+@@ -66,11 +66,12 @@
+ import javax.net.ssl.TrustManagerFactorySpi;
+ import javax.net.ssl.X509TrustManager;
+
+-import gnu.java.security.action.GetPropertyAction;
+ import gnu.java.security.x509.X509CertPath;
+ import gnu.javax.net.ssl.NullManagerParameters;
+ import gnu.javax.net.ssl.StaticTrustAnchors;
+
++import sun.security.action.GetPropertyAction;
++
+ /**
+ * This class implements a {@link javax.net.ssl.TrustManagerFactory} engine
+ * for the ``JessieX509'' algorithm.
+Index: gnu/xml/aelfred2/XmlParser.java
+===================================================================
+--- gnu/xml/aelfred2/XmlParser.java.orig 2008-01-11 22:22:59.000000000 +0100
++++ gnu/xml/aelfred2/XmlParser.java 2009-03-19 19:00:47.000000000 +0100
+@@ -53,8 +53,6 @@
+
+ package gnu.xml.aelfred2;
+
+-import gnu.java.security.action.GetPropertyAction;
+-
+ import java.io.BufferedInputStream;
+ import java.io.CharConversionException;
+ import java.io.EOFException;
+@@ -74,6 +72,7 @@
+ import org.xml.sax.InputSource;
+ import org.xml.sax.SAXException;
+
++import sun.security.action.GetPropertyAction;
+
+ /**
+ * Parse XML documents and return parse events through call-backs.
+Index: sun/security/action/GetPropertyAction.java
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ sun/security/action/GetPropertyAction.java 2009-03-19 19:00:47.000000000 +0100
+@@ -0,0 +1,92 @@
++/* GetPropertyAction.java
++ Copyright (C) 2004, 2008 Free Software Foundation, Inc.
++
++This file is part of GNU Classpath.
++
++GNU Classpath is free software; you can redistribute it and/or modify
++it under the terms of the GNU General Public License as published by
++the Free Software Foundation; either version 2, or (at your option)
++any later version.
++
++GNU Classpath is distributed in the hope that it will be useful, but
++WITHOUT ANY WARRANTY; without even the implied warranty of
++MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++General Public License for more details.
++
++You should have received a copy of the GNU General Public License
++along with GNU Classpath; see the file COPYING. If not, write to the
++Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
++02110-1301 USA.
++
++Linking this library statically or dynamically with other modules is
++making a combined work based on this library. Thus, the terms and
++conditions of the GNU General Public License cover the whole
++combination.
++
++As a special exception, the copyright holders of this library give you
++permission to link this library with independent modules to produce an
++executable, regardless of the license terms of these independent
++modules, and to copy and distribute the resulting executable under
++terms of your choice, provided that you also meet, for each linked
++independent module, the terms and conditions of the license of that
++module. An independent module is a module which is not derived from
++or based on this library. If you modify this library, you may extend
++this exception to your version of the library, but you are not
++obligated to do so. If you do not wish to do so, delete this
++exception statement from your version. */
++
++package sun.security.action;
++
++import java.security.PrivilegedAction;
++
++/**
++ * PrivilegedAction implementation that calls System.getProperty() with
++ * the property name passed to its constructor.
++ *
++ * Example of use:
++ * <code>
++ * GetPropertyAction action = new GetPropertyAction("http.proxyPort");
++ * String port = AccessController.doPrivileged(action);
++ * </code>
++ *
++ * Note: Usage of this class is discouraged as it is not a part of the
++ * J2SE API.
++ */
++public class GetPropertyAction implements PrivilegedAction<String>
++{
++ String name;
++ String value = null;
++
++ public GetPropertyAction()
++ {
++ }
++
++ public GetPropertyAction(String propName)
++ {
++ setParameters(propName);
++ }
++
++ public GetPropertyAction(String propName, String defaultValue)
++ {
++ setParameters(propName, defaultValue);
++ }
++
++ public String run()
++ {
++ return System.getProperty(name, value);
++ }
++
++ public GetPropertyAction setParameters(String propName)
++ {
++ this.name = propName;
++ this.value = null;
++ return this;
++ }
++
++ public GetPropertyAction setParameters(String propName, String defaultValue)
++ {
++ this.name = propName;
++ this.value = defaultValue;
++ return this;
++ }
++}
diff --git a/recipes-core/classpath/classpath-0.98/toolwrapper-exithook.patch b/recipes-core/classpath/classpath-0.98/toolwrapper-exithook.patch
new file mode 100644
index 0000000..49b6631
--- /dev/null
+++ b/recipes-core/classpath/classpath-0.98/toolwrapper-exithook.patch
@@ -0,0 +1,46 @@
+Index: classpath-0.97.2/tools/toolwrapper.c
+===================================================================
+--- classpath-0.97.2.orig/tools/toolwrapper.c 2006-12-13 18:56:44.000000000 +0100
++++ classpath-0.97.2/tools/toolwrapper.c 2009-12-24 13:16:44.295000627 +0100
+@@ -59,6 +59,10 @@
+ /* Typedef for JNI_CreateJavaVM dlopen call. */
+ typedef jint createVM (JavaVM **, void **, void *);
+
++void exit_hook(jint);
++
++int return_code = 1;
++
+ int
+ main (int argc, const char** argv)
+ {
+@@ -143,6 +147,17 @@
+ vm_args.options[vm_args.nOptions++].optionString = "-Xbootclasspath/p:" TOOLS_ZIP;
+ }
+
++ /* Set the exit hook */
++ vm_args.options = (JavaVMOption*) realloc (vm_args.options, (vm_args.nOptions + 1) * sizeof (JavaVMOption));
++
++ if (vm_args.options == NULL)
++ {
++ fprintf (stderr, TOOLNAME ": realloc failed.\n");
++ goto destroy;
++ }
++ vm_args.options[vm_args.nOptions].optionString = "exit";
++ vm_args.options[vm_args.nOptions++].extraInfo = (void *) exit_hook;
++
+ /* Terminate vm_args.options with a NULL element. */
+ vm_args.options = (JavaVMOption*) realloc (vm_args.options, (vm_args.nOptions + 1) * sizeof (JavaVMOption));
+ if (vm_args.options == NULL)
+@@ -260,5 +275,11 @@
+ if (lt_dlexit () != 0)
+ fprintf (stderr, TOOLNAME ": lt_dlexit failed.\n");
+
+- return 1;
++ return return_code;
++}
++
++void exit_hook(jint code)
++{
++ return_code = code;
+ }
++
diff --git a/recipes-core/classpath/classpath-initial-0.93/miscompilation.patch b/recipes-core/classpath/classpath-initial-0.93/miscompilation.patch
new file mode 100644
index 0000000..99db6f3
--- /dev/null
+++ b/recipes-core/classpath/classpath-initial-0.93/miscompilation.patch
@@ -0,0 +1,13 @@
+Index: classpath-0.93/native/jni/java-io/java_io_VMFile.c
+===================================================================
+--- classpath-0.93.orig/native/jni/java-io/java_io_VMFile.c 2006-09-23 07:17:45.000000000 +0200
++++ classpath-0.93/native/jni/java-io/java_io_VMFile.c 2008-11-14 13:41:27.000000000 +0100
+@@ -239,7 +239,7 @@
+ {
+ #ifndef WITHOUT_FILESYSTEM
+ const char *filename;
+- int result;
++ volatile int result;
+
+ /* Don't use the JCL convert function because it throws an exception
+ on failure */
diff --git a/recipes-core/classpath/classpath-initial_0.93.bb b/recipes-core/classpath/classpath-initial_0.93.bb
new file mode 100644
index 0000000..77831c1
--- /dev/null
+++ b/recipes-core/classpath/classpath-initial_0.93.bb
@@ -0,0 +1,37 @@
+# No later version of Classpath may be used because this is the latest that can be compiled
+# by jikes!
+
+require classpath-native.inc
+
+DESCRIPTION="Java1.4-compatible GNU Classpath variant that is used as bootclasspath for jikes-native."
+LIC_FILES_CHKSUM = "file://COPYING;md5=af0004801732bc4b20d90f351cf80510"
+
+DEPENDS = "zip-native fastjar-native jikes-native gettext-native"
+
+SRC_URI += " \
+ file://autotools.patch \
+ file://miscompilation.patch \
+ "
+
+EXTRA_OECONF = " \
+ --with-jikes=jikes \
+ --with-fastjar=fastjar \
+ --with-glibj \
+ --disable-Werror \
+ --disable-local-sockets \
+ --disable-alsa \
+ --disable-gconf-peer \
+ --disable-gtk-peer \
+ --disable-plugin \
+ --disable-dssi \
+ --disable-examples \
+ --disable-tools \
+ --with-glibj-dir=${STAGING_DATADIR_NATIVE}/classpath-initial \
+ --with-native-libdir=${STAGING_LIBDIR_NATIVE}/classpath-initial \
+ --includedir=${STAGING_INCDIR_NATIVE}/classpath-initial \
+ --with-vm=java \
+ "
+
+SRC_URI[md5sum] = "ffa9e9cac31c5acbf0ea9eff9efa923d"
+SRC_URI[sha256sum] = "df2d093612abd23fe67e9409d89bb2a8e79b1664fe2b2da40e1c8ed693e32945"
+
diff --git a/recipes-core/classpath/classpath-native.inc b/recipes-core/classpath/classpath-native.inc
new file mode 100644
index 0000000..aefbf6d
--- /dev/null
+++ b/recipes-core/classpath/classpath-native.inc
@@ -0,0 +1,34 @@
+DESCRIPTION = "GNU Classpath standard Java libraries - For native Java-dependent programs"
+HOMEPAGE = "http://www.gnu.org/software/classpath/"
+LICENSE = "Classpath"
+
+DEPENDS = "ecj-initial fastjar-native zip-native gettext-native"
+
+inherit autotools native
+
+SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz"
+
+do_configure_prepend () {
+
+ cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}
+}
+
+export JAVA="${STAGING_BINDIR_NATIVE}/java-initial"
+export JAVAC="${STAGING_BINDIR_NATIVE}/ecj-initial"
+export JAVACFLAGS="-nowarn"
+
+EXTRA_OECONF = " \
+ --with-glibj \
+ --enable-local-sockets \
+ --disable-Werror \
+ --disable-alsa \
+ --disable-gconf-peer \
+ --disable-gtk-peer \
+ --disable-plugin \
+ --disable-dssi \
+ --disable-gjdoc \
+ --disable-examples \
+ --enable-tools \
+ --includedir=${STAGING_INCDIR}/classpath \
+ "
+
diff --git a/recipes-core/classpath/classpath-native_0.98.bb b/recipes-core/classpath/classpath-native_0.98.bb
new file mode 100644
index 0000000..55022fb
--- /dev/null
+++ b/recipes-core/classpath/classpath-native_0.98.bb
@@ -0,0 +1,29 @@
+require classpath-native.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=af0004801732bc4b20d90f351cf80510"
+
+SRC_URI += " \
+ file://SimpleName.diff;striplevel=0 \
+ file://sun-security-getproperty.patch;striplevel=0 \
+ file://ecj_java_dir.patch \
+ file://autotools.patch \
+ file://miscompilation.patch \
+ file://toolwrapper-exithook.patch \
+ "
+
+do_unpackpost() {
+ # Kind of patch: Moves package "org.w3c.dom.html2" to "org.w3c.dom.html"
+ mv external/w3c_dom/org/w3c/dom/html2 \
+ external/w3c_dom/org/w3c/dom/html
+
+ find examples/gnu/classpath/examples/html gnu/xml/dom/html2 external/w3c_dom/org/w3c/dom/html -name "*.java" \
+ -exec sed -i -e"s|org.w3c.dom.html2|org.w3c.dom.html|" {} \;
+
+ sed -i -e"s|org/w3c/dom/html2|org/w3c/dom/html|" external/w3c_dom/Makefile.am
+}
+
+addtask unpackpost after do_unpack before do_patch
+
+SRC_URI[md5sum] = "90c6571b8b0309e372faa0f9f6255ea9"
+SRC_URI[sha256sum] = "501b5acd4dff79b6100da22cef15080f31071821ce3cea6f1b739bc1b56fac3f"
+
diff --git a/recipes-core/classpath/classpath.inc b/recipes-core/classpath/classpath.inc
new file mode 100644
index 0000000..dfe4a68
--- /dev/null
+++ b/recipes-core/classpath/classpath.inc
@@ -0,0 +1,86 @@
+DESCRIPTION = "GNU Classpath standard Java libraries"
+HOMEPAGE = "http://www.gnu.org/software/classpath/"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "Classpath"
+PBN = "classpath"
+
+
+inherit autotools java
+
+DEPENDS = "virtual/javac-native fastjar-native zip-native gettext-native gmp antlr-native gtk+ gconf libxtst"
+
+RPROVIDES_${PN} = ""
+
+RDEPENDS_${PN} = "${PBN}-common (>= ${PV})"
+RDEPENDS_${PN}-examples = "java2-runtime ${PN}-awt"
+RDEPENDS_${PN}-tools = "java2-runtime"
+
+RPROVIDES_${PN} = "${PBN}"
+RPROVIDES_${PN}-common = "${PBN}-common"
+RPROVIDES_${PN}-gtk = "${PBN}-awt"
+
+SRC_URI = "${GNU_MIRROR}/classpath/classpath-${PV}.tar.gz"
+
+S = "${WORKDIR}/${PBN}-${PV}"
+
+export JAVA = "java"
+
+EXTRA_OECONF = "\
+ --with-glibj \
+ --with-ecj=javac \
+ --with-fastjar=fastjar \
+ --includedir=${includedir}/classpath \
+ --with-vm=java \
+ --disable-Werror \
+ --with-antlr-jar=${STAGING_DATADIR_JAVA_NATIVE}/antlr.jar \
+ --disable-alsa \
+ --disable-dssi \
+ --disable-qt4-peer \
+ --disable-plugin \
+ --enable-gconf-peer \
+ --enable-gtk-peer \
+ --enable-local-sockets \
+ --with-vm=java \
+ "
+
+
+EXTRA_OECONF += "\
+ "
+
+do_configure_prepend () {
+ cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}
+}
+
+
+do_install() {
+ autotools_do_install
+ mv ${D}${libdir}/security ${D}${libdir}/${PBN}
+}
+
+# Defines the packages that this classpath recipe creates.
+# This allows the classpath-minimal variants to override this
+# again.
+CPPACKAGES = "${PBN}-common ${PN}-examples \
+ ${PN}-tools ${PN}-tools-doc \
+ ${PN}-gtk ${PN}-gconf"
+
+PACKAGES =+ "${CPPACKAGES}"
+
+FILES_${PN}-dev += "${libdir}/${PBN}/*.la ${incdir}/${PBN}"
+
+FILES_${PBN}-common = "${datadir}/${PBN}/glibj.zip ${libdir}/logging.properties ${libdir}/${PBN}/security"
+FILES_${PN}-examples = "${datadir}/${PBN}/examples"
+
+FILES_${PN}-tools = "${datadir}/${PBN}/tools.zip ${bindir}"
+FILES_${PN}-tools-doc = "${mandir}"
+
+FILES_${PN}-dbg += "${libdir}/${PBN}/.debug"
+FILES_${PN}-doc = "${infodir}"
+
+# gcjwebplugin - not built yet
+#FILES_${PN}-gcjwebplugin = "${libdir}/${PBN}/libgcjwebplugin.so"
+FILES_${PN}-gtk = "${libdir}/${PBN}/libgtkpeer.so ${libdir}/${PBN}/libjawt.so"
+FILES_${PN}-gconf = "${libdir}/${PBN}/libgconfpeer.so"
+FILES_${PN} = "${libdir}/${PBN}/lib*so*"
+
diff --git a/recipes-core/classpath/classpath_0.98.bb b/recipes-core/classpath/classpath_0.98.bb
new file mode 100644
index 0000000..21223c9
--- /dev/null
+++ b/recipes-core/classpath/classpath_0.98.bb
@@ -0,0 +1,13 @@
+require classpath.inc
+
+SRC_URI += " \
+ file://SimpleName.diff;striplevel=0 \
+ file://ecj_java_dir.patch \
+ file://autotools.patch \
+ file://fix-gmp.patch \
+ file://toolwrapper-exithook.patch \
+ "
+
+SRC_URI[md5sum] = "90c6571b8b0309e372faa0f9f6255ea9"
+SRC_URI[sha256sum] = "501b5acd4dff79b6100da22cef15080f31071821ce3cea6f1b739bc1b56fac3f"
+
diff --git a/recipes-core/classpath/files/autotools.patch b/recipes-core/classpath/files/autotools.patch
new file mode 100644
index 0000000..663c034
--- /dev/null
+++ b/recipes-core/classpath/files/autotools.patch
@@ -0,0 +1,24 @@
+Index: classpath-0.93/configure.ac
+===================================================================
+--- classpath-0.93.orig/configure.ac 2006-12-08 20:22:50.000000000 +0100
++++ classpath-0.93/configure.ac 2008-08-25 22:07:40.711946598 +0200
+@@ -41,6 +41,11 @@
+ AC_CONFIG_HEADERS([include/config.h])
+ AC_PREFIX_DEFAULT(/usr/local/classpath)
+
++AC_CONFIG_MACRO_DIR([m4])
++
++
++AM_ICONV_LINK
++
+ dnl -----------------------------------------------------------
+ dnl Enable collections.jar (disabled by default)
+ dnl -----------------------------------------------------------
+@@ -312,6 +317,7 @@
+ dnl AC_PROG_AWK
+ AC_PROG_CC
+ AC_PROG_CPP
++AM_PROG_CC_C_O
+
+ # Handle -Werror default case.
+ if test "$ENABLE_WERROR" = default; then
diff --git a/recipes-core/classpathx/gnujaf-1.1.1/datadir_java.patch b/recipes-core/classpathx/gnujaf-1.1.1/datadir_java.patch
new file mode 100644
index 0000000..807a1cb
--- /dev/null
+++ b/recipes-core/classpathx/gnujaf-1.1.1/datadir_java.patch
@@ -0,0 +1,23 @@
+Index: activation-1.1.1/Makefile.am
+===================================================================
+--- activation-1.1.1.orig/Makefile.am 2008-03-01 10:30:06.000000000 +0100
++++ activation-1.1.1/Makefile.am 2008-03-01 10:31:04.000000000 +0100
+@@ -7,6 +7,8 @@
+ JAVADOC = @JAVADOC@
+ JAVADOCFLAGS = @JAVADOCFLAGS@
+
++JARDIR = $(datadir)/java
++
+ src = @srcdir@/source
+ dst = classes
+ doc = @srcdir@/docs
+@@ -92,7 +94,7 @@
+ $(RM) config.log config.status
+
+ install-data-local:
+- @srcdir@/mkinstalldirs $(DESTDIR)/$(datadir)/java
+- $(INSTALL_DATA) $(activation_jar) $(DESTDIR)/$(datadir)/java
++ @srcdir@/mkinstalldirs $(DESTDIR)/$(JARDIR)
++ $(INSTALL_DATA) $(activation_jar) $(DESTDIR)/$(JARDIR)
+
+ # End of Makefile.am
diff --git a/recipes-core/classpathx/gnujaf_1.1.1.bb b/recipes-core/classpathx/gnujaf_1.1.1.bb
new file mode 100644
index 0000000..2c055bb
--- /dev/null
+++ b/recipes-core/classpathx/gnujaf_1.1.1.bb
@@ -0,0 +1,35 @@
+DESCRIPTION = "Provides a mean to type data and locate components suitable for performing various kinds of action on it."
+AUTHOR = "GNU ClasspathX"
+LICENSE = "GPL+libraryexception"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7"
+
+SRC_URI = "http://ftp.gnu.org/gnu/classpathx/activation-${PV}.tar.gz \
+ file://datadir_java.patch \
+ "
+
+inherit autotools java-library
+
+S = "${WORKDIR}/activation-${PV}"
+
+export JAVAC = "javac"
+
+# Fake javadoc
+export JAVADOC = "true"
+
+JARFILENAME = "activation-${PV}.jar"
+ALTJARFILENAMES = "activation.jar gnujaf.jar"
+
+do_compile() {
+ mkdir -p build
+
+ javac -sourcepath source -d build `find source -name "*.java"`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "de50d7728e8140eb404f2b4554321f8c"
+SRC_URI[sha256sum] = "b1b5ef560d30fcb11fbf537246857d14110ce4eb2b200d4c54690472305d87b7"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/classpathx/gnumail-1.1.2/datadir_java.patch b/recipes-core/classpathx/gnumail-1.1.2/datadir_java.patch
new file mode 100644
index 0000000..50e908d
--- /dev/null
+++ b/recipes-core/classpathx/gnumail-1.1.2/datadir_java.patch
@@ -0,0 +1,25 @@
+Index: mail-1.1.2/Makefile.am
+===================================================================
+--- mail-1.1.2.orig/Makefile.am 2008-03-01 11:13:36.000000000 +0100
++++ mail-1.1.2/Makefile.am 2008-03-01 11:17:49.000000000 +0100
+@@ -7,6 +7,8 @@
+ JAVADOC = @JAVADOC@
+ JAVADOCFLAGS = @JAVADOCFLAGS@
+
++JARDIR = $(datadir)/java
++
+ src = @srcdir@/source
+ dst = classes
+ doc = @srcdir@/docs
+@@ -433,8 +435,8 @@
+ rm -rf $(gnumail_jar) $(providers_jar) META-INF $(dst) $(doc)
+
+ install-data-local:
+- @srcdir@/mkinstalldirs $(DESTDIR)/$(datadir)/java
+- $(INSTALL_DATA) $(gnumail_jar) $(DESTDIR)/$(datadir)/java
+- $(INSTALL_DATA) $(providers_jar) $(DESTDIR)/$(datadir)/java
++ @srcdir@/mkinstalldirs $(DESTDIR)/$(JARDIR)
++ $(INSTALL_DATA) $(gnumail_jar) $(DESTDIR)/$(JARDIR)
++ $(INSTALL_DATA) $(providers_jar) $(DESTDIR)/$(JARDIR)
+
+ # End of Makefile.am
diff --git a/recipes-core/classpathx/gnumail_1.1.2.bb b/recipes-core/classpathx/gnumail_1.1.2.bb
new file mode 100644
index 0000000..4cdee2b
--- /dev/null
+++ b/recipes-core/classpathx/gnumail_1.1.2.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "GNU's free implementation of the JavaMail API specification"
+AUTHOR = "GNU ClasspathX"
+LICENSE = "GPL+libraryexception"
+LIC_FILES_CHKSUM = "file://COPYING;md5=14bc6ee8b2e2b409be599212867d126e"
+
+SRC_URI = "http://ftp.gnu.org/gnu/classpathx/mail-${PV}.tar.gz \
+ file://datadir_java.patch \
+ "
+
+inherit java-library autotools
+
+S = "${WORKDIR}/mail-${PV}"
+
+DEPENDS = "gnujaf inetlib"
+DEPENDS_virtclass-native = "gnujaf-native inetlib-native"
+
+export JAVAC = "${STAGING_BINDIR_NATIVE}/javac"
+export JAVA = "${STAGING_BINDIR_NATIVE}/java"
+
+# Fake javadoc
+export JAVADOC = "true"
+
+EXTRA_OECONF = " \
+ --with-inetlib-jar=${STAGING_DATADIR_JAVA} \
+ --with-activation-jar=${STAGING_DATADIR_JAVA} \
+ "
+
+do_compile() {
+ oe_runmake \
+ JARDIR=${datadir_java} \
+ gnumail_jar=${JARFILENAME} \
+ providers_jar=${P}-providers.jar
+}
+
+SRC_URI[md5sum] = "0a94ff4328ceb6a4131be96946976a33"
+SRC_URI[sha256sum] = "5eb09597a8f81bfc943206e3e0f45b963ba605a646051c353374f1b475bb9f04"
+
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/classpathx/inetlib-1.1.1/datadir_java.patch b/recipes-core/classpathx/inetlib-1.1.1/datadir_java.patch
new file mode 100644
index 0000000..16302cd
--- /dev/null
+++ b/recipes-core/classpathx/inetlib-1.1.1/datadir_java.patch
@@ -0,0 +1,23 @@
+Index: inetlib-1.1.1/Makefile.am
+===================================================================
+--- inetlib-1.1.1.orig/Makefile.am 2008-03-01 10:49:49.000000000 +0100
++++ inetlib-1.1.1/Makefile.am 2008-03-01 10:52:21.000000000 +0100
+@@ -7,6 +7,8 @@
+ JAVADOC = @JAVADOC@
+ JAVADOCFLAGS = @JAVADOCFLAGS@
+
++JARDIR = $(datadir)/java
++
+ src = @srcdir@/source
+ dst = classes
+ doc = @srcdir@/docs
+@@ -280,7 +282,7 @@
+ find $(dst) -name '*.class' -exec rm -f '{}' ';'
+
+ install-data-local:
+- $(mkinstalldirs) $(prefix)/share/java
+- $(INSTALL_DATA) $(inetlib_jar) $(prefix)/share/java
++ $(mkinstalldirs) $(DESTDIR)/$(JARDIR)
++ $(INSTALL_DATA) $(inetlib_jar) $(DESTDIR)/$(JARDIR)
+
+ # End of Makefile.am
diff --git a/recipes-core/classpathx/inetlib_1.1.1.bb b/recipes-core/classpathx/inetlib_1.1.1.bb
new file mode 100644
index 0000000..862b730
--- /dev/null
+++ b/recipes-core/classpathx/inetlib_1.1.1.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "A Java library of clients for common internet protocols"
+AUTHOR = "GNU Classpath"
+HOMEPAGE = "http://gnu.org/software/classpath/inetlib.html"
+LICENSE = "GPL+libraryexception"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+SRC_URI = "http://ftp.gnu.org/gnu/classpath/${BP}.tar.gz \
+ file://datadir_java.patch \
+ "
+
+inherit java-library autotools
+
+JPN = "libgnuinet-java"
+
+export JAVAC = "javac"
+
+export JAVA = "java"
+
+# We fake this, it is not neccessary anyway.
+export JAVADOC = "true"
+
+do_compile() {
+ oe_runmake JARDIR=${datadir_java} inetlib_jar=${JARFILENAME}
+}
+
+SRC_URI[md5sum] = "aaa24be4bc8d172ac675be8bdfa636ee"
+SRC_URI[sha256sum] = "1b078a39e022f86e4e2c8189b4d2789a5da414e8f1cb285587b7800b950a44de"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/cup/cup_0.10k.bb b/recipes-core/cup/cup_0.10k.bb
new file mode 100644
index 0000000..5b76fcc
--- /dev/null
+++ b/recipes-core/cup/cup_0.10k.bb
@@ -0,0 +1,47 @@
+DESCRIPTION = "Lexical analyzer generator for Java"
+AUTHOR = "Elliot Berk, A. Appel, C. Scott Ananian"
+LICENSE = "CUP"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/LICENSE;md5=2c9db91c00f38e52cfc8e67bafaa7c33"
+
+
+RDEPENDS_${PN} = "java2-runtime"
+RDEPENDS_${PN}_virtclass-native = ""
+
+inherit java-library
+
+SRC_URI = "http://www.cs.princeton.edu/~appel/modern/java/CUP/java_${BPN}_v10k.tar.gz \
+ file://cup \
+ "
+
+S = "${WORKDIR}/java_cup"
+
+do_configure() {
+ sed -i \
+ -e "s|OE_STAGING_BINDIR|${bindir}|" \
+ -e "s|OE_STAGING_DATADIR_JAVA|${data_java}|" \
+ -e "s|OE_CUP_JAR|${BP}.jar|" \
+ ${WORKDIR}/cup
+}
+
+do_compile() {
+ mkdir -p build
+
+ javac -d build `find . -name "*.java"`
+
+ fastjar -C build -c -f ${BP}.jar .
+}
+
+do_install_append() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/cup ${D}${bindir}
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} += "${datadir_java}"
+
+SRC_URI[md5sum] = "8b11edfec13c590ea443d0f0ae0da479"
+SRC_URI[sha256sum] = "7e6dc5be74ae56c7e86e69ad0ad88dae3b2847afa9e73a76635918a6b1eb75cd"
+
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/cup/files/cup b/recipes-core/cup/files/cup
new file mode 100755
index 0000000..34b4f05
--- /dev/null
+++ b/recipes-core/cup/files/cup
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cp=OE_STAGING_DATADIR_JAVA/OE_CUP_JAR
+
+exec OE_STAGING_BINDIR/java -cp $cp java_cup.Main "$@"
diff --git a/recipes-core/ecj/ecj-bootstrap-native.bb b/recipes-core/ecj/ecj-bootstrap-native.bb
new file mode 100644
index 0000000..df05be5
--- /dev/null
+++ b/recipes-core/ecj/ecj-bootstrap-native.bb
@@ -0,0 +1,38 @@
+# ECJ as a bootstrap compiler is a drop-in replacement for Sun's javac. It offers no more
+# and no less features.
+#
+# This recipe uses the jar created by libecj-bootstrap.
+
+DESCRIPTION = "JDT Core Batch Compiler - Bootstrap variant"
+HOMEPAGE = "http://www.eclipse.org/"
+SECTION = "devel"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
+ "
+
+DEPENDS = "libecj-bootstrap virtual/java-native"
+
+PROVIDES = "virtual/javac-native"
+
+SRC_URI = "file://ecj.in"
+
+S = "${WORKDIR}"
+
+JAR = "ecj-bootstrap.jar"
+
+inherit native
+
+do_compile() {
+ # Create the start script
+ echo "#!/bin/sh" > ecj-bootstrap
+ echo "ECJ_JAR=${STAGING_DATADIR}/java/${JAR}" >> ecj-bootstrap
+ echo "RUNTIME=java" >> ecj-bootstrap
+ cat ecj.in >> ecj-bootstrap
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 755 ${S}/ecj-bootstrap ${D}${bindir}
+ install -m 755 ${S}/ecj-bootstrap ${D}${bindir}/javac
+}
diff --git a/recipes-core/ecj/ecj-initial.bb b/recipes-core/ecj/ecj-initial.bb
new file mode 100644
index 0000000..45317a6
--- /dev/null
+++ b/recipes-core/ecj/ecj-initial.bb
@@ -0,0 +1,32 @@
+# ECJ as a bootstrap compiler is a drop-in replacement for Sun's javac. It offers no more
+# and no less features.
+
+# This variant runs on the initial (not Java5-compatible runtime).
+
+DESCRIPTION = "JDT Core Batch Compiler - Bootstrap variant"
+HOMEPAGE = "http://www.eclipse.org/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+DEPENDS = "libecj-bootstrap"
+
+SRC_URI = "file://ecj-initial.in"
+
+S = "${WORKDIR}"
+
+inherit native
+
+JAR = "ecj-bootstrap.jar"
+
+do_compile() {
+ # Create the start script
+ echo "#!/bin/sh" > ecj-initial
+ echo "ECJ_JAR=${STAGING_DATADIR}/java/${JAR}" >> ecj-initial
+ echo "RUNTIME=java-initial" >> ecj-initial
+ cat ecj-initial.in >> ecj-initial
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 755 ${S}/ecj-initial ${D}${bindir}
+}
diff --git a/recipes-core/ecj/files/ecj-initial.in b/recipes-core/ecj/files/ecj-initial.in
new file mode 100755
index 0000000..2099991
--- /dev/null
+++ b/recipes-core/ecj/files/ecj-initial.in
@@ -0,0 +1 @@
+${RUNTIME} -Xmx512m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"}
diff --git a/recipes-core/ecj/files/ecj.in b/recipes-core/ecj/files/ecj.in
new file mode 100755
index 0000000..30c3862
--- /dev/null
+++ b/recipes-core/ecj/files/ecj.in
@@ -0,0 +1,12 @@
+error_counter=0;
+error_occured=139
+while [ ${error_counter} -le 50 -a ${error_occured} -eq 139 ]; do
+ ${RUNTIME} -Xmx1024m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"}
+ error_occured=$?
+ if [ ${error_occured} -eq 139 ]; then
+ echo "ecj crashed - silently trying again"
+ error_counter=$(( $error_counter + 1 ))
+ fi
+done
+
+exit ${error_occured}
diff --git a/recipes-core/ecj/libecj-bootstrap.inc b/recipes-core/ecj/libecj-bootstrap.inc
new file mode 100644
index 0000000..e704a87
--- /dev/null
+++ b/recipes-core/ecj/libecj-bootstrap.inc
@@ -0,0 +1,68 @@
+# This package compiles and stages only the Jar.
+
+DESCRIPTION = "JDT Core Batch Compiler - Jar only"
+HOMEPAGE = "http://www.eclipse.org/"
+LICENSE = "EPL-1"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/EPL-1;md5=d830412fb40c35122cb4d78375d30f76"
+
+DEPENDS = "fastjar-native jikes-initial virtual/java-initial"
+
+inherit native java
+
+S = "${WORKDIR}"
+
+JAR = "ecj-bootstrap-${PV}.jar"
+
+do_unpackpost() {
+ if [ ! -d source ]; then
+ mkdir source
+ fi
+
+ if [ ! -d build ]; then
+ mkdir build
+ fi
+
+ # Remove crap.
+ rm about.html build.xml
+ rm -rf META-INF
+
+ # Move source into separate subdir.
+ mv org source/
+
+ # Remove stuff unneeded for the bootstrap compiler.
+ rm -rf source/org/eclipse/jdt/internal/compiler/apt
+ rm -rf source/org/eclipse/jdt/internal/compiler/tool
+ rm -rf source/org/eclipse/jdt/internal/antadapter
+ rm source/org/eclipse/jdt/core/JDTCompilerAdapter.java
+
+ # Make a copy of the remaining source to get the embedded
+ # resources.
+ cp -R source/org build/
+
+ # Remove source code and other stuff.
+ find build -name '*.java' -exec rm -f {} \;
+ find build -name '*.html' -exec rm -f {} \;
+}
+
+addtask unpackpost after do_unpack before do_patch
+
+do_compile() {
+ find source -name '*.java' > sourcefiles
+ split -l 25 sourcefiles ecj-sources.
+
+ # Compiling in place is done because the sources contain
+ # property files which need to be available at runtime.
+ for list in `find . -name 'ecj-sources.*'`; do
+ echo "building files in $list ...";
+ echo jikes-initial -d build -source 1.4 -sourcepath source `cat $list`;
+ jikes-initial \
+ -d build -source 1.4 -sourcepath source `cat $list`;
+ done
+
+ fastjar -c -C build . -f ${JAR}
+}
+
+do_install() {
+ oe_jarinstall ${JAR} ecj-bootstrap.jar
+}
+
diff --git a/recipes-core/ecj/libecj-bootstrap_3.6.2.bb b/recipes-core/ecj/libecj-bootstrap_3.6.2.bb
new file mode 100644
index 0000000..98edc01
--- /dev/null
+++ b/recipes-core/ecj/libecj-bootstrap_3.6.2.bb
@@ -0,0 +1,7 @@
+require libecj-bootstrap.inc
+
+SRC_URI = " http://mirrors.ibiblio.org/pub/mirrors/eclipse/eclipse/downloads/drops/R-3.6.2-201102101200/ecjsrc-${PV}.zip"
+
+SRC_URI[md5sum] = "3f3ca1973dd7a21780525c9ffba7a263"
+SRC_URI[sha256sum] = "94f2095d38d71b414a593ec56847008bec267a926ec935959fecdde44f98467f"
+
diff --git a/recipes-core/fastjar/fastjar.inc b/recipes-core/fastjar/fastjar.inc
new file mode 100644
index 0000000..f48135d
--- /dev/null
+++ b/recipes-core/fastjar/fastjar.inc
@@ -0,0 +1,16 @@
+DESCRIPTION = "jar replacement written in C."
+HOMEPAGE = "http://savannah.nongnu.org/projects/fastjar/"
+SECTION = "devel"
+PRIORITY = "optional"
+LICENSE = "GPLv2"
+
+DEPENDS = "zlib"
+
+SRC_URI = "http://download.savannah.nongnu.org/releases/fastjar/fastjar-${PV}.tar.gz"
+
+inherit autotools
+
+PACKAGES = "${PN}-grepjar ${PN} ${PN}-dbg ${PN}-doc"
+FILES_${PN}-grepjar = "${bindir}/grepjar"
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/fastjar/fastjar/jartool.patch b/recipes-core/fastjar/fastjar/jartool.patch
new file mode 100644
index 0000000..bb58b27
--- /dev/null
+++ b/recipes-core/fastjar/fastjar/jartool.patch
@@ -0,0 +1,114 @@
+Index: fastjar-0.98/jartool.c
+===================================================================
+--- fastjar-0.98.orig/jartool.c 2009-09-07 00:10:47.000000000 +0200
++++ fastjar-0.98/jartool.c 2011-11-10 13:59:01.320585544 +0100
+@@ -790,6 +790,7 @@
+ progname, jarfile);
+ return 1;
+ }
++ ze->filename[len] = '\0';
+ len = UNPACK_UB4(header, CEN_EFLEN);
+ len += UNPACK_UB4(header, CEN_COMLEN);
+ if (lseek (fd, len, SEEK_CUR) == -1)
+@@ -1257,7 +1258,7 @@
+ exit_on_error("write");
+
+ /* write the file name to the zip file */
+- if (1 == write(jfd, fname, file_name_length))
++ if (-1 == write(jfd, fname, file_name_length))
+ exit_on_error("write");
+
+ if(verbose){
+@@ -1730,7 +1731,17 @@
+ struct stat sbuf;
+ int depth = 0;
+
+- tmp_buff = malloc(sizeof(char) * strlen((const char *)filename));
++ if(*filename == '/'){
++ fprintf(stderr, "Absolute path names are not allowed.\n");
++ exit(EXIT_FAILURE);
++ }
++
++ tmp_buff = malloc(strlen((const char *)filename));
++
++ if(tmp_buff == NULL) {
++ fprintf(stderr, "Out of memory.\n");
++ exit(EXIT_FAILURE);
++ }
+
+ for(;;){
+ const ub1 *idx = (const unsigned char *)strchr((const char *)start, '/');
+@@ -1738,25 +1749,28 @@
+ if(idx == NULL)
+ break;
+ else if(idx == start){
++ tmp_buff[idx - filename] = '/';
+ start++;
+ continue;
+ }
+- start = idx + 1;
+
+- strncpy(tmp_buff, (const char *)filename, (idx - filename));
+- tmp_buff[(idx - filename)] = '\0';
++ memcpy(tmp_buff + (start - filename), (const char *)start, (idx - start));
++ tmp_buff[idx - filename] = '\0';
+
+ #ifdef DEBUG
+ printf("checking the existance of %s\n", tmp_buff);
+ #endif
+- if(strcmp(tmp_buff, "..") == 0){
++ if(idx - start == 2 && memcmp(start, "..", 2) == 0){
+ --depth;
+ if (depth < 0){
+ fprintf(stderr, "Traversal to parent directories during unpacking!\n");
+ exit(EXIT_FAILURE);
+ }
+- } else if (strcmp(tmp_buff, ".") != 0)
++ } else if (idx - start != 1 || *start != '.')
+ ++depth;
++
++ start = idx + 1;
++
+ if(stat(tmp_buff, &sbuf) < 0){
+ if(errno != ENOENT)
+ exit_on_error("stat");
+@@ -1765,6 +1779,7 @@
+ #ifdef DEBUG
+ printf("Directory exists\n");
+ #endif
++ tmp_buff[idx - filename] = '/';
+ continue;
+ }else {
+ fprintf(stderr, "Hmmm.. %s exists but isn't a directory!\n",
+@@ -1781,10 +1796,11 @@
+ if(verbose && handle)
+ printf("%10s: %s/\n", "created", tmp_buff);
+
++ tmp_buff[idx - filename] = '/';
+ }
+
+ /* only a directory */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ dir = TRUE;
+
+ #ifdef DEBUG
+@@ -1792,7 +1808,7 @@
+ #endif
+
+ /* If the entry was just a directory, don't write to file, etc */
+- if(strlen((const char *)start) == 0)
++ if(*start == '\0')
+ f_fd = -1;
+
+ free(tmp_buff);
+@@ -1876,7 +1892,8 @@
+ exit(EXIT_FAILURE);
+ }
+
+- close(f_fd);
++ if (f_fd != -1)
++ close(f_fd);
+
+ if(verbose && dir == FALSE && handle)
+ printf("%10s: %s\n",
diff --git a/recipes-core/fastjar/fastjar_0.98.bb b/recipes-core/fastjar/fastjar_0.98.bb
new file mode 100644
index 0000000..5b5a403
--- /dev/null
+++ b/recipes-core/fastjar/fastjar_0.98.bb
@@ -0,0 +1,9 @@
+require fastjar.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+SRC_URI += "file://jartool.patch"
+
+SRC_URI[md5sum] = "d2d264d343d4d0e1575832cc1023c3bf"
+SRC_URI[sha256sum] = "f156abc5de8658f22ee8f08d7a72c88f9409ebd8c7933e9466b0842afeb2f145"
+
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/build-hacks-native.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/build-hacks-native.patch
new file mode 100644
index 0000000..9432d03
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/build-hacks-native.patch
@@ -0,0 +1,15 @@
+Index: icedtea6-1.6.1/Makefile.am
+===================================================================
+--- icedtea6-1.6.1.orig/Makefile.am 2009-12-24 11:38:06.582572265 +0100
++++ icedtea6-1.6.1/Makefile.am 2009-12-24 11:57:27.159578486 +0100
+@@ -265,6 +265,10 @@
+ FT2_LIB="$(FREETYPE2_LIBS)" \
+ ALT_PARALLEL_COMPILE_JOBS="$(PARALLEL_JOBS)" \
+ HOTSPOT_BUILD_JOBS="$(PARALLEL_JOBS)" \
++ OE_CFLAGS="$(OE_CFLAGS)" \
++ OE_CPPFLAGS="$(OE_CPPFLAGS)" \
++ OE_CXXFLAGS="$(OE_CXXFLAGS)" \
++ OE_LDFLAGS="$(OE_LDFLAGS)" \
+ JAVAC="" \
+ RHINO_JAR="$(RHINO_JAR)" \
+ JAR_KNOWS_ATFILE="$(JAR_KNOWS_ATFILE)" \
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/disable-library-checks.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/disable-library-checks.patch
new file mode 100644
index 0000000..23b8bed
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/disable-library-checks.patch
@@ -0,0 +1,141 @@
+Index: icedtea6-1.7/configure.ac
+===================================================================
+--- icedtea6-1.7.orig/configure.ac 2010-01-26 04:52:18.000000000 +0100
++++ icedtea6-1.7/configure.ac 2010-02-08 12:05:51.354556052 +0100
+@@ -205,9 +205,9 @@
+ fi
+
+ dnl pkgconfig cannot be used to find these headers and libraries.
+-AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
+- ,[AC_MSG_ERROR("CUPS headers were not found -
+- try installing cups-devel.")])
++#AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
++# ,[AC_MSG_ERROR("CUPS headers were not found -
++# try installing cups-devel.")])
+ AC_CHECK_HEADERS([X11/X.h],[]
+ ,[AC_MSG_ERROR("xorg headers were not found -
+ try installing xorg-x11-proto-devel.")])
+@@ -239,12 +239,12 @@
+ AC_SUBST(XT_LIBS)
+
+ dnl Check for libXp headers and libraries.
+-PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no])
+-if test "x${XP_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xp - \
+- Try installing libXp-devel.])
+-fi
++#PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no])
++#if test "x${XP_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xp - \
++# Try installing libXp-devel.])
++#fi
+ AC_SUBST(XP_CFLAGS)
+ AC_SUBST(XP_LIBS)
+
+@@ -258,16 +258,16 @@
+ AC_SUBST(X11_CFLAGS)
+ AC_SUBST(X11_LIBS)
+
+-dnl Check for libXinerama headers and libraries.
+-PKG_CHECK_MODULES(XINERAMA, xinerama,[XINERAMA_FOUND=yes]
+- ,[XINERAMA_FOUND=no])
+-if test "x${XINERAMA_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xinerama - \
+- Try installing libXinerama-devel.])
+-fi
+-AC_SUBST(XINERAMA_CFLAGS)
+-AC_SUBST(XINERAMA_LIBS)
++#dnl Check for libXinerama headers and libraries.
++#PKG_CHECK_MODULES(XINERAMA, xinerama,[XINERAMA_FOUND=yes]
++# ,[XINERAMA_FOUND=no])
++#if test "x${XINERAMA_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xinerama - \
++# Try installing libXinerama-devel.])
++#fi
++#AC_SUBST(XINERAMA_CFLAGS)
++#AC_SUBST(XINERAMA_LIBS)
+
+ if test "x${ENABLE_XRENDER}" = "xyes"
+ then
+@@ -341,26 +341,26 @@
+ AC_CONFIG_FILES([tapset/jstack.stp])
+ fi
+
+-dnl Check for libpng headers and libraries.
+-PKG_CHECK_MODULES(LIBPNG, libpng,[LIBPNG_FOUND=yes]
+- ,[LIBPNG_FOUND=no])
+-if test "x${LIBPNG_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find libpng - \
+- Try installing libpng-devel.])
+-fi
+-AC_SUBST(LIBPNG_CFLAGS)
+-AC_SUBST(LIBPNG_LIBS)
+-
+-dnl Check for libXtst headers and libraries.
+-PKG_CHECK_MODULES(XTST, xtst,[XTST_FOUND=yes],[XTST_FOUND=no])
+-if test "x${XTST_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xtst - \
+- Try installing libXtst-devel.])
+-fi
+-AC_SUBST(XTST_CFLAGS)
+-AC_SUBST(XTST_LIBS)
++#dnl Check for libpng headers and libraries.
++#PKG_CHECK_MODULES(LIBPNG, libpng,[LIBPNG_FOUND=yes]
++# ,[LIBPNG_FOUND=no])
++#if test "x${LIBPNG_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find libpng - \
++# Try installing libpng-devel.])
++#fi
++#AC_SUBST(LIBPNG_CFLAGS)
++#AC_SUBST(LIBPNG_LIBS)
++
++#dnl Check for libXtst headers and libraries.
++#PKG_CHECK_MODULES(XTST, xtst,[XTST_FOUND=yes],[XTST_FOUND=no])
++#if test "x${XTST_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xtst - \
++# Try installing libXtst-devel.])
++#fi
++#AC_SUBST(XTST_CFLAGS)
++#AC_SUBST(XTST_LIBS)
+
+ dnl Check for freetype2 headers and libraries.
+ PKG_CHECK_MODULES(FREETYPE2, freetype2,[FREETYPE2_FOUND=yes]
+@@ -373,18 +373,18 @@
+ AC_SUBST(FREETYPE2_CFLAGS)
+ AC_SUBST(FREETYPE2_LIBS)
+
+-dnl Check for alsa headers and libraries (only required for Linux).
+-if test "x${BUILD_OS_DIR}" = "xlinux"
+-then
+- PKG_CHECK_MODULES(ALSA, alsa,[ALSA_FOUND=yes],[ALSA_FOUND=no])
+- if test "x${ALSA_FOUND}" = xno
+- then
+- AC_MSG_ERROR([Could not find alsa - \
+- Try installing alsa-lib-devel.])
+- fi
+-AC_SUBST(ALSA_CFLAGS)
+-AC_SUBST(ALSA_LIBS)
+-fi
++#dnl Check for alsa headers and libraries (only required for Linux).
++#if test "x${BUILD_OS_DIR}" = "xlinux"
++#then
++# PKG_CHECK_MODULES(ALSA, alsa,[ALSA_FOUND=yes],[ALSA_FOUND=no])
++# if test "x${ALSA_FOUND}" = xno
++# then
++# AC_MSG_ERROR([Could not find alsa - \
++# Try installing alsa-lib-devel.])
++# fi
++#AC_SUBST(ALSA_CFLAGS)
++#AC_SUBST(ALSA_LIBS)
++#fi
+
+ if test "x${enable_pulse_java}" = "xyes"
+ then
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-disable-compilation.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-disable-compilation.patch
new file mode 100644
index 0000000..cd0f68a
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-disable-compilation.patch
@@ -0,0 +1,513 @@
+Index: openjdk/jdk/make/sun/awt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/awt/Makefile 2009-04-24 09:33:55.000000000 +0200
++++ openjdk/jdk/make/sun/awt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -180,7 +180,8 @@
+ include $(BUILDDIR)/common/Mapfile-vers.gmk
+ include $(BUILDDIR)/common/Library.gmk
+
+-build: fontconfigs
++#build: fontconfigs
++build:
+
+
+ ifeq ($(PLATFORM), windows)
+@@ -535,9 +536,9 @@
+ -I$(PLATFORM_SRC)/native/$(PKGDIR) \
+ $(EVENT_MODEL)
+
+-ifeq ($(PLATFORM), linux)
+-LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
+-endif
++#ifeq ($(PLATFORM), linux)
++#LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
++#endif
+
+ LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
+ $(AWT_RUNPATH)
+Index: openjdk/jdk/make/javax/sound/jsoundalsa/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/javax/sound/jsoundalsa/Makefile 2009-09-29 13:48:34.534565581 +0200
++++ openjdk/jdk/make/javax/sound/jsoundalsa/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -44,34 +44,35 @@
+ # Files
+ #
+
+-FILES_c = \
+- Utilities.c \
+- $(DAUDIOFILES_c) \
+- $(MIDIFILES_c) \
+- $(PORTFILES_c)
++#FILES_c = \
++# Utilities.c \
++# $(DAUDIOFILES_c) \
++# $(MIDIFILES_c) \
++# $(PORTFILES_c)
+
+ # platform dependent files
+-FILES_c += \
+- PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_PCM.c \
+- PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_Ports.c
+-
+-FILES_export = \
+- $(DAUDIOFILES_export) \
+- $(MIDIFILES_export) \
+- $(PORTFILES_export)
++#FILES_c += \
++# PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_PCM.c \
++# PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_Ports.c
++
++FILES_export =
++#FILES_export = \
++# $(DAUDIOFILES_export) \
++# $(MIDIFILES_export) \
++# $(PORTFILES_export)
+
+-OTHER_LDLIBS += -lasound
++#OTHER_LDLIBS += -lasound
+
+ CPPFLAGS += \
+- -DUSE_DAUDIO=TRUE \
+- -DUSE_PORTS=TRUE \
+- -DUSE_PLATFORM_MIDI_OUT=TRUE \
+- -DUSE_PLATFORM_MIDI_IN=TRUE \
++ -DUSE_DAUDIO=FALSE \
++ -DUSE_PORTS=FALSE \
++ -DUSE_PLATFORM_MIDI_OUT=FALSE \
++ -DUSE_PLATFORM_MIDI_IN=FALSE \
+ -I$(SHARE_SRC)/native/com/sun/media/sound
+
+ #
+Index: openjdk/jdk/make/sun/splashscreen/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/splashscreen/Makefile 2009-09-29 13:48:33.738565601 +0200
++++ openjdk/jdk/make/sun/splashscreen/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -32,7 +32,8 @@
+ #
+ # Files
+ #
+-include FILES_c.gmk
++#include FILES_c.gmk
++FILES_c =
+
+ FILES_java = \
+ java/awt/SplashScreen.java
+@@ -62,9 +63,9 @@
+ CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE
+
+ ifneq ($(PLATFORM), windows)
+- CFLAGS += -DWITH_X11
+- CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
+- OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpng -ljpeg -lgif -lz -lpthread
++# CFLAGS += -DWITH_X11
++# CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
++# OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpng -ljpeg -lgif -lz -lpthread
+ else # PLATFORM
+ CFLAGS += -DWITH_WIN32
+ OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib
+@@ -79,7 +80,7 @@
+ vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
+ vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen
+
+-CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
++#CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
+
+ ifeq ($(PLATFORM), linux)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+Index: openjdk/jdk/make/sun/xawt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/xawt/Makefile 2009-04-24 09:33:56.000000000 +0200
++++ openjdk/jdk/make/sun/xawt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -41,15 +41,16 @@
+ #
+ # Files
+ #
+-include FILES_c_unix.gmk
+-include FILES_export_unix.gmk
++#include FILES_c_unix.gmk
++FILES_c =
++#include FILES_export_unix.gmk
+ AUTO_FILES_JAVA_DIRS = sun/awt/X11
+ AUTO_JAVA_PRUNE = WrapperGenerator.java
+
+ LDFLAGS += -L$(OPENWIN_LIB)
+
+ ifeq ($(PLATFORM), linux)
+-LDFLAGS += -lpthread
++#LDFLAGS += -lpthread
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+
+@@ -86,16 +87,19 @@
+ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl
+ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11
+
+-OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -ldl \
+- $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
++#OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -ldl \
++# $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
+
+ ifeq ($(PLATFORM), solaris)
+ CPPFLAGS += -DFUNCPROTO=15
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+
+-CPPFLAGS += -I$(CUPS_HEADERS_PATH)
++#CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+
++# Normally we would like to patch these includes away but
++# we need them for the successfull compilation of the sizer
++# executables.
+ CPPFLAGS += -DXAWT -DXAWT_HACK \
+ -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
+ -I$(PLATFORM_SRC)/native/sun/awt \
+@@ -124,10 +128,10 @@
+
+ ifeq ($(PLATFORM), linux)
+ # Allows for builds on Debian GNU Linux, X11 is in a different place
+- CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
+- -I/usr/include/X11/extensions \
+- -I$(MOTIF_DIR)/include \
+- -I$(OPENWIN_HOME)/include
++# CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
++# -I/usr/include/X11/extensions \
++# -I$(MOTIF_DIR)/include \
++# -I$(OPENWIN_HOME)/include
+ endif
+
+ ifeq ($(PLATFORM), solaris)
+@@ -238,18 +242,20 @@
+ $(SIZER_DIR) $(XLIBTYPES) "sizer" $(subst .,,$(suffix $(basename $@)))
+
+ $(SIZES): $(SIZERS)
+- @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
+- $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
+- $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
+- $(CHMOD) +w $@;\
+- else \
+- $(ECHO) GENERATING $@; \
+- $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
+- fi
+- @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
+- $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+- $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+- fi
++ touch $(SIZES)
++#
++# @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
++# $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
++# $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
++# $(CHMOD) +w $@;\
++# else \
++# $(ECHO) GENERATING $@; \
++# $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
++# fi
++# @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
++# $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
++# $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
++# fi
+
+ $(TEMPDIR)/.gen.wrappers: $(SIZES) $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
+ $(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
+Index: openjdk/jdk/make/sun/jawt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/jawt/Makefile 2009-09-29 13:48:34.186565471 +0200
++++ openjdk/jdk/make/sun/jawt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -36,7 +36,8 @@
+ ifeq ($(PLATFORM), windows)
+ FILES_cpp = jawt.cpp
+ else # PLATFORM
+-FILES_c = jawt.c
++FILES_c =
++#FILES_c = jawt.c
+ endif # PLATFORM
+
+ FILES_h = $(INCLUDEDIR)/jawt.h \
+Index: openjdk/jdk/make/sun/jpeg/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/jpeg/Makefile 2009-09-29 13:48:33.726565626 +0200
++++ openjdk/jdk/make/sun/jpeg/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -37,7 +37,8 @@
+ #
+ # Files
+ #
+-include FILES_c.gmk
++FILES_c =
++#include FILES_c.gmk
+
+ AUTO_FILES_JAVA_DIRS = sun/awt/image com/sun/imageio/plugins/jpeg
+
+Index: openjdk/jdk/make/common/shared/Defs-java.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/shared/Defs-java.gmk 2009-09-29 13:48:55.954565215 +0200
++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2009-09-29 13:57:14.446815782 +0200
+@@ -36,14 +36,14 @@
+ # Memory related -J flags that all uses of java tools should use.
+ #
+ JAVA_MEM_FLAGS = -Xmx$(MAX_VM_MEMORY)m
+-ifneq (,$(filter $(ARCH), ia64 s390))
++#ifneq (,$(filter $(ARCH), ia64 s390))
+ # Special flags for javac on ia64 to work around a VM problem with
+ # bad code generation during inlining (what version had this problem?):
+ # Suspect this may not be needed anymore.
+- JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
+-else
+- JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
+-endif
++# JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
++#else
++# JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
++#endif
+
+ #
+ # All java tools (javac, javah, and javadoc) run faster with certain java
+Index: openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-04-24 09:34:04.000000000 +0200
++++ openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-09-29 13:57:14.450815511 +0200
+@@ -113,7 +113,7 @@
+ * @since 1.4
+ */
+ public static boolean isHeadless() {
+- return getHeadlessProperty();
++ return true;
+ }
+
+ /**
+Index: openjdk/corba/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/corba/make/common/Defs.gmk 2009-04-24 09:30:19.000000000 +0200
++++ openjdk/corba/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
+@@ -444,11 +444,11 @@
+ # Tool flags
+ #
+ ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
+-CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
+-CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
+-CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
++CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(OE_CFLAGS)
++CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(OE_CXXFLAGS)
++CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) $(OE_CPPFLAGS) \
+ $(DEFINES) $(OPTIONS:%=-D%)
+-LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
++LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) $(OE_LDFLAGS)
+ LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
+ LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
+ $(OTHER_LINTFLAGS)
+Index: openjdk/jdk/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Defs.gmk 2009-09-29 13:48:33.590565061 +0200
++++ openjdk/jdk/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
+@@ -662,11 +662,11 @@
+ # Tool flags
+ #
+ ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
+-CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
+-CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
+-CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
++CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(OE_CFLAGS)
++CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(OE_CXXFLAGS)
++CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) $(OE_CPPFLAGS) \
+ $(DEFINES) $(OPTIONS:%=-D%)
+-LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
++LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) $(OE_LDFLAGS)
+ LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
+ LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
+ $(OTHER_LINTFLAGS)
+Index: openjdk/hotspot/make/linux/makefiles/vm.make
+===================================================================
+--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2009-09-29 13:48:34.098565716 +0200
++++ openjdk/hotspot/make/linux/makefiles/vm.make 2009-09-29 13:57:14.450815511 +0200
+@@ -170,6 +170,7 @@
+ LIBS_VM += $(LLVM_LIBS)
+ endif
+
++LFLAGS_VM = $(OE_LDFLAGS)
+ LINK_VM = $(LINK_LIB.c)
+
+ # rule for building precompiled header
+Index: openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c
+===================================================================
+--- openjdk.orig/jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-04-24 09:34:34.000000000 +0200
++++ openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-09-29 13:57:14.450815511 +0200
+@@ -26,8 +26,10 @@
+ #include <jni.h>
+ #include <jni_util.h>
+ #include <dlfcn.h>
++#if 0
+ #include <cups/cups.h>
+ #include <cups/ppd.h>
++#endif
+
+ //#define CUPS_DEBUG
+
+@@ -37,6 +39,7 @@
+ #define DPRINTF(x, y)
+ #endif
+
++#if 0
+ typedef const char* (*fn_cupsServer)(void);
+ typedef int (*fn_ippPort)(void);
+ typedef http_t* (*fn_httpConnect)(const char *, int);
+@@ -56,7 +59,7 @@
+ fn_ppdClose j2d_ppdClose;
+ fn_ppdFindOption j2d_ppdFindOption;
+ fn_ppdPageSize j2d_ppdPageSize;
+-
++#endif
+
+ /*
+ * Initialize library functions.
+@@ -65,6 +68,7 @@
+ JNIEXPORT jboolean JNICALL
+ Java_sun_print_CUPSPrinter_initIDs(JNIEnv *env,
+ jobject printObj) {
++#if 0
+ void *handle = dlopen("libcups.so.2", RTLD_LAZY | RTLD_GLOBAL);
+
+ if (handle == NULL) {
+@@ -131,6 +135,8 @@
+ }
+
+ return JNI_TRUE;
++#endif
++ return JNI_FALSE;
+ }
+
+ /*
+@@ -141,6 +147,7 @@
+ Java_sun_print_CUPSPrinter_getCupsServer(JNIEnv *env,
+ jobject printObj)
+ {
++#if 0
+ jstring cServer = NULL;
+ const char* server = j2d_cupsServer();
+ if (server != NULL) {
+@@ -152,6 +159,8 @@
+ }
+ }
+ return cServer;
++#endif
++ return NULL;
+ }
+
+ /*
+@@ -162,8 +171,11 @@
+ Java_sun_print_CUPSPrinter_getCupsPort(JNIEnv *env,
+ jobject printObj)
+ {
++#if 0
+ int port = j2d_ippPort();
+ return (jint) port;
++#endif
++ return 0;
+ }
+
+
+@@ -177,6 +189,7 @@
+ jstring server,
+ jint port)
+ {
++#if 0
+ const char *serverName;
+ serverName = (*env)->GetStringUTFChars(env, server, NULL);
+ if (serverName != NULL) {
+@@ -187,6 +200,7 @@
+ return JNI_TRUE;
+ }
+ }
++#endif
+ return JNI_FALSE;
+ }
+
+@@ -199,6 +213,7 @@
+ jobject printObj,
+ jstring printer)
+ {
++#if 0
+ ppd_file_t *ppd;
+ ppd_option_t *optionTray, *optionPage;
+ ppd_choice_t *choice;
+@@ -304,6 +319,8 @@
+ j2d_ppdClose(ppd);
+ unlink(filename);
+ return nameArray;
++#endif
++ return NULL;
+ }
+
+
+@@ -315,6 +332,7 @@
+ jobject printObj,
+ jstring printer)
+ {
++#if 0
+ ppd_file_t *ppd;
+ ppd_option_t *option;
+ ppd_choice_t *choice;
+@@ -374,4 +392,6 @@
+ j2d_ppdClose(ppd);
+ unlink(filename);
+ return sizeArray;
++#endif
++ return NULL;
+ }
+Index: openjdk/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-04-24 09:34:17.000000000 +0200
++++ openjdk/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-09-29 13:57:14.454815276 +0200
+@@ -244,6 +244,8 @@
+ * that might be specified.
+ */
+ fontConfig = createFontConfiguration();
++ if (fontConfig == null)
++ return null;
+ getPlatformFontPathFromFontConfig();
+
+ String extraFontPath = fontConfig.getExtraFontPath();
+Index: openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-04-24 09:34:33.000000000 +0200
++++ openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-09-29 13:57:14.454815276 +0200
+@@ -899,7 +899,8 @@
+
+ // Implements SunGraphicsEnvironment.createFontConfiguration.
+ protected FontConfiguration createFontConfiguration() {
+- return new MFontConfiguration(this);
++// return new MFontConfiguration(this);
++ return null;
+ }
+ public FontConfiguration
+ createFontConfiguration(boolean preferLocaleFonts,
+Index: openjdk/jdk/make/launchers/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/launchers/Makefile 2009-09-29 13:48:33.490815135 +0200
++++ openjdk/jdk/make/launchers/Makefile 2009-09-29 13:57:14.454815276 +0200
+@@ -57,7 +57,7 @@
+ endif
+ # Run MAKE $@ for all generic launchers
+ define make-all-launchers
+-$(call make-launcher, appletviewer, sun.applet.Main, , )
++#$(call make-launcher, appletviewer, sun.applet.Main, , )
+ $(call make-launcher, apt, com.sun.tools.apt.Main, , )
+ $(call make-launcher, extcheck, com.sun.tools.extcheck.Main, , )
+ $(call make-launcher, idlj, com.sun.tools.corba.se.idl.toJavaPortable.Compile, , )
+@@ -93,7 +93,7 @@
+ -J-Dcom.sun.CORBA.activation.Port=1049 \
+ -J-Dcom.sun.CORBA.POA.ORBServerId=1, )
+ $(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
+-$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
++#$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
+ $(call make-launcher, rmic, sun.rmi.rmic.Main, , )
+ $(call make-launcher, rmid, sun.rmi.server.Activation, , )
+ $(call make-launcher, rmiregistry, sun.rmi.registry.RegistryImpl, , )
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-freetype.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-freetype.patch
new file mode 100644
index 0000000..3420fbd
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-freetype.patch
@@ -0,0 +1,13 @@
+Index: openjdk/jdk/make/tools/freetypecheck/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/tools/freetypecheck/Makefile 2009-09-29 13:48:33.590565061 +0200
++++ openjdk/jdk/make/tools/freetypecheck/Makefile 2009-09-29 14:00:04.470566156 +0200
+@@ -45,7 +45,7 @@
+ FT_OPTIONS = $(CFLAGS)
+ endif
+
+-FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2
++FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2 $(FREETYPE2_CFLAGS) $(FREETYPE2_LIBS) $(FREETYPE2_HEADERS)
+ FT_OPTIONS += $(XARCH)
+
+ #add runtime library search path
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-zlib.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-zlib.patch
new file mode 100644
index 0000000..eff7e48
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-zlib.patch
@@ -0,0 +1,61 @@
+Index: openjdk/jdk/make/com/sun/java/pack/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2009-09-29 13:48:34.538565136 +0200
++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2009-09-29 14:00:26.226565853 +0200
+@@ -80,7 +80,7 @@
+ OTHER_LDLIBS += $(JVMLIB)
+ endif
+
+-OTHER_LDLIBS += -lz
++OTHER_LDLIBS += -L$(libdir) -lz
+ CXXFLAGS_DBG += -DFULL
+ CXXFLAGS_OPT += -DPRODUCT
+ CXXFLAGS_COMMON += -DFULL
+Index: openjdk/jdk/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
++++ openjdk/jdk/make/common/Defs.gmk 2009-09-29 14:00:26.226565853 +0200
+@@ -289,7 +289,7 @@
+
+ endif # PROGRAM
+
+-LDLIBS_COMMON += $(EXTRA_LIBS)
++LDLIBS_COMMON += $(EXTRA_LIBS) -L$(libdir)
+
+ #
+ # Default is to build, not import native binaries
+@@ -425,7 +425,7 @@
+ CLASSDESTDIR = $(CLASSBINDIR)
+ endif
+
+-INCLUDES = -I. -I$(CLASSHDRDIR) \
++INCLUDES = -I$(includedir) -I. -I$(CLASSHDRDIR) \
+ $(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES)
+ OTHER_CPPFLAGS = $(INCLUDES)
+
+Index: openjdk/jdk/make/common/Program.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Program.gmk 2009-09-29 13:48:33.914565255 +0200
++++ openjdk/jdk/make/common/Program.gmk 2009-09-29 14:00:26.226565853 +0200
+@@ -73,7 +73,7 @@
+ # itself, as with all the Windows libraries.
+ #
+ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
+- LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
++ LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli -L $(libdir)
+ OTHER_LDLIBS += -ljli
+ ifeq ($(PLATFORM), solaris)
+ ifeq ($(ARCH_DATA_MODEL), 32)
+Index: openjdk/jdk/make/java/jli/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/java/jli/Makefile 2009-09-29 13:48:33.806565054 +0200
++++ openjdk/jdk/make/java/jli/Makefile 2009-09-29 14:00:26.230565844 +0200
+@@ -61,7 +61,7 @@
+ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
+ LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
+ # Guarantee very limited dependencies
+- LDLIBS = -lz -lc
++ LDLIBS = -L$(libdir) -lz -lc
+ endif
+
+ ifeq ($(PLATFORM), windows)
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-fix-jar-path.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-fix-jar-path.patch
new file mode 100644
index 0000000..c2f8df1
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-fix-jar-path.patch
@@ -0,0 +1,29 @@
+# Backported from
+# HG changeset patch
+# User Xerxes R?nby <xerxes@zafena.se>
+# Date 1275385110 -7200
+# Node ID 7674917fa451a17a38b8cd6930068e8dc3b57b76
+# Parent cf45c29fbe48d2a0c543cbd6d03f4329010011c0
+Use full path to jar application to avoid relying on the one on the path.
+
+2010-06-01 Xerxes R?nby <xerxes@zafena.se>
+
+ * Makefile.am:
+ (extra-lib/about.jar): Remove redundant
+ conditional that we don't need any more.
+ (rewrite-rhino.stamp): Use full path to
+ jar application to avoid relying on the one
+ on the path.
+
+diff -uNr icedtea6-1.7.3.orig/Makefile.am icedtea6-1.7.3/Makefile.am
+--- icedtea6-1.7.3.orig/Makefile.am 2010-03-31 23:34:07.000000000 +0200
++++ icedtea6-1.7.3/Makefile.am 2010-07-14 16:52:45.000000000 +0200
+@@ -1749,7 +1744,7 @@
+ 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))
++ (cd rhino/rhino.old ; $(ICEDTEA_BOOT_DIR)/bin/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 \
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-hotspot-make-arch-sane-for-x86.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-hotspot-make-arch-sane-for-x86.patch
new file mode 100644
index 0000000..9d7b9bb
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-hotspot-make-arch-sane-for-x86.patch
@@ -0,0 +1,1130 @@
+From b8a51665ada45e3beb0823c03c025d5514f5e745 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Thu, 22 Oct 2009 16:35:25 +0200
+Subject: [PATCH] hotspot: make arch sane for x86
+
+diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
+index 38e0f78..64c8410 100644
+--- openjdk/hotspot/agent/make/saenv.sh
++++ openjdk/hotspot/agent/make/saenv.sh
+@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+ CPU=amd64
+ else
+- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
++ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+- CPU=i386
++ CPU=x86
+ fi
+ else
+ SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
+diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+index 83ddd1a..c20c7eb 100644
+--- openjdk/hotspot/make/defs.make
++++ openjdk/hotspot/make/defs.make
+@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
+ ifdef LP64
+ BUILDARCH = amd64
+ else
+- BUILDARCH = i486
++ BUILDARCH = x86
+ endif
+ endif
+ ifeq ($(BUILDARCH), sparc)
+@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
+
+ # LIBARCH is 1:1 mapping from BUILDARCH
+ LIBARCH = $(LIBARCH/$(BUILDARCH))
+- LIBARCH/i486 = i386
++ LIBARCH/x86 = x86
+ LIBARCH/amd64 = amd64
+ LIBARCH/sparc = sparc
+ LIBARCH/sparcv9 = sparcv9
+diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
+index bc82543..4a1ef4e 100644
+--- openjdk/hotspot/make/jprt.config
++++ openjdk/hotspot/make/jprt.config
+@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
+ # LINUX: X86, AMD64
+ osarch=`uname -m`
+ if [ "${osarch}" = i686 ] ; then
+- linux_arch=i586
++ linux_arch=x86
+ elif [ "${osarch}" = x86_64 ] ; then
+ linux_arch=amd64
+ fi
+diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
+index eb2ce82..7193de0 100644
+--- openjdk/hotspot/make/jprt.properties
++++ openjdk/hotspot/make/jprt.properties
+@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
+ jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
+ jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
+
+-jprt.my.linux.i586=linux_i586
++jprt.my.linux.x86=linux_x86
+ jprt.my.linux.x64=linux_x64
+ jprt.my.windows.i586=windows_i586
+ jprt.my.windows.x64=windows_x64
+@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
+
+-jprt.my.linux.i586.test.targets = \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
+- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
++jprt.my.linux.x86.test.targets = \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
++ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
+
+ jprt.my.linux.x64.test.targets = \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
+@@ -294,7 +294,7 @@ jprt.test.targets = \
+ ${jprt.my.solaris.sparcv9.test.targets}, \
+ ${jprt.my.solaris.i586.test.targets}, \
+ ${jprt.my.solaris.x64.test.targets}, \
+- ${jprt.my.linux.i586.test.targets}, \
++ ${jprt.my.linux.x86.test.targets}, \
+ ${jprt.my.linux.x64.test.targets}, \
+ ${jprt.my.windows.i586.test.targets}, \
+ ${jprt.my.windows.x64.test.targets}
+diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
+index e317fdd..5d3b1ff 100644
+--- openjdk/hotspot/make/linux/build.sh
++++ openjdk/hotspot/make/linux/build.sh
+@@ -43,7 +43,7 @@ esac
+
+ case `uname -m` in
+ i386|i486|i586|i686)
+- mach=i386
++ mach=x86
+ ;;
+ *)
+ echo "Unsupported machine: " `uname -m`
+diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+index add9823..cbbf81f 100644
+--- openjdk/hotspot/make/linux/makefiles/buildtree.make
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make
+@@ -30,7 +30,7 @@
+ # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
+ # environment or on the command-line:
+ #
+-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
++# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
+ # BUILDARCH - build directory
+ # LIBARCH - the corresponding directory in JDK/JRE
+ # GAMMADIR - top of workspace
+@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
+ DATA_MODE = $(DATA_MODE/$(BUILDARCH))
+ JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
+
+-DATA_MODE/i486 = 32
++DATA_MODE/x86 = 32
+ DATA_MODE/sparc = 32
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64 = 64
+diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
+index 113d4f8..d3f06cb 100644
+--- openjdk/hotspot/make/linux/makefiles/cscope.make
++++ openjdk/hotspot/make/linux/makefiles/cscope.make
+@@ -78,7 +78,7 @@ endif
+ # Processor-specific files for other processors are excluded by default. Use
+ # CS_CPU=x to include platform-specific files for other platforms.
+ ifndef CS_CPU
+-CS_CPU = i486 sparc amd64 ia64
++CS_CPU = x86 sparc amd64 ia64
+ CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
+ endif
+
+diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
+index 9131c79..138dfb3 100644
+--- openjdk/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
+ HS_ARCH = sparc
+ endif
+
++# x86
++ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH_DATA_MODEL = 32
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
++ HS_ARCH = x86
++endif
++
+ # x86_64
+ ifeq ($(ARCH), x86_64)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
+ HS_ARCH = x86
+ else
+ ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
+ HS_ARCH = x86
+- # We have to reset ARCH to i686 since SRCARCH relies on it
+- ARCH = i686
+ endif
+ endif
+
+-# i686
+-ifeq ($(ARCH), i686)
+- ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
+- HS_ARCH = x86
+-endif
+-
+ JDK_INCLUDE_SUBDIR=linux
+
+ # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
+diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+index 0a9f75b..2e29bb9 100644
+--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
++++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+@@ -30,7 +30,7 @@ CC = cc
+ AS = $(CC) -c
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+
+ CFLAGS += $(ARCHFLAG)
+diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
+deleted file mode 100644
+index 610ac91..0000000
+--- openjdk/hotspot/make/linux/platform_i486
++++ /dev/null
+@@ -1,15 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = gcc
+-
+-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
+index 325a3fe..717fc75 100644
+--- openjdk/hotspot/make/linux/platform_i486.suncc
++++ openjdk/hotspot/make/linux/platform_i486.suncc
+@@ -8,10 +8,10 @@ os_arch = linux_x86
+
+ os_arch_model = linux_x86_32
+
+-lib_arch = i386
++lib_arch = x86
+
+ compiler = sparcWorks
+
+-gnu_dis_arch = i386
++gnu_dis_arch = x86
+
+ sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
+new file mode 100644
+index 0000000..5c613fe
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86
+@@ -0,0 +1,15 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = gcc
++
++sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+index b2b3162..a4bbe70 100644
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
+ // i386: 224, ia64: 1105, amd64: 186, sparc 143
+ #ifdef __ia64__
+ #define SYS_gettid 1105
+-#elif __i386__
++#elif __x86__
+ #define SYS_gettid 224
+ #elif __amd64__
+ #define SYS_gettid 186
+@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
+ #elif defined(IA64)
+ static char cpu_arch[] = "ia64";
+ #elif defined(IA32)
+-static char cpu_arch[] = "i386";
++static char cpu_arch[] = "x86";
+ #elif defined(AMD64)
+ static char cpu_arch[] = "amd64";
+ #elif defined(SPARC)
+diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
+index 6bdf4b8..fd43c6e 100644
+--- openjdk/hotspot/src/share/tools/hsdis/Makefile
++++ openjdk/hotspot/src/share/tools/hsdis/Makefile
+@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
+ endif
+
+ # Default arch; it is changed below as needed.
+-ARCH = i386
++ARCH = x86
+ OS = $(shell uname)
+
+ CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
+@@ -87,7 +87,7 @@ endif # SunOS
+ LIBARCH = $(ARCH)
+ ifdef LP64
+ LIBARCH64/sparc = sparcv9
+-LIBARCH64/i386 = amd64
++LIBARCH64/x86 = amd64
+ LIBARCH64 = $(LIBARCH64/$(ARCH))
+ ifneq ($(LIBARCH64),)
+ LIBARCH = $(LIBARCH64)
+diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+index 75b7efe..62c692b 100644
+--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
++++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
+ else
+ disassembler_usage(stderr); /* better than nothing */
+ (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
+-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
+- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
++#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
++ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
+ (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
+ (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
+ #endif
+@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
+ static const char* native_arch_name() {
+ const char* res = HOTSPOT_LIB_ARCH;
+ #ifdef LIBARCH_amd64
+- res = "i386:x86-64";
++ res = "x86:x86-64";
+ #endif
+ #ifdef LIBARCH_sparc
+ res = "sparc:v8plusb";
+diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
+index 2596d85..c2f3eb9 100644
+--- openjdk/hotspot/test/Makefile
++++ openjdk/hotspot/test/Makefile
+@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
+ PLATFORM = solaris
+ ARCH = $(shell uname -p)
+ ifeq ($(ARCH), i386)
+- ARCH=i586
++ ARCH=x86
+ endif
+ endif
+ ifeq ($(OSNAME), Linux)
+ PLATFORM = linux
+ ARCH = $(shell uname -m)
+- ifeq ($(ARCH), i386)
+- ARCH = i586
++ ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH = x86
+ endif
+ endif
+ ifeq ($(OSNAME), Windows_NT)
+@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
+ ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
+ ARCH = x64
+ else
+- ARCH = i586
++ ARCH = x86
+ endif
+ endif
+ endif
+diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
+index 38e0f78..64c8410 100644
+--- openjdk/hotspot/agent/make/saenv.sh
++++ openjdk/hotspot/agent/make/saenv.sh
+@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+ CPU=amd64
+ else
+- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
++ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+- CPU=i386
++ CPU=x86
+ fi
+ else
+ SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
+diff --git openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+index c4ca7de..54c12ca 100644
+--- openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
++++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+@@ -29,7 +29,7 @@
+ #define amd64 1
+ #endif
+
+-#ifdef i386
++#ifdef x86
+ #include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
+ #endif
+
+@@ -295,7 +295,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+ }
+
+ #undef NPRGREG
+-#ifdef i386
++#ifdef x86
+ #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
+ #endif
+ #ifdef ia64
+@@ -314,7 +314,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+
+ #undef REG_INDEX
+
+-#ifdef i386
++#ifdef x86
+ #define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
+
+ regs[REG_INDEX(GS)] = (uintptr_t) gregs.xgs;
+@@ -333,7 +333,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+ regs[REG_INDEX(CS)] = (uintptr_t) gregs.xcs;
+ regs[REG_INDEX(SS)] = (uintptr_t) gregs.xss;
+
+-#endif /* i386 */
++#endif /* x86 */
+
+ #if ia64
+ regs = (*env)->GetLongArrayElements(env, array, &isCopy);
+diff --git openjdk/hotspot/agent/src/os/linux/Makefile openjdk/hotspot/agent/src/os/linux/Makefile
+index a16f3a7..85fecb1 100644
+--- openjdk/hotspot/agent/src/os/linux/Makefile
++++ openjdk/hotspot/agent/src/os/linux/Makefile
+@@ -22,7 +22,7 @@
+ #
+ #
+
+-ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )
++ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo x86 ; fi )
+ GCC = gcc$(GCC_SUFFIX)
+
+ JAVAH = ${JAVA_HOME}/bin/javah
+diff --git openjdk/hotspot/agent/src/os/linux/ps_core.c openjdk/hotspot/agent/src/os/linux/ps_core.c
+index 3562f2d..47ab01b 100644
+--- openjdk/hotspot/agent/src/os/linux/ps_core.c
++++ openjdk/hotspot/agent/src/os/linux/ps_core.c
+@@ -540,7 +540,7 @@ static bool core_handle_prstatus(struct ps_prochandle* ph, const char* buf, size
+
+ if (is_debug()) {
+ print_debug("integer regset\n");
+-#ifdef i386
++#ifdef x86
+ // print the regset
+ print_debug("\teax = 0x%x\n", newthr->regs.eax);
+ print_debug("\tebx = 0x%x\n", newthr->regs.ebx);
+diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+index 83ddd1a..c20c7eb 100644
+--- openjdk/hotspot/make/defs.make
++++ openjdk/hotspot/make/defs.make
+@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
+ ifdef LP64
+ BUILDARCH = amd64
+ else
+- BUILDARCH = i486
++ BUILDARCH = x86
+ endif
+ endif
+ ifeq ($(BUILDARCH), sparc)
+@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
+
+ # LIBARCH is 1:1 mapping from BUILDARCH
+ LIBARCH = $(LIBARCH/$(BUILDARCH))
+- LIBARCH/i486 = i386
++ LIBARCH/x86 = x86
+ LIBARCH/amd64 = amd64
+ LIBARCH/sparc = sparc
+ LIBARCH/sparcv9 = sparcv9
+diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
+index bc82543..4a1ef4e 100644
+--- openjdk/hotspot/make/jprt.config
++++ openjdk/hotspot/make/jprt.config
+@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
+ # LINUX: X86, AMD64
+ osarch=`uname -m`
+ if [ "${osarch}" = i686 ] ; then
+- linux_arch=i586
++ linux_arch=x86
+ elif [ "${osarch}" = x86_64 ] ; then
+ linux_arch=amd64
+ fi
+diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
+index eb2ce82..7193de0 100644
+--- openjdk/hotspot/make/jprt.properties
++++ openjdk/hotspot/make/jprt.properties
+@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
+ jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
+ jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
+
+-jprt.my.linux.i586=linux_i586
++jprt.my.linux.x86=linux_x86
+ jprt.my.linux.x64=linux_x64
+ jprt.my.windows.i586=windows_i586
+ jprt.my.windows.x64=windows_x64
+@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
+
+-jprt.my.linux.i586.test.targets = \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
+- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
++jprt.my.linux.x86.test.targets = \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
++ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
+
+ jprt.my.linux.x64.test.targets = \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
+@@ -294,7 +294,7 @@ jprt.test.targets = \
+ ${jprt.my.solaris.sparcv9.test.targets}, \
+ ${jprt.my.solaris.i586.test.targets}, \
+ ${jprt.my.solaris.x64.test.targets}, \
+- ${jprt.my.linux.i586.test.targets}, \
++ ${jprt.my.linux.x86.test.targets}, \
+ ${jprt.my.linux.x64.test.targets}, \
+ ${jprt.my.windows.i586.test.targets}, \
+ ${jprt.my.windows.x64.test.targets}
+diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
+index e317fdd..5d3b1ff 100644
+--- openjdk/hotspot/make/linux/build.sh
++++ openjdk/hotspot/make/linux/build.sh
+@@ -43,7 +43,7 @@ esac
+
+ case `uname -m` in
+ i386|i486|i586|i686)
+- mach=i386
++ mach=x86
+ ;;
+ *)
+ echo "Unsupported machine: " `uname -m`
+diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+index add9823..cbbf81f 100644
+--- openjdk/hotspot/make/linux/makefiles/buildtree.make
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make
+@@ -30,7 +30,7 @@
+ # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
+ # environment or on the command-line:
+ #
+-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
++# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
+ # BUILDARCH - build directory
+ # LIBARCH - the corresponding directory in JDK/JRE
+ # GAMMADIR - top of workspace
+@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
+ DATA_MODE = $(DATA_MODE/$(BUILDARCH))
+ JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
+
+-DATA_MODE/i486 = 32
++DATA_MODE/x86 = 32
+ DATA_MODE/sparc = 32
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64 = 64
+diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
+index 113d4f8..d3f06cb 100644
+--- openjdk/hotspot/make/linux/makefiles/cscope.make
++++ openjdk/hotspot/make/linux/makefiles/cscope.make
+@@ -78,7 +78,7 @@ endif
+ # Processor-specific files for other processors are excluded by default. Use
+ # CS_CPU=x to include platform-specific files for other platforms.
+ ifndef CS_CPU
+-CS_CPU = i486 sparc amd64 ia64
++CS_CPU = x86 sparc amd64 ia64
+ CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
+ endif
+
+diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
+index 9131c79..138dfb3 100644
+--- openjdk/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
+ HS_ARCH = sparc
+ endif
+
++# x86
++ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH_DATA_MODEL = 32
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
++ HS_ARCH = x86
++endif
++
+ # x86_64
+ ifeq ($(ARCH), x86_64)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
+ HS_ARCH = x86
+ else
+ ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
+ HS_ARCH = x86
+- # We have to reset ARCH to i686 since SRCARCH relies on it
+- ARCH = i686
+ endif
+ endif
+
+-# i686
+-ifeq ($(ARCH), i686)
+- ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
+- HS_ARCH = x86
+-endif
+-
+ JDK_INCLUDE_SUBDIR=linux
+
+ # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
+diff --git openjdk/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+index a2c24bc..27bad01 100644
+--- openjdk/hotspot/make/linux/makefiles/gcc.make
++++ openjdk/hotspot/make/linux/makefiles/gcc.make
+@@ -77,7 +77,7 @@ CFLAGS += -fcheck-new
+ CFLAGS += -g
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32 -march=i586
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+ ARCHFLAG/ia64 =
+ ARCHFLAG/sparc = -m32 -mcpu=v9
+diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+index 0a9f75b..2e29bb9 100644
+--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
++++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+@@ -30,7 +30,7 @@ CC = cc
+ AS = $(CC) -c
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+
+ CFLAGS += $(ARCHFLAG)
+diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
+deleted file mode 100644
+index 610ac91..0000000
+--- openjdk/hotspot/make/linux/platform_i486
++++ /dev/null
+@@ -1,15 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = gcc
+-
+-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
+deleted file mode 100644
+index 325a3fe..0000000
+--- openjdk/hotspot/make/linux/platform_i486.suncc
++++ /dev/null
+@@ -1,17 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = sparcWorks
+-
+-gnu_dis_arch = i386
+-
+-sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
+new file mode 100644
+index 0000000..5c613fe
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86
+@@ -0,0 +1,15 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = gcc
++
++sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86.suncc openjdk/hotspot/make/linux/platform_x86.suncc
+new file mode 100644
+index 0000000..717fc75
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86.suncc
+@@ -0,0 +1,17 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = sparcWorks
++
++gnu_dis_arch = x86
++
++sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/src/os/linux/launcher/java_md.c openjdk/hotspot/src/os/linux/launcher/java_md.c
+index 50a86cd..48141be 100644
+--- openjdk/hotspot/src/os/linux/launcher/java_md.c
++++ openjdk/hotspot/src/os/linux/launcher/java_md.c
+@@ -56,8 +56,8 @@
+ * models is supported, then DUAL_MODE is defined. When DUAL_MODE is
+ * defined, the architecture names for the narrow and wide version of
+ * the architecture are defined in BIG_ARCH and SMALL_ARCH. Currently
+- * only Solaris on sparc/sparcv9 and i586/amd64 is DUAL_MODE; linux
+- * i586/amd64 could be defined as DUAL_MODE but that is not the
++ * only Solaris on sparc/sparcv9 and x86/amd64 is DUAL_MODE; linux
++ * x86/amd64 could be defined as DUAL_MODE but that is not the
+ * current policy.
+ */
+
+@@ -75,8 +75,8 @@
+
+ #else /* 32-bit data model */
+
+-# ifdef i586
+-# define ARCH "i386"
++# ifdef x86
++# define ARCH "x86"
+ # elif defined(__sparc)
+ # define ARCH "sparc"
+ # endif
+@@ -90,7 +90,7 @@
+ # define SMALL_ARCH "sparc"
+ # else
+ # define BIG_ARCH "amd64"
+-# define SMALL_ARCH "i386"
++# define SMALL_ARCH "x86"
+ # endif
+ # include <sys/systeminfo.h>
+ # include <sys/elf.h>
+@@ -1103,7 +1103,7 @@ void PrintMachineDependentOptions() {
+ * This code is somewhat more confused with #ifdef's than we'd
+ * like because this file is used by both Solaris and Linux
+ * platforms, and so needs to be parameterized for SPARC and
+- * i586 hardware. The other Linux platforms (amd64 and ia64)
++ * x86 hardware. The other Linux platforms (amd64 and ia64)
+ * don't even ask this question, because they only come with
+ * server JVMs. */
+
+@@ -1168,11 +1168,11 @@ solaris_sparc_ServerClassMachine(void) {
+
+ #endif /* __sun && __sparc */
+
+-#if defined(__sun) && defined(i586)
++#if defined(__sun) && defined(x86)
+
+ /*
+ * A utility method for asking the CPU about itself.
+- * There's a corresponding version of linux-i586
++ * There's a corresponding version of linux-x86
+ * because the compilers are different.
+ */
+ void
+@@ -1218,13 +1218,13 @@ get_cpuid(uint32_t arg,
+ #endif
+ }
+
+-#endif /* __sun && i586 */
++#endif /* __sun && x86 */
+
+-#if defined(__linux__) && defined(i586)
++#if defined(__linux__) && defined(x86)
+
+ /*
+ * A utility method for asking the CPU about itself.
+- * There's a corresponding version of solaris-i586
++ * There's a corresponding version of solaris-x86
+ * because the compilers are different.
+ */
+ void
+@@ -1286,11 +1286,11 @@ get_cpuid(uint32_t arg,
+ #endif
+ }
+
+-#endif /* __linux__ && i586 */
++#endif /* __linux__ && x86 */
+
+-#ifdef i586
++#ifdef x86
+ /*
+- * Routines shared by solaris-i586 and linux-i586.
++ * Routines shared by solaris-x86 and linux-x86.
+ */
+
+ enum HyperThreadingSupport_enum {
+@@ -1430,11 +1430,11 @@ physical_processors(void) {
+ return result;
+ }
+
+-#endif /* i586 */
++#endif /* x86 */
+
+-#if defined(__sun) && defined(i586)
++#if defined(__sun) && defined(x86)
+
+-/* The definition of a server-class machine for solaris-i586/amd64 */
++/* The definition of a server-class machine for solaris-x86/amd64 */
+ jboolean
+ solaris_i586_ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+@@ -1463,11 +1463,11 @@ solaris_i586_ServerClassMachine(void) {
+ return result;
+ }
+
+-#endif /* __sun && i586 */
++#endif /* __sun && x86 */
+
+-#if defined(__linux__) && defined(i586)
++#if defined(__linux__) && defined(x86)
+
+-/* The definition of a server-class machine for linux-i586 */
++/* The definition of a server-class machine for linux-x86 */
+ jboolean
+ linux_i586_ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+@@ -1496,7 +1496,7 @@ linux_i586_ServerClassMachine(void) {
+ return result;
+ }
+
+-#endif /* __linux__ && i586 */
++#endif /* __linux__ && x86 */
+
+ /* Dispatch to the platform-specific definition of "server-class" */
+ jboolean
+@@ -1504,9 +1504,9 @@ ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+ #if defined(__sun) && defined(__sparc)
+ result = solaris_sparc_ServerClassMachine();
+-#elif defined(__sun) && defined(i586)
++#elif defined(__sun) && defined(x86)
+ result = solaris_i586_ServerClassMachine();
+-#elif defined(__linux__) && defined(i586)
++#elif defined(__linux__) && defined(x86)
+ result = linux_i586_ServerClassMachine();
+ #else
+ if (_launcher_debug) {
+diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+index b2b3162..a4bbe70 100644
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
+ // i386: 224, ia64: 1105, amd64: 186, sparc 143
+ #ifdef __ia64__
+ #define SYS_gettid 1105
+-#elif __i386__
++#elif __x86__
+ #define SYS_gettid 224
+ #elif __amd64__
+ #define SYS_gettid 186
+@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
+ #elif defined(IA64)
+ static char cpu_arch[] = "ia64";
+ #elif defined(IA32)
+-static char cpu_arch[] = "i386";
++static char cpu_arch[] = "x86";
+ #elif defined(AMD64)
+ static char cpu_arch[] = "amd64";
+ #elif defined(SPARC)
+diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
+index 6bdf4b8..fd43c6e 100644
+--- openjdk/hotspot/src/share/tools/hsdis/Makefile
++++ openjdk/hotspot/src/share/tools/hsdis/Makefile
+@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
+ endif
+
+ # Default arch; it is changed below as needed.
+-ARCH = i386
++ARCH = x86
+ OS = $(shell uname)
+
+ CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
+@@ -87,7 +87,7 @@ endif # SunOS
+ LIBARCH = $(ARCH)
+ ifdef LP64
+ LIBARCH64/sparc = sparcv9
+-LIBARCH64/i386 = amd64
++LIBARCH64/x86 = amd64
+ LIBARCH64 = $(LIBARCH64/$(ARCH))
+ ifneq ($(LIBARCH64),)
+ LIBARCH = $(LIBARCH64)
+diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+index 75b7efe..62c692b 100644
+--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
++++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
+ else
+ disassembler_usage(stderr); /* better than nothing */
+ (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
+-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
+- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
++#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
++ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
+ (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
+ (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
+ #endif
+@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
+ static const char* native_arch_name() {
+ const char* res = HOTSPOT_LIB_ARCH;
+ #ifdef LIBARCH_amd64
+- res = "i386:x86-64";
++ res = "x86:x86-64";
+ #endif
+ #ifdef LIBARCH_sparc
+ res = "sparc:v8plusb";
+diff --git openjdk/hotspot/src/share/vm/adlc/Test/i486.ad openjdk/hotspot/src/share/vm/adlc/Test/i486.ad
+deleted file mode 100644
+index e69de29..0000000
+diff --git openjdk/hotspot/src/share/vm/adlc/Test/x86.ad openjdk/hotspot/src/share/vm/adlc/Test/x86.ad
+new file mode 100644
+index 0000000..e69de29
+diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
+index 2596d85..c2f3eb9 100644
+--- openjdk/hotspot/test/Makefile
++++ openjdk/hotspot/test/Makefile
+@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
+ PLATFORM = solaris
+ ARCH = $(shell uname -p)
+ ifeq ($(ARCH), i386)
+- ARCH=i586
++ ARCH=x86
+ endif
+ endif
+ ifeq ($(OSNAME), Linux)
+ PLATFORM = linux
+ ARCH = $(shell uname -m)
+- ifeq ($(ARCH), i386)
+- ARCH = i586
++ ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH = x86
+ endif
+ endif
+ ifeq ($(OSNAME), Windows_NT)
+@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
+ ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
+ ARCH = x64
+ else
+- ARCH = i586
++ ARCH = x86
+ endif
+ endif
+ endif
+--
+1.6.5
+
+diff --git openjdk/hotspot/make/linux/makefiles/i486.make b/hotspot/make/linux/makefiles/i486.make
+deleted file mode 100644
+index 9dd0b44..0000000
+--- openjdk/hotspot/make/linux/makefiles/i486.make
++++ /dev/null
+@@ -1,36 +0,0 @@
+-#
+-# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+-# CA 95054 USA or visit www.sun.com if you need additional information or
+-# have any questions.
+-#
+-#
+-
+-# TLS helper, assembled from .s file
+-# Not included in includeDB because it has no dependencies
+-Obj_Files += linux_x86_32.o
+-
+-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
+-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
+-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
+-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
+-# Must also specify if CPU is little endian
+-CFLAGS += -DVM_LITTLE_ENDIAN
+-
+-OPT_CFLAGS/compactingPermGenGen.o = -O1
+diff --git openjdk/hotspot/make/linux/makefiles/x86.make openjdk/hotspot/make/linux/makefiles/x86.make
+new file mode 100644
+index 0000000..9dd0b44
+--- /dev/null
++++ openjdk/hotspot/make/linux/makefiles/x86.make
+@@ -0,0 +1,36 @@
++#
++# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++# CA 95054 USA or visit www.sun.com if you need additional information or
++# have any questions.
++#
++#
++
++# TLS helper, assembled from .s file
++# Not included in includeDB because it has no dependencies
++Obj_Files += linux_x86_32.o
++
++# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
++OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
++# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
++OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
++# Must also specify if CPU is little endian
++CFLAGS += -DVM_LITTLE_ENDIAN
++
++OPT_CFLAGS/compactingPermGenGen.o = -O1
+
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-javac-in.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-javac-in.patch
new file mode 100644
index 0000000..846982c
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-javac-in.patch
@@ -0,0 +1,28 @@
+From 90688bde5acdb9193f5c381ce332012ff67c0e02 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 16:10:49 +0200
+Subject: [PATCH 3/3] javac.in: remove fake-jdk rt
+
+---
+ javac.in | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git icedtea6-1.6.1/javac.in icedtea6-1.6.1/javac.in
+index a897b39..235d9b5 100644
+--- icedtea6-1.6.1/javac.in
++++ icedtea6-1.6.1/javac.in
+@@ -33,9 +33,9 @@ fi
+ if [ -e @abs_top_builddir@/native-ecj ] ; then
+ @abs_top_builddir@/native-ecj -1.5 -nowarn $bcoption $NEW_ARGS ;
+ elif [ ! -z "@ECJ@" ] ; then
+- @ECJ@ -1.5 -nowarn $bcoption $NEW_ARGS
++ @ECJ@ -1.5 -nowarn $NEW_ARGS
+ else
+ CLASSPATH=@ECJ_JAR@${CLASSPATH:+:}$CLASSPATH \
+- @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS
++ @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $NEW_ARGS
+ fi
+
+--
+1.6.5
+
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-jdk-sane-x86-arch.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-jdk-sane-x86-arch.patch
new file mode 100644
index 0000000..5c989f9
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-jdk-sane-x86-arch.patch
@@ -0,0 +1,240 @@
+From 662e11a8b6017f39ceb6d00dcdbfe11473b56174 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:06:43 +0200
+Subject: [PATCH] sane-arch2
+
+---
+ openjdk/jdk/make/common/shared/Compiler-gcc.gmk | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git openjdk/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk
+index 8329530..de85a11 100644
+--- openjdk/jdk/make/common/shared/Compiler-gcc.gmk
++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk
+@@ -90,8 +90,8 @@ ifeq ($(PLATFORM), linux)
+ REQUIRED_CC_VER = 3.2
+ REQUIRED_GCC_VER = 3.2.*
+ endif
+- ifeq ($(ARCH), i586)
+- # i586
++ ifeq ($(ARCH), x86)
++ # x86
+ REQUIRED_CC_VER = 3.2
+ REQUIRED_GCC_VER = 3.2.1*
+ REQUIRED_GCC_VER_INT = 3.2.1-7a
+--
+1.6.5
+
+From e2e87228dd36bd737b52ed3daeaed526b5e4d3ea Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:16:54 +0200
+Subject: [PATCH] sane-arch3
+
+---
+ jdk/src/solaris/bin/i586/jvm.cfg | 38 --------------------------------------
+ jdk/src/solaris/bin/x86/jvm.cfg | 38 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 38 insertions(+), 38 deletions(-)
+ delete mode 100644 jdk/src/solaris/bin/i586/jvm.cfg
+ create mode 100644 jdk/src/solaris/bin/x86/jvm.cfg
+
+diff --git openjdk/jdk/src/solaris/bin/i586/jvm.cfg openjdk/jdk/src/solaris/bin/i586/jvm.cfg
+deleted file mode 100644
+index b97e5ae..0000000
+--- openjdk/jdk/src/solaris/bin/i586/jvm.cfg
++++ /dev/null
+@@ -1,38 +0,0 @@
+-# Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation. Sun designates this
+-# particular file as subject to the "Classpath" exception as provided
+-# by Sun in the LICENSE file that accompanied this code.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+-# CA 95054 USA or visit www.sun.com if you need additional information or
+-# have any questions.
+-#
+-# List of JVMs that can be used as an option to java, javac, etc.
+-# Order is important -- first in this list is the default JVM.
+-# NOTE that this both this file and its format are UNSUPPORTED and
+-# WILL GO AWAY in a future release.
+-#
+-# You may also select a JVM in an arbitrary location with the
+-# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
+-# and may not be available in a future release.
+-#
+--client IF_SERVER_CLASS -server
+--server KNOWN
+--hotspot ALIASED_TO -client
+--classic WARN
+--native ERROR
+--green ERROR
+diff --git openjdk/jdk/src/solaris/bin/x86/jvm.cfg openjdk/jdk/src/solaris/bin/x86/jvm.cfg
+new file mode 100644
+index 0000000..b97e5ae
+--- /dev/null
++++ openjdk/jdk/src/solaris/bin/x86/jvm.cfg
+@@ -0,0 +1,38 @@
++# Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation. Sun designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Sun in the LICENSE file that accompanied this code.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++# CA 95054 USA or visit www.sun.com if you need additional information or
++# have any questions.
++#
++# List of JVMs that can be used as an option to java, javac, etc.
++# Order is important -- first in this list is the default JVM.
++# NOTE that this both this file and its format are UNSUPPORTED and
++# WILL GO AWAY in a future release.
++#
++# You may also select a JVM in an arbitrary location with the
++# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
++# and may not be available in a future release.
++#
++-client IF_SERVER_CLASS -server
++-server KNOWN
++-hotspot ALIASED_TO -client
++-classic WARN
++-native ERROR
++-green ERROR
+--
+1.6.5
+
+From d5274fb90454c0e40b665d865f456430949791c4 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:42:11 +0200
+Subject: [PATCH 2/4] sane-arch4
+
+---
+ .../share/native/com/sun/mediopenjdk/sound/SoundDefs.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
+index 94624e0..6522503 100644
+--- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
+@@ -36,7 +36,7 @@
+ #define X_ALPHA 1
+ #define X_AMD64 2
+ #define X_ARM 3
+-#define X_I586 4
++#define X_X86 4
+ #define X_IA64 5
+ #define X_M68K 6
+ #define X_MIPS 7
+--
+1.6.5
+
+From 251338c93253d1026a37df2793956d7985f9f4eb Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:44:13 +0200
+Subject: [PATCH 4/4] sane-arch4
+
+---
+ jdk/make/javax/sound/SoundDefs.gmk | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git openjdk/jdk/make/javax/sound/SoundDefs.gmk openjdk/jdk/make/javax/sound/SoundDefs.gmk
+index 22ad8e0..a54ecd5 100644
+--- openjdk/jdk/make/javax/sound/SoundDefs.gmk
++++ openjdk/jdk/make/javax/sound/SoundDefs.gmk
+@@ -70,9 +70,9 @@ else
+ CPPFLAGS += -DX_ARCH=X_ARM
+ endif # ARCH arm
+
+- ifeq ($(ARCH), i586)
+- CPPFLAGS += -DX_ARCH=X_I586
+- endif # ARCH i586
++ ifeq ($(ARCH), x86)
++ CPPFLAGS += -DX_ARCH=X_X86
++ endif # ARCH x86
+
+ ifeq ($(ARCH), ia64)
+ CPPFLAGS += -DX_ARCH=X_IA64
+--
+1.6.5
+
+Index: openjdk/jdk/make/common/shared/Platform.gmk
+===================================================================
+--- openjdk/jdk/make/common/shared/Platform.gmk 2009-10-23 22:17:12.749059413 +0200
++++ openjdk/jdk/make/common/shared/Platform.gmk 2009-10-23 22:18:16.236579466 +0200
+@@ -56,8 +56,8 @@
+ # OS_VENDOR company name
+ # TEMP_DISK /tmp or C:/temp
+ # ARCH_DATA_MODEL 32 or 64
+-# ARCH sparc, sparcv9, i586, amd64, or ia64
+-# ARCH_FAMILY sparc or i586
++# ARCH sparc, sparcv9, x86, amd64, or ia64
++# ARCH_FAMILY sparc or x86
+ # ARCHPROP sparc or x86
+ # ARCH_VM_SUBDIR jre/bin, jre/lib/sparc, etc.
+ # LIBARCH sparc, sparcv9, i386, amd64, or ia64
+@@ -200,7 +200,7 @@
+ endif
+ archExpr = case "$(mach)" in \
+ i[3-9]86) \
+- echo i586 \
++ echo x86 \
+ ;; \
+ ia64) \
+ echo ia64 \
+@@ -239,7 +239,7 @@
+ ARCH=sparcv9
+ endif
+ else
+- # i586 is 32-bit, amd64 is 64-bit
++ # x86 is 32-bit, amd64 is 64-bit
+ ifndef ARCH_DATA_MODEL
+ ifeq ($(ARCH), alpha)
+ ARCH_DATA_MODEL=64
+@@ -250,7 +250,7 @@
+ ifeq ($(ARCH), arm)
+ ARCH_DATA_MODEL=32
+ endif
+- ifeq ($(ARCH), i586)
++ ifeq ($(ARCH), x86)
+ ARCH_DATA_MODEL=32
+ endif
+ ifeq ($(ARCH), ia64)
+@@ -280,12 +280,7 @@
+ endif
+ endif
+
+- # Need to maintain the jre/lib/i386 location for 32-bit Intel
+- ifeq ($(ARCH), i586)
+- LIBARCH = i386
+- else
+- LIBARCH = $(ARCH)
+- endif
++ LIBARCH = $(ARCH)
+
+ # Value of Java os.arch property
+ ARCHPROP = $(LIBARCH)
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-sane-x86-arch-name.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-sane-x86-arch-name.patch
new file mode 100644
index 0000000..1d67dbf
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-sane-x86-arch-name.patch
@@ -0,0 +1,47 @@
+Index: icedtea6-1.7/acinclude.m4
+===================================================================
+--- icedtea6-1.7.orig/acinclude.m4 2010-01-26 20:37:07.000000000 +0100
++++ icedtea6-1.7/acinclude.m4 2010-02-02 09:28:43.681373126 +0100
+@@ -8,11 +8,11 @@
+ CROSS_TARGET_ARCH=x86_64
+ ;;
+ i?86-*-*)
+- BUILD_ARCH_DIR=i586
+- INSTALL_ARCH_DIR=i386
+- JRE_ARCH_DIR=i386
++ BUILD_ARCH_DIR=x86
++ INSTALL_ARCH_DIR=x86
++ JRE_ARCH_DIR=x86
+ ARCH_PREFIX=${LINUX32}
+- CROSS_TARGET_ARCH=i386
++ CROSS_TARGET_ARCH=x86
+ ;;
+ alpha*-*-*)
+ BUILD_ARCH_DIR=alpha
+@@ -733,7 +733,7 @@
+ ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
+ dnl can't use AC_CHECK_SIZEOF on multilib
+ case "${ZERO_LIBARCH}" in
+- i386|ppc|s390|sparc)
++ x86|ppc|s390|sparc)
+ ZERO_BITSPERWORD=32
+ ;;
+ amd64|ppc64|s390x|sparc64)
+@@ -745,7 +745,7 @@
+ esac
+ AC_C_BIGENDIAN([ZERO_ENDIANNESS="big"], [ZERO_ENDIANNESS="little"])
+ case "${ZERO_LIBARCH}" in
+- i386)
++ x86)
+ ZERO_ARCHDEF="IA32"
+ ;;
+ ppc*)
+@@ -762,7 +762,7 @@
+ esac
+ dnl multilib machines need telling which mode to build for
+ case "${ZERO_LIBARCH}" in
+- i386|ppc|sparc)
++ x86|ppc|sparc)
+ ZERO_ARCHFLAG="-m32"
+ ;;
+ s390)
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-unbreak-float.patch b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-unbreak-float.patch
new file mode 100644
index 0000000..9f875de
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.10/icedtea-unbreak-float.patch
@@ -0,0 +1,18 @@
+Index: openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h
+===================================================================
+--- openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:49:39.972718207 +0100
++++ openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:50:04.635639302 +0100
+@@ -27,13 +27,11 @@
+
+ #include "jfdlibm.h"
+
+-#ifdef __NEWVALID /* special setup for Sun test regime */
+ #if defined(i386) || defined(i486) || \
+ defined(intel) || defined(x86) || \
+ defined(i86pc) || defined(_M_IA64) || defined(ia64)
+ #define _LITTLE_ENDIAN
+ #endif
+-#endif
+
+ #ifdef _LITTLE_ENDIAN
+ #define __HI(x) *(1+(int*)&x)
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/build-hacks-native.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/build-hacks-native.patch
new file mode 100644
index 0000000..9432d03
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/build-hacks-native.patch
@@ -0,0 +1,15 @@
+Index: icedtea6-1.6.1/Makefile.am
+===================================================================
+--- icedtea6-1.6.1.orig/Makefile.am 2009-12-24 11:38:06.582572265 +0100
++++ icedtea6-1.6.1/Makefile.am 2009-12-24 11:57:27.159578486 +0100
+@@ -265,6 +265,10 @@
+ FT2_LIB="$(FREETYPE2_LIBS)" \
+ ALT_PARALLEL_COMPILE_JOBS="$(PARALLEL_JOBS)" \
+ HOTSPOT_BUILD_JOBS="$(PARALLEL_JOBS)" \
++ OE_CFLAGS="$(OE_CFLAGS)" \
++ OE_CPPFLAGS="$(OE_CPPFLAGS)" \
++ OE_CXXFLAGS="$(OE_CXXFLAGS)" \
++ OE_LDFLAGS="$(OE_LDFLAGS)" \
+ JAVAC="" \
+ RHINO_JAR="$(RHINO_JAR)" \
+ JAR_KNOWS_ATFILE="$(JAR_KNOWS_ATFILE)" \
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/disable-library-checks.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/disable-library-checks.patch
new file mode 100644
index 0000000..23b8bed
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/disable-library-checks.patch
@@ -0,0 +1,141 @@
+Index: icedtea6-1.7/configure.ac
+===================================================================
+--- icedtea6-1.7.orig/configure.ac 2010-01-26 04:52:18.000000000 +0100
++++ icedtea6-1.7/configure.ac 2010-02-08 12:05:51.354556052 +0100
+@@ -205,9 +205,9 @@
+ fi
+
+ dnl pkgconfig cannot be used to find these headers and libraries.
+-AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
+- ,[AC_MSG_ERROR("CUPS headers were not found -
+- try installing cups-devel.")])
++#AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
++# ,[AC_MSG_ERROR("CUPS headers were not found -
++# try installing cups-devel.")])
+ AC_CHECK_HEADERS([X11/X.h],[]
+ ,[AC_MSG_ERROR("xorg headers were not found -
+ try installing xorg-x11-proto-devel.")])
+@@ -239,12 +239,12 @@
+ AC_SUBST(XT_LIBS)
+
+ dnl Check for libXp headers and libraries.
+-PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no])
+-if test "x${XP_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xp - \
+- Try installing libXp-devel.])
+-fi
++#PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no])
++#if test "x${XP_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xp - \
++# Try installing libXp-devel.])
++#fi
+ AC_SUBST(XP_CFLAGS)
+ AC_SUBST(XP_LIBS)
+
+@@ -258,16 +258,16 @@
+ AC_SUBST(X11_CFLAGS)
+ AC_SUBST(X11_LIBS)
+
+-dnl Check for libXinerama headers and libraries.
+-PKG_CHECK_MODULES(XINERAMA, xinerama,[XINERAMA_FOUND=yes]
+- ,[XINERAMA_FOUND=no])
+-if test "x${XINERAMA_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xinerama - \
+- Try installing libXinerama-devel.])
+-fi
+-AC_SUBST(XINERAMA_CFLAGS)
+-AC_SUBST(XINERAMA_LIBS)
++#dnl Check for libXinerama headers and libraries.
++#PKG_CHECK_MODULES(XINERAMA, xinerama,[XINERAMA_FOUND=yes]
++# ,[XINERAMA_FOUND=no])
++#if test "x${XINERAMA_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xinerama - \
++# Try installing libXinerama-devel.])
++#fi
++#AC_SUBST(XINERAMA_CFLAGS)
++#AC_SUBST(XINERAMA_LIBS)
+
+ if test "x${ENABLE_XRENDER}" = "xyes"
+ then
+@@ -341,26 +341,26 @@
+ AC_CONFIG_FILES([tapset/jstack.stp])
+ fi
+
+-dnl Check for libpng headers and libraries.
+-PKG_CHECK_MODULES(LIBPNG, libpng,[LIBPNG_FOUND=yes]
+- ,[LIBPNG_FOUND=no])
+-if test "x${LIBPNG_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find libpng - \
+- Try installing libpng-devel.])
+-fi
+-AC_SUBST(LIBPNG_CFLAGS)
+-AC_SUBST(LIBPNG_LIBS)
+-
+-dnl Check for libXtst headers and libraries.
+-PKG_CHECK_MODULES(XTST, xtst,[XTST_FOUND=yes],[XTST_FOUND=no])
+-if test "x${XTST_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xtst - \
+- Try installing libXtst-devel.])
+-fi
+-AC_SUBST(XTST_CFLAGS)
+-AC_SUBST(XTST_LIBS)
++#dnl Check for libpng headers and libraries.
++#PKG_CHECK_MODULES(LIBPNG, libpng,[LIBPNG_FOUND=yes]
++# ,[LIBPNG_FOUND=no])
++#if test "x${LIBPNG_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find libpng - \
++# Try installing libpng-devel.])
++#fi
++#AC_SUBST(LIBPNG_CFLAGS)
++#AC_SUBST(LIBPNG_LIBS)
++
++#dnl Check for libXtst headers and libraries.
++#PKG_CHECK_MODULES(XTST, xtst,[XTST_FOUND=yes],[XTST_FOUND=no])
++#if test "x${XTST_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xtst - \
++# Try installing libXtst-devel.])
++#fi
++#AC_SUBST(XTST_CFLAGS)
++#AC_SUBST(XTST_LIBS)
+
+ dnl Check for freetype2 headers and libraries.
+ PKG_CHECK_MODULES(FREETYPE2, freetype2,[FREETYPE2_FOUND=yes]
+@@ -373,18 +373,18 @@
+ AC_SUBST(FREETYPE2_CFLAGS)
+ AC_SUBST(FREETYPE2_LIBS)
+
+-dnl Check for alsa headers and libraries (only required for Linux).
+-if test "x${BUILD_OS_DIR}" = "xlinux"
+-then
+- PKG_CHECK_MODULES(ALSA, alsa,[ALSA_FOUND=yes],[ALSA_FOUND=no])
+- if test "x${ALSA_FOUND}" = xno
+- then
+- AC_MSG_ERROR([Could not find alsa - \
+- Try installing alsa-lib-devel.])
+- fi
+-AC_SUBST(ALSA_CFLAGS)
+-AC_SUBST(ALSA_LIBS)
+-fi
++#dnl Check for alsa headers and libraries (only required for Linux).
++#if test "x${BUILD_OS_DIR}" = "xlinux"
++#then
++# PKG_CHECK_MODULES(ALSA, alsa,[ALSA_FOUND=yes],[ALSA_FOUND=no])
++# if test "x${ALSA_FOUND}" = xno
++# then
++# AC_MSG_ERROR([Could not find alsa - \
++# Try installing alsa-lib-devel.])
++# fi
++#AC_SUBST(ALSA_CFLAGS)
++#AC_SUBST(ALSA_LIBS)
++#fi
+
+ if test "x${enable_pulse_java}" = "xyes"
+ then
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-disable-compilation.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-disable-compilation.patch
new file mode 100644
index 0000000..cd0f68a
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-disable-compilation.patch
@@ -0,0 +1,513 @@
+Index: openjdk/jdk/make/sun/awt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/awt/Makefile 2009-04-24 09:33:55.000000000 +0200
++++ openjdk/jdk/make/sun/awt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -180,7 +180,8 @@
+ include $(BUILDDIR)/common/Mapfile-vers.gmk
+ include $(BUILDDIR)/common/Library.gmk
+
+-build: fontconfigs
++#build: fontconfigs
++build:
+
+
+ ifeq ($(PLATFORM), windows)
+@@ -535,9 +536,9 @@
+ -I$(PLATFORM_SRC)/native/$(PKGDIR) \
+ $(EVENT_MODEL)
+
+-ifeq ($(PLATFORM), linux)
+-LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
+-endif
++#ifeq ($(PLATFORM), linux)
++#LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
++#endif
+
+ LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
+ $(AWT_RUNPATH)
+Index: openjdk/jdk/make/javax/sound/jsoundalsa/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/javax/sound/jsoundalsa/Makefile 2009-09-29 13:48:34.534565581 +0200
++++ openjdk/jdk/make/javax/sound/jsoundalsa/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -44,34 +44,35 @@
+ # Files
+ #
+
+-FILES_c = \
+- Utilities.c \
+- $(DAUDIOFILES_c) \
+- $(MIDIFILES_c) \
+- $(PORTFILES_c)
++#FILES_c = \
++# Utilities.c \
++# $(DAUDIOFILES_c) \
++# $(MIDIFILES_c) \
++# $(PORTFILES_c)
+
+ # platform dependent files
+-FILES_c += \
+- PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_PCM.c \
+- PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_Ports.c
+-
+-FILES_export = \
+- $(DAUDIOFILES_export) \
+- $(MIDIFILES_export) \
+- $(PORTFILES_export)
++#FILES_c += \
++# PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_PCM.c \
++# PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_Ports.c
++
++FILES_export =
++#FILES_export = \
++# $(DAUDIOFILES_export) \
++# $(MIDIFILES_export) \
++# $(PORTFILES_export)
+
+-OTHER_LDLIBS += -lasound
++#OTHER_LDLIBS += -lasound
+
+ CPPFLAGS += \
+- -DUSE_DAUDIO=TRUE \
+- -DUSE_PORTS=TRUE \
+- -DUSE_PLATFORM_MIDI_OUT=TRUE \
+- -DUSE_PLATFORM_MIDI_IN=TRUE \
++ -DUSE_DAUDIO=FALSE \
++ -DUSE_PORTS=FALSE \
++ -DUSE_PLATFORM_MIDI_OUT=FALSE \
++ -DUSE_PLATFORM_MIDI_IN=FALSE \
+ -I$(SHARE_SRC)/native/com/sun/media/sound
+
+ #
+Index: openjdk/jdk/make/sun/splashscreen/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/splashscreen/Makefile 2009-09-29 13:48:33.738565601 +0200
++++ openjdk/jdk/make/sun/splashscreen/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -32,7 +32,8 @@
+ #
+ # Files
+ #
+-include FILES_c.gmk
++#include FILES_c.gmk
++FILES_c =
+
+ FILES_java = \
+ java/awt/SplashScreen.java
+@@ -62,9 +63,9 @@
+ CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE
+
+ ifneq ($(PLATFORM), windows)
+- CFLAGS += -DWITH_X11
+- CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
+- OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpng -ljpeg -lgif -lz -lpthread
++# CFLAGS += -DWITH_X11
++# CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
++# OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpng -ljpeg -lgif -lz -lpthread
+ else # PLATFORM
+ CFLAGS += -DWITH_WIN32
+ OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib
+@@ -79,7 +80,7 @@
+ vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
+ vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen
+
+-CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
++#CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
+
+ ifeq ($(PLATFORM), linux)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+Index: openjdk/jdk/make/sun/xawt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/xawt/Makefile 2009-04-24 09:33:56.000000000 +0200
++++ openjdk/jdk/make/sun/xawt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -41,15 +41,16 @@
+ #
+ # Files
+ #
+-include FILES_c_unix.gmk
+-include FILES_export_unix.gmk
++#include FILES_c_unix.gmk
++FILES_c =
++#include FILES_export_unix.gmk
+ AUTO_FILES_JAVA_DIRS = sun/awt/X11
+ AUTO_JAVA_PRUNE = WrapperGenerator.java
+
+ LDFLAGS += -L$(OPENWIN_LIB)
+
+ ifeq ($(PLATFORM), linux)
+-LDFLAGS += -lpthread
++#LDFLAGS += -lpthread
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+
+@@ -86,16 +87,19 @@
+ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl
+ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11
+
+-OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -ldl \
+- $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
++#OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -ldl \
++# $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
+
+ ifeq ($(PLATFORM), solaris)
+ CPPFLAGS += -DFUNCPROTO=15
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+
+-CPPFLAGS += -I$(CUPS_HEADERS_PATH)
++#CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+
++# Normally we would like to patch these includes away but
++# we need them for the successfull compilation of the sizer
++# executables.
+ CPPFLAGS += -DXAWT -DXAWT_HACK \
+ -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
+ -I$(PLATFORM_SRC)/native/sun/awt \
+@@ -124,10 +128,10 @@
+
+ ifeq ($(PLATFORM), linux)
+ # Allows for builds on Debian GNU Linux, X11 is in a different place
+- CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
+- -I/usr/include/X11/extensions \
+- -I$(MOTIF_DIR)/include \
+- -I$(OPENWIN_HOME)/include
++# CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
++# -I/usr/include/X11/extensions \
++# -I$(MOTIF_DIR)/include \
++# -I$(OPENWIN_HOME)/include
+ endif
+
+ ifeq ($(PLATFORM), solaris)
+@@ -238,18 +242,20 @@
+ $(SIZER_DIR) $(XLIBTYPES) "sizer" $(subst .,,$(suffix $(basename $@)))
+
+ $(SIZES): $(SIZERS)
+- @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
+- $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
+- $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
+- $(CHMOD) +w $@;\
+- else \
+- $(ECHO) GENERATING $@; \
+- $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
+- fi
+- @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
+- $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+- $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+- fi
++ touch $(SIZES)
++#
++# @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
++# $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
++# $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
++# $(CHMOD) +w $@;\
++# else \
++# $(ECHO) GENERATING $@; \
++# $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
++# fi
++# @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
++# $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
++# $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
++# fi
+
+ $(TEMPDIR)/.gen.wrappers: $(SIZES) $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
+ $(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
+Index: openjdk/jdk/make/sun/jawt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/jawt/Makefile 2009-09-29 13:48:34.186565471 +0200
++++ openjdk/jdk/make/sun/jawt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -36,7 +36,8 @@
+ ifeq ($(PLATFORM), windows)
+ FILES_cpp = jawt.cpp
+ else # PLATFORM
+-FILES_c = jawt.c
++FILES_c =
++#FILES_c = jawt.c
+ endif # PLATFORM
+
+ FILES_h = $(INCLUDEDIR)/jawt.h \
+Index: openjdk/jdk/make/sun/jpeg/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/jpeg/Makefile 2009-09-29 13:48:33.726565626 +0200
++++ openjdk/jdk/make/sun/jpeg/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -37,7 +37,8 @@
+ #
+ # Files
+ #
+-include FILES_c.gmk
++FILES_c =
++#include FILES_c.gmk
+
+ AUTO_FILES_JAVA_DIRS = sun/awt/image com/sun/imageio/plugins/jpeg
+
+Index: openjdk/jdk/make/common/shared/Defs-java.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/shared/Defs-java.gmk 2009-09-29 13:48:55.954565215 +0200
++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2009-09-29 13:57:14.446815782 +0200
+@@ -36,14 +36,14 @@
+ # Memory related -J flags that all uses of java tools should use.
+ #
+ JAVA_MEM_FLAGS = -Xmx$(MAX_VM_MEMORY)m
+-ifneq (,$(filter $(ARCH), ia64 s390))
++#ifneq (,$(filter $(ARCH), ia64 s390))
+ # Special flags for javac on ia64 to work around a VM problem with
+ # bad code generation during inlining (what version had this problem?):
+ # Suspect this may not be needed anymore.
+- JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
+-else
+- JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
+-endif
++# JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
++#else
++# JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
++#endif
+
+ #
+ # All java tools (javac, javah, and javadoc) run faster with certain java
+Index: openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-04-24 09:34:04.000000000 +0200
++++ openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-09-29 13:57:14.450815511 +0200
+@@ -113,7 +113,7 @@
+ * @since 1.4
+ */
+ public static boolean isHeadless() {
+- return getHeadlessProperty();
++ return true;
+ }
+
+ /**
+Index: openjdk/corba/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/corba/make/common/Defs.gmk 2009-04-24 09:30:19.000000000 +0200
++++ openjdk/corba/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
+@@ -444,11 +444,11 @@
+ # Tool flags
+ #
+ ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
+-CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
+-CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
+-CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
++CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(OE_CFLAGS)
++CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(OE_CXXFLAGS)
++CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) $(OE_CPPFLAGS) \
+ $(DEFINES) $(OPTIONS:%=-D%)
+-LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
++LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) $(OE_LDFLAGS)
+ LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
+ LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
+ $(OTHER_LINTFLAGS)
+Index: openjdk/jdk/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Defs.gmk 2009-09-29 13:48:33.590565061 +0200
++++ openjdk/jdk/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
+@@ -662,11 +662,11 @@
+ # Tool flags
+ #
+ ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
+-CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
+-CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
+-CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
++CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(OE_CFLAGS)
++CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(OE_CXXFLAGS)
++CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) $(OE_CPPFLAGS) \
+ $(DEFINES) $(OPTIONS:%=-D%)
+-LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
++LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) $(OE_LDFLAGS)
+ LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
+ LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
+ $(OTHER_LINTFLAGS)
+Index: openjdk/hotspot/make/linux/makefiles/vm.make
+===================================================================
+--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2009-09-29 13:48:34.098565716 +0200
++++ openjdk/hotspot/make/linux/makefiles/vm.make 2009-09-29 13:57:14.450815511 +0200
+@@ -170,6 +170,7 @@
+ LIBS_VM += $(LLVM_LIBS)
+ endif
+
++LFLAGS_VM = $(OE_LDFLAGS)
+ LINK_VM = $(LINK_LIB.c)
+
+ # rule for building precompiled header
+Index: openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c
+===================================================================
+--- openjdk.orig/jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-04-24 09:34:34.000000000 +0200
++++ openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-09-29 13:57:14.450815511 +0200
+@@ -26,8 +26,10 @@
+ #include <jni.h>
+ #include <jni_util.h>
+ #include <dlfcn.h>
++#if 0
+ #include <cups/cups.h>
+ #include <cups/ppd.h>
++#endif
+
+ //#define CUPS_DEBUG
+
+@@ -37,6 +39,7 @@
+ #define DPRINTF(x, y)
+ #endif
+
++#if 0
+ typedef const char* (*fn_cupsServer)(void);
+ typedef int (*fn_ippPort)(void);
+ typedef http_t* (*fn_httpConnect)(const char *, int);
+@@ -56,7 +59,7 @@
+ fn_ppdClose j2d_ppdClose;
+ fn_ppdFindOption j2d_ppdFindOption;
+ fn_ppdPageSize j2d_ppdPageSize;
+-
++#endif
+
+ /*
+ * Initialize library functions.
+@@ -65,6 +68,7 @@
+ JNIEXPORT jboolean JNICALL
+ Java_sun_print_CUPSPrinter_initIDs(JNIEnv *env,
+ jobject printObj) {
++#if 0
+ void *handle = dlopen("libcups.so.2", RTLD_LAZY | RTLD_GLOBAL);
+
+ if (handle == NULL) {
+@@ -131,6 +135,8 @@
+ }
+
+ return JNI_TRUE;
++#endif
++ return JNI_FALSE;
+ }
+
+ /*
+@@ -141,6 +147,7 @@
+ Java_sun_print_CUPSPrinter_getCupsServer(JNIEnv *env,
+ jobject printObj)
+ {
++#if 0
+ jstring cServer = NULL;
+ const char* server = j2d_cupsServer();
+ if (server != NULL) {
+@@ -152,6 +159,8 @@
+ }
+ }
+ return cServer;
++#endif
++ return NULL;
+ }
+
+ /*
+@@ -162,8 +171,11 @@
+ Java_sun_print_CUPSPrinter_getCupsPort(JNIEnv *env,
+ jobject printObj)
+ {
++#if 0
+ int port = j2d_ippPort();
+ return (jint) port;
++#endif
++ return 0;
+ }
+
+
+@@ -177,6 +189,7 @@
+ jstring server,
+ jint port)
+ {
++#if 0
+ const char *serverName;
+ serverName = (*env)->GetStringUTFChars(env, server, NULL);
+ if (serverName != NULL) {
+@@ -187,6 +200,7 @@
+ return JNI_TRUE;
+ }
+ }
++#endif
+ return JNI_FALSE;
+ }
+
+@@ -199,6 +213,7 @@
+ jobject printObj,
+ jstring printer)
+ {
++#if 0
+ ppd_file_t *ppd;
+ ppd_option_t *optionTray, *optionPage;
+ ppd_choice_t *choice;
+@@ -304,6 +319,8 @@
+ j2d_ppdClose(ppd);
+ unlink(filename);
+ return nameArray;
++#endif
++ return NULL;
+ }
+
+
+@@ -315,6 +332,7 @@
+ jobject printObj,
+ jstring printer)
+ {
++#if 0
+ ppd_file_t *ppd;
+ ppd_option_t *option;
+ ppd_choice_t *choice;
+@@ -374,4 +392,6 @@
+ j2d_ppdClose(ppd);
+ unlink(filename);
+ return sizeArray;
++#endif
++ return NULL;
+ }
+Index: openjdk/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-04-24 09:34:17.000000000 +0200
++++ openjdk/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-09-29 13:57:14.454815276 +0200
+@@ -244,6 +244,8 @@
+ * that might be specified.
+ */
+ fontConfig = createFontConfiguration();
++ if (fontConfig == null)
++ return null;
+ getPlatformFontPathFromFontConfig();
+
+ String extraFontPath = fontConfig.getExtraFontPath();
+Index: openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-04-24 09:34:33.000000000 +0200
++++ openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-09-29 13:57:14.454815276 +0200
+@@ -899,7 +899,8 @@
+
+ // Implements SunGraphicsEnvironment.createFontConfiguration.
+ protected FontConfiguration createFontConfiguration() {
+- return new MFontConfiguration(this);
++// return new MFontConfiguration(this);
++ return null;
+ }
+ public FontConfiguration
+ createFontConfiguration(boolean preferLocaleFonts,
+Index: openjdk/jdk/make/launchers/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/launchers/Makefile 2009-09-29 13:48:33.490815135 +0200
++++ openjdk/jdk/make/launchers/Makefile 2009-09-29 13:57:14.454815276 +0200
+@@ -57,7 +57,7 @@
+ endif
+ # Run MAKE $@ for all generic launchers
+ define make-all-launchers
+-$(call make-launcher, appletviewer, sun.applet.Main, , )
++#$(call make-launcher, appletviewer, sun.applet.Main, , )
+ $(call make-launcher, apt, com.sun.tools.apt.Main, , )
+ $(call make-launcher, extcheck, com.sun.tools.extcheck.Main, , )
+ $(call make-launcher, idlj, com.sun.tools.corba.se.idl.toJavaPortable.Compile, , )
+@@ -93,7 +93,7 @@
+ -J-Dcom.sun.CORBA.activation.Port=1049 \
+ -J-Dcom.sun.CORBA.POA.ORBServerId=1, )
+ $(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
+-$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
++#$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
+ $(call make-launcher, rmic, sun.rmi.rmic.Main, , )
+ $(call make-launcher, rmid, sun.rmi.server.Activation, , )
+ $(call make-launcher, rmiregistry, sun.rmi.registry.RegistryImpl, , )
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-fix-freetype.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-fix-freetype.patch
new file mode 100644
index 0000000..3420fbd
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-fix-freetype.patch
@@ -0,0 +1,13 @@
+Index: openjdk/jdk/make/tools/freetypecheck/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/tools/freetypecheck/Makefile 2009-09-29 13:48:33.590565061 +0200
++++ openjdk/jdk/make/tools/freetypecheck/Makefile 2009-09-29 14:00:04.470566156 +0200
+@@ -45,7 +45,7 @@
+ FT_OPTIONS = $(CFLAGS)
+ endif
+
+-FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2
++FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2 $(FREETYPE2_CFLAGS) $(FREETYPE2_LIBS) $(FREETYPE2_HEADERS)
+ FT_OPTIONS += $(XARCH)
+
+ #add runtime library search path
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-fix-zlib.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-fix-zlib.patch
new file mode 100644
index 0000000..eff7e48
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-ecj-fix-zlib.patch
@@ -0,0 +1,61 @@
+Index: openjdk/jdk/make/com/sun/java/pack/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2009-09-29 13:48:34.538565136 +0200
++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2009-09-29 14:00:26.226565853 +0200
+@@ -80,7 +80,7 @@
+ OTHER_LDLIBS += $(JVMLIB)
+ endif
+
+-OTHER_LDLIBS += -lz
++OTHER_LDLIBS += -L$(libdir) -lz
+ CXXFLAGS_DBG += -DFULL
+ CXXFLAGS_OPT += -DPRODUCT
+ CXXFLAGS_COMMON += -DFULL
+Index: openjdk/jdk/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
++++ openjdk/jdk/make/common/Defs.gmk 2009-09-29 14:00:26.226565853 +0200
+@@ -289,7 +289,7 @@
+
+ endif # PROGRAM
+
+-LDLIBS_COMMON += $(EXTRA_LIBS)
++LDLIBS_COMMON += $(EXTRA_LIBS) -L$(libdir)
+
+ #
+ # Default is to build, not import native binaries
+@@ -425,7 +425,7 @@
+ CLASSDESTDIR = $(CLASSBINDIR)
+ endif
+
+-INCLUDES = -I. -I$(CLASSHDRDIR) \
++INCLUDES = -I$(includedir) -I. -I$(CLASSHDRDIR) \
+ $(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES)
+ OTHER_CPPFLAGS = $(INCLUDES)
+
+Index: openjdk/jdk/make/common/Program.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Program.gmk 2009-09-29 13:48:33.914565255 +0200
++++ openjdk/jdk/make/common/Program.gmk 2009-09-29 14:00:26.226565853 +0200
+@@ -73,7 +73,7 @@
+ # itself, as with all the Windows libraries.
+ #
+ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
+- LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
++ LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli -L $(libdir)
+ OTHER_LDLIBS += -ljli
+ ifeq ($(PLATFORM), solaris)
+ ifeq ($(ARCH_DATA_MODEL), 32)
+Index: openjdk/jdk/make/java/jli/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/java/jli/Makefile 2009-09-29 13:48:33.806565054 +0200
++++ openjdk/jdk/make/java/jli/Makefile 2009-09-29 14:00:26.230565844 +0200
+@@ -61,7 +61,7 @@
+ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
+ LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
+ # Guarantee very limited dependencies
+- LDLIBS = -lz -lc
++ LDLIBS = -L$(libdir) -lz -lc
+ endif
+
+ ifeq ($(PLATFORM), windows)
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-fix-jar-path.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-fix-jar-path.patch
new file mode 100644
index 0000000..beeb402
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-fix-jar-path.patch
@@ -0,0 +1,43 @@
+# Backported from
+# HG changeset patch
+# User Xerxes R?nby <xerxes@zafena.se>
+# Date 1275385110 -7200
+# Node ID 7674917fa451a17a38b8cd6930068e8dc3b57b76
+# Parent cf45c29fbe48d2a0c543cbd6d03f4329010011c0
+Use full path to jar application to avoid relying on the one on the path.
+
+2010-06-01 Xerxes R?nby <xerxes@zafena.se>
+
+ * Makefile.am:
+ (extra-lib/about.jar): Remove redundant
+ conditional that we don't need any more.
+ (rewrite-rhino.stamp): Use full path to
+ jar application to avoid relying on the one
+ on the path.
+
+diff -uNr icedtea6-1.7.3.orig/Makefile.am icedtea6-1.7.3/Makefile.am
+--- icedtea6-1.7.3.orig/Makefile.am 2010-03-31 23:34:07.000000000 +0200
++++ icedtea6-1.7.3/Makefile.am 2010-07-14 16:52:45.000000000 +0200
+@@ -1636,12 +1636,7 @@
+ rm -f extra-source-files.txt
+
+ extra-lib/about.jar: stamps/extra-class-files.stamp
+- if ! test -d $(ICEDTEA_BOOT_DIR) ; \
+- then \
+- $(JAR) cf $@ -C extra-lib net ; \
+- else \
+- $(ICEDTEA_BOOT_DIR)/bin/jar cf $@ -C extra-lib net ; \
+- fi
++ $(ICEDTEA_BOOT_DIR)/bin/jar cf $@ -C extra-lib net ;
+
+ # PulseAudio based mixer
+ # (pulse-java)
+@@ -1749,7 +1744,7 @@
+ 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))
++ (cd rhino/rhino.old ; $(ICEDTEA_BOOT_DIR)/bin/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 \
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch
new file mode 100644
index 0000000..9d7b9bb
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-hotspot-make-arch-sane-for-x86.patch
@@ -0,0 +1,1130 @@
+From b8a51665ada45e3beb0823c03c025d5514f5e745 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Thu, 22 Oct 2009 16:35:25 +0200
+Subject: [PATCH] hotspot: make arch sane for x86
+
+diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
+index 38e0f78..64c8410 100644
+--- openjdk/hotspot/agent/make/saenv.sh
++++ openjdk/hotspot/agent/make/saenv.sh
+@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+ CPU=amd64
+ else
+- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
++ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+- CPU=i386
++ CPU=x86
+ fi
+ else
+ SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
+diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+index 83ddd1a..c20c7eb 100644
+--- openjdk/hotspot/make/defs.make
++++ openjdk/hotspot/make/defs.make
+@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
+ ifdef LP64
+ BUILDARCH = amd64
+ else
+- BUILDARCH = i486
++ BUILDARCH = x86
+ endif
+ endif
+ ifeq ($(BUILDARCH), sparc)
+@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
+
+ # LIBARCH is 1:1 mapping from BUILDARCH
+ LIBARCH = $(LIBARCH/$(BUILDARCH))
+- LIBARCH/i486 = i386
++ LIBARCH/x86 = x86
+ LIBARCH/amd64 = amd64
+ LIBARCH/sparc = sparc
+ LIBARCH/sparcv9 = sparcv9
+diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
+index bc82543..4a1ef4e 100644
+--- openjdk/hotspot/make/jprt.config
++++ openjdk/hotspot/make/jprt.config
+@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
+ # LINUX: X86, AMD64
+ osarch=`uname -m`
+ if [ "${osarch}" = i686 ] ; then
+- linux_arch=i586
++ linux_arch=x86
+ elif [ "${osarch}" = x86_64 ] ; then
+ linux_arch=amd64
+ fi
+diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
+index eb2ce82..7193de0 100644
+--- openjdk/hotspot/make/jprt.properties
++++ openjdk/hotspot/make/jprt.properties
+@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
+ jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
+ jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
+
+-jprt.my.linux.i586=linux_i586
++jprt.my.linux.x86=linux_x86
+ jprt.my.linux.x64=linux_x64
+ jprt.my.windows.i586=windows_i586
+ jprt.my.windows.x64=windows_x64
+@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
+
+-jprt.my.linux.i586.test.targets = \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
+- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
++jprt.my.linux.x86.test.targets = \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
++ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
+
+ jprt.my.linux.x64.test.targets = \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
+@@ -294,7 +294,7 @@ jprt.test.targets = \
+ ${jprt.my.solaris.sparcv9.test.targets}, \
+ ${jprt.my.solaris.i586.test.targets}, \
+ ${jprt.my.solaris.x64.test.targets}, \
+- ${jprt.my.linux.i586.test.targets}, \
++ ${jprt.my.linux.x86.test.targets}, \
+ ${jprt.my.linux.x64.test.targets}, \
+ ${jprt.my.windows.i586.test.targets}, \
+ ${jprt.my.windows.x64.test.targets}
+diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
+index e317fdd..5d3b1ff 100644
+--- openjdk/hotspot/make/linux/build.sh
++++ openjdk/hotspot/make/linux/build.sh
+@@ -43,7 +43,7 @@ esac
+
+ case `uname -m` in
+ i386|i486|i586|i686)
+- mach=i386
++ mach=x86
+ ;;
+ *)
+ echo "Unsupported machine: " `uname -m`
+diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+index add9823..cbbf81f 100644
+--- openjdk/hotspot/make/linux/makefiles/buildtree.make
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make
+@@ -30,7 +30,7 @@
+ # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
+ # environment or on the command-line:
+ #
+-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
++# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
+ # BUILDARCH - build directory
+ # LIBARCH - the corresponding directory in JDK/JRE
+ # GAMMADIR - top of workspace
+@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
+ DATA_MODE = $(DATA_MODE/$(BUILDARCH))
+ JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
+
+-DATA_MODE/i486 = 32
++DATA_MODE/x86 = 32
+ DATA_MODE/sparc = 32
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64 = 64
+diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
+index 113d4f8..d3f06cb 100644
+--- openjdk/hotspot/make/linux/makefiles/cscope.make
++++ openjdk/hotspot/make/linux/makefiles/cscope.make
+@@ -78,7 +78,7 @@ endif
+ # Processor-specific files for other processors are excluded by default. Use
+ # CS_CPU=x to include platform-specific files for other platforms.
+ ifndef CS_CPU
+-CS_CPU = i486 sparc amd64 ia64
++CS_CPU = x86 sparc amd64 ia64
+ CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
+ endif
+
+diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
+index 9131c79..138dfb3 100644
+--- openjdk/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
+ HS_ARCH = sparc
+ endif
+
++# x86
++ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH_DATA_MODEL = 32
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
++ HS_ARCH = x86
++endif
++
+ # x86_64
+ ifeq ($(ARCH), x86_64)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
+ HS_ARCH = x86
+ else
+ ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
+ HS_ARCH = x86
+- # We have to reset ARCH to i686 since SRCARCH relies on it
+- ARCH = i686
+ endif
+ endif
+
+-# i686
+-ifeq ($(ARCH), i686)
+- ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
+- HS_ARCH = x86
+-endif
+-
+ JDK_INCLUDE_SUBDIR=linux
+
+ # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
+diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+index 0a9f75b..2e29bb9 100644
+--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
++++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+@@ -30,7 +30,7 @@ CC = cc
+ AS = $(CC) -c
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+
+ CFLAGS += $(ARCHFLAG)
+diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
+deleted file mode 100644
+index 610ac91..0000000
+--- openjdk/hotspot/make/linux/platform_i486
++++ /dev/null
+@@ -1,15 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = gcc
+-
+-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
+index 325a3fe..717fc75 100644
+--- openjdk/hotspot/make/linux/platform_i486.suncc
++++ openjdk/hotspot/make/linux/platform_i486.suncc
+@@ -8,10 +8,10 @@ os_arch = linux_x86
+
+ os_arch_model = linux_x86_32
+
+-lib_arch = i386
++lib_arch = x86
+
+ compiler = sparcWorks
+
+-gnu_dis_arch = i386
++gnu_dis_arch = x86
+
+ sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
+new file mode 100644
+index 0000000..5c613fe
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86
+@@ -0,0 +1,15 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = gcc
++
++sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+index b2b3162..a4bbe70 100644
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
+ // i386: 224, ia64: 1105, amd64: 186, sparc 143
+ #ifdef __ia64__
+ #define SYS_gettid 1105
+-#elif __i386__
++#elif __x86__
+ #define SYS_gettid 224
+ #elif __amd64__
+ #define SYS_gettid 186
+@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
+ #elif defined(IA64)
+ static char cpu_arch[] = "ia64";
+ #elif defined(IA32)
+-static char cpu_arch[] = "i386";
++static char cpu_arch[] = "x86";
+ #elif defined(AMD64)
+ static char cpu_arch[] = "amd64";
+ #elif defined(SPARC)
+diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
+index 6bdf4b8..fd43c6e 100644
+--- openjdk/hotspot/src/share/tools/hsdis/Makefile
++++ openjdk/hotspot/src/share/tools/hsdis/Makefile
+@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
+ endif
+
+ # Default arch; it is changed below as needed.
+-ARCH = i386
++ARCH = x86
+ OS = $(shell uname)
+
+ CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
+@@ -87,7 +87,7 @@ endif # SunOS
+ LIBARCH = $(ARCH)
+ ifdef LP64
+ LIBARCH64/sparc = sparcv9
+-LIBARCH64/i386 = amd64
++LIBARCH64/x86 = amd64
+ LIBARCH64 = $(LIBARCH64/$(ARCH))
+ ifneq ($(LIBARCH64),)
+ LIBARCH = $(LIBARCH64)
+diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+index 75b7efe..62c692b 100644
+--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
++++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
+ else
+ disassembler_usage(stderr); /* better than nothing */
+ (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
+-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
+- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
++#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
++ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
+ (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
+ (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
+ #endif
+@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
+ static const char* native_arch_name() {
+ const char* res = HOTSPOT_LIB_ARCH;
+ #ifdef LIBARCH_amd64
+- res = "i386:x86-64";
++ res = "x86:x86-64";
+ #endif
+ #ifdef LIBARCH_sparc
+ res = "sparc:v8plusb";
+diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
+index 2596d85..c2f3eb9 100644
+--- openjdk/hotspot/test/Makefile
++++ openjdk/hotspot/test/Makefile
+@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
+ PLATFORM = solaris
+ ARCH = $(shell uname -p)
+ ifeq ($(ARCH), i386)
+- ARCH=i586
++ ARCH=x86
+ endif
+ endif
+ ifeq ($(OSNAME), Linux)
+ PLATFORM = linux
+ ARCH = $(shell uname -m)
+- ifeq ($(ARCH), i386)
+- ARCH = i586
++ ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH = x86
+ endif
+ endif
+ ifeq ($(OSNAME), Windows_NT)
+@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
+ ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
+ ARCH = x64
+ else
+- ARCH = i586
++ ARCH = x86
+ endif
+ endif
+ endif
+diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
+index 38e0f78..64c8410 100644
+--- openjdk/hotspot/agent/make/saenv.sh
++++ openjdk/hotspot/agent/make/saenv.sh
+@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+ CPU=amd64
+ else
+- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
++ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+- CPU=i386
++ CPU=x86
+ fi
+ else
+ SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
+diff --git openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+index c4ca7de..54c12ca 100644
+--- openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
++++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+@@ -29,7 +29,7 @@
+ #define amd64 1
+ #endif
+
+-#ifdef i386
++#ifdef x86
+ #include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
+ #endif
+
+@@ -295,7 +295,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+ }
+
+ #undef NPRGREG
+-#ifdef i386
++#ifdef x86
+ #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
+ #endif
+ #ifdef ia64
+@@ -314,7 +314,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+
+ #undef REG_INDEX
+
+-#ifdef i386
++#ifdef x86
+ #define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
+
+ regs[REG_INDEX(GS)] = (uintptr_t) gregs.xgs;
+@@ -333,7 +333,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+ regs[REG_INDEX(CS)] = (uintptr_t) gregs.xcs;
+ regs[REG_INDEX(SS)] = (uintptr_t) gregs.xss;
+
+-#endif /* i386 */
++#endif /* x86 */
+
+ #if ia64
+ regs = (*env)->GetLongArrayElements(env, array, &isCopy);
+diff --git openjdk/hotspot/agent/src/os/linux/Makefile openjdk/hotspot/agent/src/os/linux/Makefile
+index a16f3a7..85fecb1 100644
+--- openjdk/hotspot/agent/src/os/linux/Makefile
++++ openjdk/hotspot/agent/src/os/linux/Makefile
+@@ -22,7 +22,7 @@
+ #
+ #
+
+-ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )
++ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo x86 ; fi )
+ GCC = gcc$(GCC_SUFFIX)
+
+ JAVAH = ${JAVA_HOME}/bin/javah
+diff --git openjdk/hotspot/agent/src/os/linux/ps_core.c openjdk/hotspot/agent/src/os/linux/ps_core.c
+index 3562f2d..47ab01b 100644
+--- openjdk/hotspot/agent/src/os/linux/ps_core.c
++++ openjdk/hotspot/agent/src/os/linux/ps_core.c
+@@ -540,7 +540,7 @@ static bool core_handle_prstatus(struct ps_prochandle* ph, const char* buf, size
+
+ if (is_debug()) {
+ print_debug("integer regset\n");
+-#ifdef i386
++#ifdef x86
+ // print the regset
+ print_debug("\teax = 0x%x\n", newthr->regs.eax);
+ print_debug("\tebx = 0x%x\n", newthr->regs.ebx);
+diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+index 83ddd1a..c20c7eb 100644
+--- openjdk/hotspot/make/defs.make
++++ openjdk/hotspot/make/defs.make
+@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
+ ifdef LP64
+ BUILDARCH = amd64
+ else
+- BUILDARCH = i486
++ BUILDARCH = x86
+ endif
+ endif
+ ifeq ($(BUILDARCH), sparc)
+@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
+
+ # LIBARCH is 1:1 mapping from BUILDARCH
+ LIBARCH = $(LIBARCH/$(BUILDARCH))
+- LIBARCH/i486 = i386
++ LIBARCH/x86 = x86
+ LIBARCH/amd64 = amd64
+ LIBARCH/sparc = sparc
+ LIBARCH/sparcv9 = sparcv9
+diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
+index bc82543..4a1ef4e 100644
+--- openjdk/hotspot/make/jprt.config
++++ openjdk/hotspot/make/jprt.config
+@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
+ # LINUX: X86, AMD64
+ osarch=`uname -m`
+ if [ "${osarch}" = i686 ] ; then
+- linux_arch=i586
++ linux_arch=x86
+ elif [ "${osarch}" = x86_64 ] ; then
+ linux_arch=amd64
+ fi
+diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
+index eb2ce82..7193de0 100644
+--- openjdk/hotspot/make/jprt.properties
++++ openjdk/hotspot/make/jprt.properties
+@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
+ jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
+ jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
+
+-jprt.my.linux.i586=linux_i586
++jprt.my.linux.x86=linux_x86
+ jprt.my.linux.x64=linux_x64
+ jprt.my.windows.i586=windows_i586
+ jprt.my.windows.x64=windows_x64
+@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
+
+-jprt.my.linux.i586.test.targets = \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
+- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
++jprt.my.linux.x86.test.targets = \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
++ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
+
+ jprt.my.linux.x64.test.targets = \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
+@@ -294,7 +294,7 @@ jprt.test.targets = \
+ ${jprt.my.solaris.sparcv9.test.targets}, \
+ ${jprt.my.solaris.i586.test.targets}, \
+ ${jprt.my.solaris.x64.test.targets}, \
+- ${jprt.my.linux.i586.test.targets}, \
++ ${jprt.my.linux.x86.test.targets}, \
+ ${jprt.my.linux.x64.test.targets}, \
+ ${jprt.my.windows.i586.test.targets}, \
+ ${jprt.my.windows.x64.test.targets}
+diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
+index e317fdd..5d3b1ff 100644
+--- openjdk/hotspot/make/linux/build.sh
++++ openjdk/hotspot/make/linux/build.sh
+@@ -43,7 +43,7 @@ esac
+
+ case `uname -m` in
+ i386|i486|i586|i686)
+- mach=i386
++ mach=x86
+ ;;
+ *)
+ echo "Unsupported machine: " `uname -m`
+diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+index add9823..cbbf81f 100644
+--- openjdk/hotspot/make/linux/makefiles/buildtree.make
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make
+@@ -30,7 +30,7 @@
+ # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
+ # environment or on the command-line:
+ #
+-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
++# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
+ # BUILDARCH - build directory
+ # LIBARCH - the corresponding directory in JDK/JRE
+ # GAMMADIR - top of workspace
+@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
+ DATA_MODE = $(DATA_MODE/$(BUILDARCH))
+ JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
+
+-DATA_MODE/i486 = 32
++DATA_MODE/x86 = 32
+ DATA_MODE/sparc = 32
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64 = 64
+diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
+index 113d4f8..d3f06cb 100644
+--- openjdk/hotspot/make/linux/makefiles/cscope.make
++++ openjdk/hotspot/make/linux/makefiles/cscope.make
+@@ -78,7 +78,7 @@ endif
+ # Processor-specific files for other processors are excluded by default. Use
+ # CS_CPU=x to include platform-specific files for other platforms.
+ ifndef CS_CPU
+-CS_CPU = i486 sparc amd64 ia64
++CS_CPU = x86 sparc amd64 ia64
+ CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
+ endif
+
+diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
+index 9131c79..138dfb3 100644
+--- openjdk/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
+ HS_ARCH = sparc
+ endif
+
++# x86
++ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH_DATA_MODEL = 32
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
++ HS_ARCH = x86
++endif
++
+ # x86_64
+ ifeq ($(ARCH), x86_64)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
+ HS_ARCH = x86
+ else
+ ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
+ HS_ARCH = x86
+- # We have to reset ARCH to i686 since SRCARCH relies on it
+- ARCH = i686
+ endif
+ endif
+
+-# i686
+-ifeq ($(ARCH), i686)
+- ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
+- HS_ARCH = x86
+-endif
+-
+ JDK_INCLUDE_SUBDIR=linux
+
+ # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
+diff --git openjdk/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+index a2c24bc..27bad01 100644
+--- openjdk/hotspot/make/linux/makefiles/gcc.make
++++ openjdk/hotspot/make/linux/makefiles/gcc.make
+@@ -77,7 +77,7 @@ CFLAGS += -fcheck-new
+ CFLAGS += -g
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32 -march=i586
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+ ARCHFLAG/ia64 =
+ ARCHFLAG/sparc = -m32 -mcpu=v9
+diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+index 0a9f75b..2e29bb9 100644
+--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
++++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+@@ -30,7 +30,7 @@ CC = cc
+ AS = $(CC) -c
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+
+ CFLAGS += $(ARCHFLAG)
+diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
+deleted file mode 100644
+index 610ac91..0000000
+--- openjdk/hotspot/make/linux/platform_i486
++++ /dev/null
+@@ -1,15 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = gcc
+-
+-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
+deleted file mode 100644
+index 325a3fe..0000000
+--- openjdk/hotspot/make/linux/platform_i486.suncc
++++ /dev/null
+@@ -1,17 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = sparcWorks
+-
+-gnu_dis_arch = i386
+-
+-sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
+new file mode 100644
+index 0000000..5c613fe
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86
+@@ -0,0 +1,15 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = gcc
++
++sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86.suncc openjdk/hotspot/make/linux/platform_x86.suncc
+new file mode 100644
+index 0000000..717fc75
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86.suncc
+@@ -0,0 +1,17 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = sparcWorks
++
++gnu_dis_arch = x86
++
++sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/src/os/linux/launcher/java_md.c openjdk/hotspot/src/os/linux/launcher/java_md.c
+index 50a86cd..48141be 100644
+--- openjdk/hotspot/src/os/linux/launcher/java_md.c
++++ openjdk/hotspot/src/os/linux/launcher/java_md.c
+@@ -56,8 +56,8 @@
+ * models is supported, then DUAL_MODE is defined. When DUAL_MODE is
+ * defined, the architecture names for the narrow and wide version of
+ * the architecture are defined in BIG_ARCH and SMALL_ARCH. Currently
+- * only Solaris on sparc/sparcv9 and i586/amd64 is DUAL_MODE; linux
+- * i586/amd64 could be defined as DUAL_MODE but that is not the
++ * only Solaris on sparc/sparcv9 and x86/amd64 is DUAL_MODE; linux
++ * x86/amd64 could be defined as DUAL_MODE but that is not the
+ * current policy.
+ */
+
+@@ -75,8 +75,8 @@
+
+ #else /* 32-bit data model */
+
+-# ifdef i586
+-# define ARCH "i386"
++# ifdef x86
++# define ARCH "x86"
+ # elif defined(__sparc)
+ # define ARCH "sparc"
+ # endif
+@@ -90,7 +90,7 @@
+ # define SMALL_ARCH "sparc"
+ # else
+ # define BIG_ARCH "amd64"
+-# define SMALL_ARCH "i386"
++# define SMALL_ARCH "x86"
+ # endif
+ # include <sys/systeminfo.h>
+ # include <sys/elf.h>
+@@ -1103,7 +1103,7 @@ void PrintMachineDependentOptions() {
+ * This code is somewhat more confused with #ifdef's than we'd
+ * like because this file is used by both Solaris and Linux
+ * platforms, and so needs to be parameterized for SPARC and
+- * i586 hardware. The other Linux platforms (amd64 and ia64)
++ * x86 hardware. The other Linux platforms (amd64 and ia64)
+ * don't even ask this question, because they only come with
+ * server JVMs. */
+
+@@ -1168,11 +1168,11 @@ solaris_sparc_ServerClassMachine(void) {
+
+ #endif /* __sun && __sparc */
+
+-#if defined(__sun) && defined(i586)
++#if defined(__sun) && defined(x86)
+
+ /*
+ * A utility method for asking the CPU about itself.
+- * There's a corresponding version of linux-i586
++ * There's a corresponding version of linux-x86
+ * because the compilers are different.
+ */
+ void
+@@ -1218,13 +1218,13 @@ get_cpuid(uint32_t arg,
+ #endif
+ }
+
+-#endif /* __sun && i586 */
++#endif /* __sun && x86 */
+
+-#if defined(__linux__) && defined(i586)
++#if defined(__linux__) && defined(x86)
+
+ /*
+ * A utility method for asking the CPU about itself.
+- * There's a corresponding version of solaris-i586
++ * There's a corresponding version of solaris-x86
+ * because the compilers are different.
+ */
+ void
+@@ -1286,11 +1286,11 @@ get_cpuid(uint32_t arg,
+ #endif
+ }
+
+-#endif /* __linux__ && i586 */
++#endif /* __linux__ && x86 */
+
+-#ifdef i586
++#ifdef x86
+ /*
+- * Routines shared by solaris-i586 and linux-i586.
++ * Routines shared by solaris-x86 and linux-x86.
+ */
+
+ enum HyperThreadingSupport_enum {
+@@ -1430,11 +1430,11 @@ physical_processors(void) {
+ return result;
+ }
+
+-#endif /* i586 */
++#endif /* x86 */
+
+-#if defined(__sun) && defined(i586)
++#if defined(__sun) && defined(x86)
+
+-/* The definition of a server-class machine for solaris-i586/amd64 */
++/* The definition of a server-class machine for solaris-x86/amd64 */
+ jboolean
+ solaris_i586_ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+@@ -1463,11 +1463,11 @@ solaris_i586_ServerClassMachine(void) {
+ return result;
+ }
+
+-#endif /* __sun && i586 */
++#endif /* __sun && x86 */
+
+-#if defined(__linux__) && defined(i586)
++#if defined(__linux__) && defined(x86)
+
+-/* The definition of a server-class machine for linux-i586 */
++/* The definition of a server-class machine for linux-x86 */
+ jboolean
+ linux_i586_ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+@@ -1496,7 +1496,7 @@ linux_i586_ServerClassMachine(void) {
+ return result;
+ }
+
+-#endif /* __linux__ && i586 */
++#endif /* __linux__ && x86 */
+
+ /* Dispatch to the platform-specific definition of "server-class" */
+ jboolean
+@@ -1504,9 +1504,9 @@ ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+ #if defined(__sun) && defined(__sparc)
+ result = solaris_sparc_ServerClassMachine();
+-#elif defined(__sun) && defined(i586)
++#elif defined(__sun) && defined(x86)
+ result = solaris_i586_ServerClassMachine();
+-#elif defined(__linux__) && defined(i586)
++#elif defined(__linux__) && defined(x86)
+ result = linux_i586_ServerClassMachine();
+ #else
+ if (_launcher_debug) {
+diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+index b2b3162..a4bbe70 100644
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
+ // i386: 224, ia64: 1105, amd64: 186, sparc 143
+ #ifdef __ia64__
+ #define SYS_gettid 1105
+-#elif __i386__
++#elif __x86__
+ #define SYS_gettid 224
+ #elif __amd64__
+ #define SYS_gettid 186
+@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
+ #elif defined(IA64)
+ static char cpu_arch[] = "ia64";
+ #elif defined(IA32)
+-static char cpu_arch[] = "i386";
++static char cpu_arch[] = "x86";
+ #elif defined(AMD64)
+ static char cpu_arch[] = "amd64";
+ #elif defined(SPARC)
+diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
+index 6bdf4b8..fd43c6e 100644
+--- openjdk/hotspot/src/share/tools/hsdis/Makefile
++++ openjdk/hotspot/src/share/tools/hsdis/Makefile
+@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
+ endif
+
+ # Default arch; it is changed below as needed.
+-ARCH = i386
++ARCH = x86
+ OS = $(shell uname)
+
+ CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
+@@ -87,7 +87,7 @@ endif # SunOS
+ LIBARCH = $(ARCH)
+ ifdef LP64
+ LIBARCH64/sparc = sparcv9
+-LIBARCH64/i386 = amd64
++LIBARCH64/x86 = amd64
+ LIBARCH64 = $(LIBARCH64/$(ARCH))
+ ifneq ($(LIBARCH64),)
+ LIBARCH = $(LIBARCH64)
+diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+index 75b7efe..62c692b 100644
+--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
++++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
+ else
+ disassembler_usage(stderr); /* better than nothing */
+ (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
+-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
+- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
++#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
++ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
+ (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
+ (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
+ #endif
+@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
+ static const char* native_arch_name() {
+ const char* res = HOTSPOT_LIB_ARCH;
+ #ifdef LIBARCH_amd64
+- res = "i386:x86-64";
++ res = "x86:x86-64";
+ #endif
+ #ifdef LIBARCH_sparc
+ res = "sparc:v8plusb";
+diff --git openjdk/hotspot/src/share/vm/adlc/Test/i486.ad openjdk/hotspot/src/share/vm/adlc/Test/i486.ad
+deleted file mode 100644
+index e69de29..0000000
+diff --git openjdk/hotspot/src/share/vm/adlc/Test/x86.ad openjdk/hotspot/src/share/vm/adlc/Test/x86.ad
+new file mode 100644
+index 0000000..e69de29
+diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
+index 2596d85..c2f3eb9 100644
+--- openjdk/hotspot/test/Makefile
++++ openjdk/hotspot/test/Makefile
+@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
+ PLATFORM = solaris
+ ARCH = $(shell uname -p)
+ ifeq ($(ARCH), i386)
+- ARCH=i586
++ ARCH=x86
+ endif
+ endif
+ ifeq ($(OSNAME), Linux)
+ PLATFORM = linux
+ ARCH = $(shell uname -m)
+- ifeq ($(ARCH), i386)
+- ARCH = i586
++ ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH = x86
+ endif
+ endif
+ ifeq ($(OSNAME), Windows_NT)
+@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
+ ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
+ ARCH = x64
+ else
+- ARCH = i586
++ ARCH = x86
+ endif
+ endif
+ endif
+--
+1.6.5
+
+diff --git openjdk/hotspot/make/linux/makefiles/i486.make b/hotspot/make/linux/makefiles/i486.make
+deleted file mode 100644
+index 9dd0b44..0000000
+--- openjdk/hotspot/make/linux/makefiles/i486.make
++++ /dev/null
+@@ -1,36 +0,0 @@
+-#
+-# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+-# CA 95054 USA or visit www.sun.com if you need additional information or
+-# have any questions.
+-#
+-#
+-
+-# TLS helper, assembled from .s file
+-# Not included in includeDB because it has no dependencies
+-Obj_Files += linux_x86_32.o
+-
+-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
+-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
+-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
+-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
+-# Must also specify if CPU is little endian
+-CFLAGS += -DVM_LITTLE_ENDIAN
+-
+-OPT_CFLAGS/compactingPermGenGen.o = -O1
+diff --git openjdk/hotspot/make/linux/makefiles/x86.make openjdk/hotspot/make/linux/makefiles/x86.make
+new file mode 100644
+index 0000000..9dd0b44
+--- /dev/null
++++ openjdk/hotspot/make/linux/makefiles/x86.make
+@@ -0,0 +1,36 @@
++#
++# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++# CA 95054 USA or visit www.sun.com if you need additional information or
++# have any questions.
++#
++#
++
++# TLS helper, assembled from .s file
++# Not included in includeDB because it has no dependencies
++Obj_Files += linux_x86_32.o
++
++# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
++OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
++# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
++OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
++# Must also specify if CPU is little endian
++CFLAGS += -DVM_LITTLE_ENDIAN
++
++OPT_CFLAGS/compactingPermGenGen.o = -O1
+
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-javac-in.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-javac-in.patch
new file mode 100644
index 0000000..846982c
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-javac-in.patch
@@ -0,0 +1,28 @@
+From 90688bde5acdb9193f5c381ce332012ff67c0e02 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 16:10:49 +0200
+Subject: [PATCH 3/3] javac.in: remove fake-jdk rt
+
+---
+ javac.in | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git icedtea6-1.6.1/javac.in icedtea6-1.6.1/javac.in
+index a897b39..235d9b5 100644
+--- icedtea6-1.6.1/javac.in
++++ icedtea6-1.6.1/javac.in
+@@ -33,9 +33,9 @@ fi
+ if [ -e @abs_top_builddir@/native-ecj ] ; then
+ @abs_top_builddir@/native-ecj -1.5 -nowarn $bcoption $NEW_ARGS ;
+ elif [ ! -z "@ECJ@" ] ; then
+- @ECJ@ -1.5 -nowarn $bcoption $NEW_ARGS
++ @ECJ@ -1.5 -nowarn $NEW_ARGS
+ else
+ CLASSPATH=@ECJ_JAR@${CLASSPATH:+:}$CLASSPATH \
+- @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS
++ @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $NEW_ARGS
+ fi
+
+--
+1.6.5
+
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-jdk-build-sizer-32-on-amd64.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-jdk-build-sizer-32-on-amd64.patch
new file mode 100644
index 0000000..3baeb5d
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-jdk-build-sizer-32-on-amd64.patch
@@ -0,0 +1,36 @@
+Build the xawt sizer.32 binary on Linux/x86_64 so we can use it when
+compiling openjdk for 32-bit platforms.
+
+--- openjdk/jdk/make/sun/xawt/Makefile.orig 2011-01-08 01:53:22.000000000 -0500
++++ openjdk/jdk/make/sun/xawt/Makefile 2011-01-11 15:12:17.000000000 -0500
+@@ -184,6 +184,22 @@
+
+ else # !solaris
+
++ifeq ($(PLATFORM), linux)
++
++ifeq ($(ARCH), amd64)
++# On amd64 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
++SIZERS = $(SIZER).32 $(SIZER).64
++SIZERS_C = $(SIZER_32_C) $(SIZER_64_C)
++SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64
++CFLAGS_32 = $(CFLAGS) -m32
++else # !amd64
++SIZERS = $(SIZER).32
++SIZERS_C = $(SIZER_32_C)
++SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
++endif # amd64
++
++else # !linux
++
+ ifeq ($(ARCH_DATA_MODEL), 32)
+ SIZERS = $(SIZER).32
+ SIZERS_C = $(SIZER_32_C)
+@@ -194,6 +210,7 @@
+ SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64
+ endif # 32
+
++endif # linux
+ endif # solaris
+
+ # XXX Hack for 6185483 - use hard-coded sizes.
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-jdk-sane-x86-arch.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-jdk-sane-x86-arch.patch
new file mode 100644
index 0000000..5c989f9
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-jdk-sane-x86-arch.patch
@@ -0,0 +1,240 @@
+From 662e11a8b6017f39ceb6d00dcdbfe11473b56174 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:06:43 +0200
+Subject: [PATCH] sane-arch2
+
+---
+ openjdk/jdk/make/common/shared/Compiler-gcc.gmk | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git openjdk/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk
+index 8329530..de85a11 100644
+--- openjdk/jdk/make/common/shared/Compiler-gcc.gmk
++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk
+@@ -90,8 +90,8 @@ ifeq ($(PLATFORM), linux)
+ REQUIRED_CC_VER = 3.2
+ REQUIRED_GCC_VER = 3.2.*
+ endif
+- ifeq ($(ARCH), i586)
+- # i586
++ ifeq ($(ARCH), x86)
++ # x86
+ REQUIRED_CC_VER = 3.2
+ REQUIRED_GCC_VER = 3.2.1*
+ REQUIRED_GCC_VER_INT = 3.2.1-7a
+--
+1.6.5
+
+From e2e87228dd36bd737b52ed3daeaed526b5e4d3ea Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:16:54 +0200
+Subject: [PATCH] sane-arch3
+
+---
+ jdk/src/solaris/bin/i586/jvm.cfg | 38 --------------------------------------
+ jdk/src/solaris/bin/x86/jvm.cfg | 38 ++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 38 insertions(+), 38 deletions(-)
+ delete mode 100644 jdk/src/solaris/bin/i586/jvm.cfg
+ create mode 100644 jdk/src/solaris/bin/x86/jvm.cfg
+
+diff --git openjdk/jdk/src/solaris/bin/i586/jvm.cfg openjdk/jdk/src/solaris/bin/i586/jvm.cfg
+deleted file mode 100644
+index b97e5ae..0000000
+--- openjdk/jdk/src/solaris/bin/i586/jvm.cfg
++++ /dev/null
+@@ -1,38 +0,0 @@
+-# Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation. Sun designates this
+-# particular file as subject to the "Classpath" exception as provided
+-# by Sun in the LICENSE file that accompanied this code.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+-# CA 95054 USA or visit www.sun.com if you need additional information or
+-# have any questions.
+-#
+-# List of JVMs that can be used as an option to java, javac, etc.
+-# Order is important -- first in this list is the default JVM.
+-# NOTE that this both this file and its format are UNSUPPORTED and
+-# WILL GO AWAY in a future release.
+-#
+-# You may also select a JVM in an arbitrary location with the
+-# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
+-# and may not be available in a future release.
+-#
+--client IF_SERVER_CLASS -server
+--server KNOWN
+--hotspot ALIASED_TO -client
+--classic WARN
+--native ERROR
+--green ERROR
+diff --git openjdk/jdk/src/solaris/bin/x86/jvm.cfg openjdk/jdk/src/solaris/bin/x86/jvm.cfg
+new file mode 100644
+index 0000000..b97e5ae
+--- /dev/null
++++ openjdk/jdk/src/solaris/bin/x86/jvm.cfg
+@@ -0,0 +1,38 @@
++# Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation. Sun designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Sun in the LICENSE file that accompanied this code.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++# CA 95054 USA or visit www.sun.com if you need additional information or
++# have any questions.
++#
++# List of JVMs that can be used as an option to java, javac, etc.
++# Order is important -- first in this list is the default JVM.
++# NOTE that this both this file and its format are UNSUPPORTED and
++# WILL GO AWAY in a future release.
++#
++# You may also select a JVM in an arbitrary location with the
++# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
++# and may not be available in a future release.
++#
++-client IF_SERVER_CLASS -server
++-server KNOWN
++-hotspot ALIASED_TO -client
++-classic WARN
++-native ERROR
++-green ERROR
+--
+1.6.5
+
+From d5274fb90454c0e40b665d865f456430949791c4 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:42:11 +0200
+Subject: [PATCH 2/4] sane-arch4
+
+---
+ .../share/native/com/sun/mediopenjdk/sound/SoundDefs.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
+index 94624e0..6522503 100644
+--- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
+@@ -36,7 +36,7 @@
+ #define X_ALPHA 1
+ #define X_AMD64 2
+ #define X_ARM 3
+-#define X_I586 4
++#define X_X86 4
+ #define X_IA64 5
+ #define X_M68K 6
+ #define X_MIPS 7
+--
+1.6.5
+
+From 251338c93253d1026a37df2793956d7985f9f4eb Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:44:13 +0200
+Subject: [PATCH 4/4] sane-arch4
+
+---
+ jdk/make/javax/sound/SoundDefs.gmk | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git openjdk/jdk/make/javax/sound/SoundDefs.gmk openjdk/jdk/make/javax/sound/SoundDefs.gmk
+index 22ad8e0..a54ecd5 100644
+--- openjdk/jdk/make/javax/sound/SoundDefs.gmk
++++ openjdk/jdk/make/javax/sound/SoundDefs.gmk
+@@ -70,9 +70,9 @@ else
+ CPPFLAGS += -DX_ARCH=X_ARM
+ endif # ARCH arm
+
+- ifeq ($(ARCH), i586)
+- CPPFLAGS += -DX_ARCH=X_I586
+- endif # ARCH i586
++ ifeq ($(ARCH), x86)
++ CPPFLAGS += -DX_ARCH=X_X86
++ endif # ARCH x86
+
+ ifeq ($(ARCH), ia64)
+ CPPFLAGS += -DX_ARCH=X_IA64
+--
+1.6.5
+
+Index: openjdk/jdk/make/common/shared/Platform.gmk
+===================================================================
+--- openjdk/jdk/make/common/shared/Platform.gmk 2009-10-23 22:17:12.749059413 +0200
++++ openjdk/jdk/make/common/shared/Platform.gmk 2009-10-23 22:18:16.236579466 +0200
+@@ -56,8 +56,8 @@
+ # OS_VENDOR company name
+ # TEMP_DISK /tmp or C:/temp
+ # ARCH_DATA_MODEL 32 or 64
+-# ARCH sparc, sparcv9, i586, amd64, or ia64
+-# ARCH_FAMILY sparc or i586
++# ARCH sparc, sparcv9, x86, amd64, or ia64
++# ARCH_FAMILY sparc or x86
+ # ARCHPROP sparc or x86
+ # ARCH_VM_SUBDIR jre/bin, jre/lib/sparc, etc.
+ # LIBARCH sparc, sparcv9, i386, amd64, or ia64
+@@ -200,7 +200,7 @@
+ endif
+ archExpr = case "$(mach)" in \
+ i[3-9]86) \
+- echo i586 \
++ echo x86 \
+ ;; \
+ ia64) \
+ echo ia64 \
+@@ -239,7 +239,7 @@
+ ARCH=sparcv9
+ endif
+ else
+- # i586 is 32-bit, amd64 is 64-bit
++ # x86 is 32-bit, amd64 is 64-bit
+ ifndef ARCH_DATA_MODEL
+ ifeq ($(ARCH), alpha)
+ ARCH_DATA_MODEL=64
+@@ -250,7 +250,7 @@
+ ifeq ($(ARCH), arm)
+ ARCH_DATA_MODEL=32
+ endif
+- ifeq ($(ARCH), i586)
++ ifeq ($(ARCH), x86)
+ ARCH_DATA_MODEL=32
+ endif
+ ifeq ($(ARCH), ia64)
+@@ -280,12 +280,7 @@
+ endif
+ endif
+
+- # Need to maintain the jre/lib/i386 location for 32-bit Intel
+- ifeq ($(ARCH), i586)
+- LIBARCH = i386
+- else
+- LIBARCH = $(ARCH)
+- endif
++ LIBARCH = $(ARCH)
+
+ # Value of Java os.arch property
+ ARCHPROP = $(LIBARCH)
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-sane-x86-arch-name.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-sane-x86-arch-name.patch
new file mode 100644
index 0000000..1d67dbf
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-sane-x86-arch-name.patch
@@ -0,0 +1,47 @@
+Index: icedtea6-1.7/acinclude.m4
+===================================================================
+--- icedtea6-1.7.orig/acinclude.m4 2010-01-26 20:37:07.000000000 +0100
++++ icedtea6-1.7/acinclude.m4 2010-02-02 09:28:43.681373126 +0100
+@@ -8,11 +8,11 @@
+ CROSS_TARGET_ARCH=x86_64
+ ;;
+ i?86-*-*)
+- BUILD_ARCH_DIR=i586
+- INSTALL_ARCH_DIR=i386
+- JRE_ARCH_DIR=i386
++ BUILD_ARCH_DIR=x86
++ INSTALL_ARCH_DIR=x86
++ JRE_ARCH_DIR=x86
+ ARCH_PREFIX=${LINUX32}
+- CROSS_TARGET_ARCH=i386
++ CROSS_TARGET_ARCH=x86
+ ;;
+ alpha*-*-*)
+ BUILD_ARCH_DIR=alpha
+@@ -733,7 +733,7 @@
+ ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
+ dnl can't use AC_CHECK_SIZEOF on multilib
+ case "${ZERO_LIBARCH}" in
+- i386|ppc|s390|sparc)
++ x86|ppc|s390|sparc)
+ ZERO_BITSPERWORD=32
+ ;;
+ amd64|ppc64|s390x|sparc64)
+@@ -745,7 +745,7 @@
+ esac
+ AC_C_BIGENDIAN([ZERO_ENDIANNESS="big"], [ZERO_ENDIANNESS="little"])
+ case "${ZERO_LIBARCH}" in
+- i386)
++ x86)
+ ZERO_ARCHDEF="IA32"
+ ;;
+ ppc*)
+@@ -762,7 +762,7 @@
+ esac
+ dnl multilib machines need telling which mode to build for
+ case "${ZERO_LIBARCH}" in
+- i386|ppc|sparc)
++ x86|ppc|sparc)
+ ZERO_ARCHFLAG="-m32"
+ ;;
+ s390)
diff --git a/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-unbreak-float.patch b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-unbreak-float.patch
new file mode 100644
index 0000000..9f875de
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.7.5/icedtea-unbreak-float.patch
@@ -0,0 +1,18 @@
+Index: openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h
+===================================================================
+--- openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:49:39.972718207 +0100
++++ openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:50:04.635639302 +0100
+@@ -27,13 +27,11 @@
+
+ #include "jfdlibm.h"
+
+-#ifdef __NEWVALID /* special setup for Sun test regime */
+ #if defined(i386) || defined(i486) || \
+ defined(intel) || defined(x86) || \
+ defined(i86pc) || defined(_M_IA64) || defined(ia64)
+ #define _LITTLE_ENDIAN
+ #endif
+-#endif
+
+ #ifdef _LITTLE_ENDIAN
+ #define __HI(x) *(1+(int*)&x)
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/build-hacks-native.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/build-hacks-native.patch
new file mode 100644
index 0000000..9432d03
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/build-hacks-native.patch
@@ -0,0 +1,15 @@
+Index: icedtea6-1.6.1/Makefile.am
+===================================================================
+--- icedtea6-1.6.1.orig/Makefile.am 2009-12-24 11:38:06.582572265 +0100
++++ icedtea6-1.6.1/Makefile.am 2009-12-24 11:57:27.159578486 +0100
+@@ -265,6 +265,10 @@
+ FT2_LIB="$(FREETYPE2_LIBS)" \
+ ALT_PARALLEL_COMPILE_JOBS="$(PARALLEL_JOBS)" \
+ HOTSPOT_BUILD_JOBS="$(PARALLEL_JOBS)" \
++ OE_CFLAGS="$(OE_CFLAGS)" \
++ OE_CPPFLAGS="$(OE_CPPFLAGS)" \
++ OE_CXXFLAGS="$(OE_CXXFLAGS)" \
++ OE_LDFLAGS="$(OE_LDFLAGS)" \
+ JAVAC="" \
+ RHINO_JAR="$(RHINO_JAR)" \
+ JAR_KNOWS_ATFILE="$(JAR_KNOWS_ATFILE)" \
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/disable-library-checks.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/disable-library-checks.patch
new file mode 100644
index 0000000..23b8bed
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/disable-library-checks.patch
@@ -0,0 +1,141 @@
+Index: icedtea6-1.7/configure.ac
+===================================================================
+--- icedtea6-1.7.orig/configure.ac 2010-01-26 04:52:18.000000000 +0100
++++ icedtea6-1.7/configure.ac 2010-02-08 12:05:51.354556052 +0100
+@@ -205,9 +205,9 @@
+ fi
+
+ dnl pkgconfig cannot be used to find these headers and libraries.
+-AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
+- ,[AC_MSG_ERROR("CUPS headers were not found -
+- try installing cups-devel.")])
++#AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
++# ,[AC_MSG_ERROR("CUPS headers were not found -
++# try installing cups-devel.")])
+ AC_CHECK_HEADERS([X11/X.h],[]
+ ,[AC_MSG_ERROR("xorg headers were not found -
+ try installing xorg-x11-proto-devel.")])
+@@ -239,12 +239,12 @@
+ AC_SUBST(XT_LIBS)
+
+ dnl Check for libXp headers and libraries.
+-PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no])
+-if test "x${XP_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xp - \
+- Try installing libXp-devel.])
+-fi
++#PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no])
++#if test "x${XP_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xp - \
++# Try installing libXp-devel.])
++#fi
+ AC_SUBST(XP_CFLAGS)
+ AC_SUBST(XP_LIBS)
+
+@@ -258,16 +258,16 @@
+ AC_SUBST(X11_CFLAGS)
+ AC_SUBST(X11_LIBS)
+
+-dnl Check for libXinerama headers and libraries.
+-PKG_CHECK_MODULES(XINERAMA, xinerama,[XINERAMA_FOUND=yes]
+- ,[XINERAMA_FOUND=no])
+-if test "x${XINERAMA_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xinerama - \
+- Try installing libXinerama-devel.])
+-fi
+-AC_SUBST(XINERAMA_CFLAGS)
+-AC_SUBST(XINERAMA_LIBS)
++#dnl Check for libXinerama headers and libraries.
++#PKG_CHECK_MODULES(XINERAMA, xinerama,[XINERAMA_FOUND=yes]
++# ,[XINERAMA_FOUND=no])
++#if test "x${XINERAMA_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xinerama - \
++# Try installing libXinerama-devel.])
++#fi
++#AC_SUBST(XINERAMA_CFLAGS)
++#AC_SUBST(XINERAMA_LIBS)
+
+ if test "x${ENABLE_XRENDER}" = "xyes"
+ then
+@@ -341,26 +341,26 @@
+ AC_CONFIG_FILES([tapset/jstack.stp])
+ fi
+
+-dnl Check for libpng headers and libraries.
+-PKG_CHECK_MODULES(LIBPNG, libpng,[LIBPNG_FOUND=yes]
+- ,[LIBPNG_FOUND=no])
+-if test "x${LIBPNG_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find libpng - \
+- Try installing libpng-devel.])
+-fi
+-AC_SUBST(LIBPNG_CFLAGS)
+-AC_SUBST(LIBPNG_LIBS)
+-
+-dnl Check for libXtst headers and libraries.
+-PKG_CHECK_MODULES(XTST, xtst,[XTST_FOUND=yes],[XTST_FOUND=no])
+-if test "x${XTST_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xtst - \
+- Try installing libXtst-devel.])
+-fi
+-AC_SUBST(XTST_CFLAGS)
+-AC_SUBST(XTST_LIBS)
++#dnl Check for libpng headers and libraries.
++#PKG_CHECK_MODULES(LIBPNG, libpng,[LIBPNG_FOUND=yes]
++# ,[LIBPNG_FOUND=no])
++#if test "x${LIBPNG_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find libpng - \
++# Try installing libpng-devel.])
++#fi
++#AC_SUBST(LIBPNG_CFLAGS)
++#AC_SUBST(LIBPNG_LIBS)
++
++#dnl Check for libXtst headers and libraries.
++#PKG_CHECK_MODULES(XTST, xtst,[XTST_FOUND=yes],[XTST_FOUND=no])
++#if test "x${XTST_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xtst - \
++# Try installing libXtst-devel.])
++#fi
++#AC_SUBST(XTST_CFLAGS)
++#AC_SUBST(XTST_LIBS)
+
+ dnl Check for freetype2 headers and libraries.
+ PKG_CHECK_MODULES(FREETYPE2, freetype2,[FREETYPE2_FOUND=yes]
+@@ -373,18 +373,18 @@
+ AC_SUBST(FREETYPE2_CFLAGS)
+ AC_SUBST(FREETYPE2_LIBS)
+
+-dnl Check for alsa headers and libraries (only required for Linux).
+-if test "x${BUILD_OS_DIR}" = "xlinux"
+-then
+- PKG_CHECK_MODULES(ALSA, alsa,[ALSA_FOUND=yes],[ALSA_FOUND=no])
+- if test "x${ALSA_FOUND}" = xno
+- then
+- AC_MSG_ERROR([Could not find alsa - \
+- Try installing alsa-lib-devel.])
+- fi
+-AC_SUBST(ALSA_CFLAGS)
+-AC_SUBST(ALSA_LIBS)
+-fi
++#dnl Check for alsa headers and libraries (only required for Linux).
++#if test "x${BUILD_OS_DIR}" = "xlinux"
++#then
++# PKG_CHECK_MODULES(ALSA, alsa,[ALSA_FOUND=yes],[ALSA_FOUND=no])
++# if test "x${ALSA_FOUND}" = xno
++# then
++# AC_MSG_ERROR([Could not find alsa - \
++# Try installing alsa-lib-devel.])
++# fi
++#AC_SUBST(ALSA_CFLAGS)
++#AC_SUBST(ALSA_LIBS)
++#fi
+
+ if test "x${enable_pulse_java}" = "xyes"
+ then
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-disable-compilation.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-disable-compilation.patch
new file mode 100644
index 0000000..cd0f68a
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-disable-compilation.patch
@@ -0,0 +1,513 @@
+Index: openjdk/jdk/make/sun/awt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/awt/Makefile 2009-04-24 09:33:55.000000000 +0200
++++ openjdk/jdk/make/sun/awt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -180,7 +180,8 @@
+ include $(BUILDDIR)/common/Mapfile-vers.gmk
+ include $(BUILDDIR)/common/Library.gmk
+
+-build: fontconfigs
++#build: fontconfigs
++build:
+
+
+ ifeq ($(PLATFORM), windows)
+@@ -535,9 +536,9 @@
+ -I$(PLATFORM_SRC)/native/$(PKGDIR) \
+ $(EVENT_MODEL)
+
+-ifeq ($(PLATFORM), linux)
+-LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
+-endif
++#ifeq ($(PLATFORM), linux)
++#LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
++#endif
+
+ LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
+ $(AWT_RUNPATH)
+Index: openjdk/jdk/make/javax/sound/jsoundalsa/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/javax/sound/jsoundalsa/Makefile 2009-09-29 13:48:34.534565581 +0200
++++ openjdk/jdk/make/javax/sound/jsoundalsa/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -44,34 +44,35 @@
+ # Files
+ #
+
+-FILES_c = \
+- Utilities.c \
+- $(DAUDIOFILES_c) \
+- $(MIDIFILES_c) \
+- $(PORTFILES_c)
++#FILES_c = \
++# Utilities.c \
++# $(DAUDIOFILES_c) \
++# $(MIDIFILES_c) \
++# $(PORTFILES_c)
+
+ # platform dependent files
+-FILES_c += \
+- PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_PCM.c \
+- PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_Ports.c
+-
+-FILES_export = \
+- $(DAUDIOFILES_export) \
+- $(MIDIFILES_export) \
+- $(PORTFILES_export)
++#FILES_c += \
++# PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_PCM.c \
++# PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_Ports.c
++
++FILES_export =
++#FILES_export = \
++# $(DAUDIOFILES_export) \
++# $(MIDIFILES_export) \
++# $(PORTFILES_export)
+
+-OTHER_LDLIBS += -lasound
++#OTHER_LDLIBS += -lasound
+
+ CPPFLAGS += \
+- -DUSE_DAUDIO=TRUE \
+- -DUSE_PORTS=TRUE \
+- -DUSE_PLATFORM_MIDI_OUT=TRUE \
+- -DUSE_PLATFORM_MIDI_IN=TRUE \
++ -DUSE_DAUDIO=FALSE \
++ -DUSE_PORTS=FALSE \
++ -DUSE_PLATFORM_MIDI_OUT=FALSE \
++ -DUSE_PLATFORM_MIDI_IN=FALSE \
+ -I$(SHARE_SRC)/native/com/sun/media/sound
+
+ #
+Index: openjdk/jdk/make/sun/splashscreen/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/splashscreen/Makefile 2009-09-29 13:48:33.738565601 +0200
++++ openjdk/jdk/make/sun/splashscreen/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -32,7 +32,8 @@
+ #
+ # Files
+ #
+-include FILES_c.gmk
++#include FILES_c.gmk
++FILES_c =
+
+ FILES_java = \
+ java/awt/SplashScreen.java
+@@ -62,9 +63,9 @@
+ CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE
+
+ ifneq ($(PLATFORM), windows)
+- CFLAGS += -DWITH_X11
+- CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
+- OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpng -ljpeg -lgif -lz -lpthread
++# CFLAGS += -DWITH_X11
++# CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
++# OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpng -ljpeg -lgif -lz -lpthread
+ else # PLATFORM
+ CFLAGS += -DWITH_WIN32
+ OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib
+@@ -79,7 +80,7 @@
+ vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
+ vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen
+
+-CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
++#CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
+
+ ifeq ($(PLATFORM), linux)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+Index: openjdk/jdk/make/sun/xawt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/xawt/Makefile 2009-04-24 09:33:56.000000000 +0200
++++ openjdk/jdk/make/sun/xawt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -41,15 +41,16 @@
+ #
+ # Files
+ #
+-include FILES_c_unix.gmk
+-include FILES_export_unix.gmk
++#include FILES_c_unix.gmk
++FILES_c =
++#include FILES_export_unix.gmk
+ AUTO_FILES_JAVA_DIRS = sun/awt/X11
+ AUTO_JAVA_PRUNE = WrapperGenerator.java
+
+ LDFLAGS += -L$(OPENWIN_LIB)
+
+ ifeq ($(PLATFORM), linux)
+-LDFLAGS += -lpthread
++#LDFLAGS += -lpthread
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+
+@@ -86,16 +87,19 @@
+ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl
+ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11
+
+-OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -ldl \
+- $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
++#OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -ldl \
++# $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
+
+ ifeq ($(PLATFORM), solaris)
+ CPPFLAGS += -DFUNCPROTO=15
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+
+-CPPFLAGS += -I$(CUPS_HEADERS_PATH)
++#CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+
++# Normally we would like to patch these includes away but
++# we need them for the successfull compilation of the sizer
++# executables.
+ CPPFLAGS += -DXAWT -DXAWT_HACK \
+ -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
+ -I$(PLATFORM_SRC)/native/sun/awt \
+@@ -124,10 +128,10 @@
+
+ ifeq ($(PLATFORM), linux)
+ # Allows for builds on Debian GNU Linux, X11 is in a different place
+- CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
+- -I/usr/include/X11/extensions \
+- -I$(MOTIF_DIR)/include \
+- -I$(OPENWIN_HOME)/include
++# CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
++# -I/usr/include/X11/extensions \
++# -I$(MOTIF_DIR)/include \
++# -I$(OPENWIN_HOME)/include
+ endif
+
+ ifeq ($(PLATFORM), solaris)
+@@ -238,18 +242,20 @@
+ $(SIZER_DIR) $(XLIBTYPES) "sizer" $(subst .,,$(suffix $(basename $@)))
+
+ $(SIZES): $(SIZERS)
+- @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
+- $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
+- $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
+- $(CHMOD) +w $@;\
+- else \
+- $(ECHO) GENERATING $@; \
+- $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
+- fi
+- @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
+- $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+- $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+- fi
++ touch $(SIZES)
++#
++# @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
++# $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
++# $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
++# $(CHMOD) +w $@;\
++# else \
++# $(ECHO) GENERATING $@; \
++# $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
++# fi
++# @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
++# $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
++# $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
++# fi
+
+ $(TEMPDIR)/.gen.wrappers: $(SIZES) $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
+ $(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
+Index: openjdk/jdk/make/sun/jawt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/jawt/Makefile 2009-09-29 13:48:34.186565471 +0200
++++ openjdk/jdk/make/sun/jawt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -36,7 +36,8 @@
+ ifeq ($(PLATFORM), windows)
+ FILES_cpp = jawt.cpp
+ else # PLATFORM
+-FILES_c = jawt.c
++FILES_c =
++#FILES_c = jawt.c
+ endif # PLATFORM
+
+ FILES_h = $(INCLUDEDIR)/jawt.h \
+Index: openjdk/jdk/make/sun/jpeg/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/jpeg/Makefile 2009-09-29 13:48:33.726565626 +0200
++++ openjdk/jdk/make/sun/jpeg/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -37,7 +37,8 @@
+ #
+ # Files
+ #
+-include FILES_c.gmk
++FILES_c =
++#include FILES_c.gmk
+
+ AUTO_FILES_JAVA_DIRS = sun/awt/image com/sun/imageio/plugins/jpeg
+
+Index: openjdk/jdk/make/common/shared/Defs-java.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/shared/Defs-java.gmk 2009-09-29 13:48:55.954565215 +0200
++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2009-09-29 13:57:14.446815782 +0200
+@@ -36,14 +36,14 @@
+ # Memory related -J flags that all uses of java tools should use.
+ #
+ JAVA_MEM_FLAGS = -Xmx$(MAX_VM_MEMORY)m
+-ifneq (,$(filter $(ARCH), ia64 s390))
++#ifneq (,$(filter $(ARCH), ia64 s390))
+ # Special flags for javac on ia64 to work around a VM problem with
+ # bad code generation during inlining (what version had this problem?):
+ # Suspect this may not be needed anymore.
+- JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
+-else
+- JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
+-endif
++# JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
++#else
++# JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
++#endif
+
+ #
+ # All java tools (javac, javah, and javadoc) run faster with certain java
+Index: openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-04-24 09:34:04.000000000 +0200
++++ openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-09-29 13:57:14.450815511 +0200
+@@ -113,7 +113,7 @@
+ * @since 1.4
+ */
+ public static boolean isHeadless() {
+- return getHeadlessProperty();
++ return true;
+ }
+
+ /**
+Index: openjdk/corba/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/corba/make/common/Defs.gmk 2009-04-24 09:30:19.000000000 +0200
++++ openjdk/corba/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
+@@ -444,11 +444,11 @@
+ # Tool flags
+ #
+ ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
+-CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
+-CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
+-CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
++CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(OE_CFLAGS)
++CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(OE_CXXFLAGS)
++CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) $(OE_CPPFLAGS) \
+ $(DEFINES) $(OPTIONS:%=-D%)
+-LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
++LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) $(OE_LDFLAGS)
+ LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
+ LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
+ $(OTHER_LINTFLAGS)
+Index: openjdk/jdk/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Defs.gmk 2009-09-29 13:48:33.590565061 +0200
++++ openjdk/jdk/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
+@@ -662,11 +662,11 @@
+ # Tool flags
+ #
+ ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
+-CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
+-CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
+-CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
++CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(OE_CFLAGS)
++CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(OE_CXXFLAGS)
++CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) $(OE_CPPFLAGS) \
+ $(DEFINES) $(OPTIONS:%=-D%)
+-LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
++LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) $(OE_LDFLAGS)
+ LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
+ LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
+ $(OTHER_LINTFLAGS)
+Index: openjdk/hotspot/make/linux/makefiles/vm.make
+===================================================================
+--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2009-09-29 13:48:34.098565716 +0200
++++ openjdk/hotspot/make/linux/makefiles/vm.make 2009-09-29 13:57:14.450815511 +0200
+@@ -170,6 +170,7 @@
+ LIBS_VM += $(LLVM_LIBS)
+ endif
+
++LFLAGS_VM = $(OE_LDFLAGS)
+ LINK_VM = $(LINK_LIB.c)
+
+ # rule for building precompiled header
+Index: openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c
+===================================================================
+--- openjdk.orig/jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-04-24 09:34:34.000000000 +0200
++++ openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-09-29 13:57:14.450815511 +0200
+@@ -26,8 +26,10 @@
+ #include <jni.h>
+ #include <jni_util.h>
+ #include <dlfcn.h>
++#if 0
+ #include <cups/cups.h>
+ #include <cups/ppd.h>
++#endif
+
+ //#define CUPS_DEBUG
+
+@@ -37,6 +39,7 @@
+ #define DPRINTF(x, y)
+ #endif
+
++#if 0
+ typedef const char* (*fn_cupsServer)(void);
+ typedef int (*fn_ippPort)(void);
+ typedef http_t* (*fn_httpConnect)(const char *, int);
+@@ -56,7 +59,7 @@
+ fn_ppdClose j2d_ppdClose;
+ fn_ppdFindOption j2d_ppdFindOption;
+ fn_ppdPageSize j2d_ppdPageSize;
+-
++#endif
+
+ /*
+ * Initialize library functions.
+@@ -65,6 +68,7 @@
+ JNIEXPORT jboolean JNICALL
+ Java_sun_print_CUPSPrinter_initIDs(JNIEnv *env,
+ jobject printObj) {
++#if 0
+ void *handle = dlopen("libcups.so.2", RTLD_LAZY | RTLD_GLOBAL);
+
+ if (handle == NULL) {
+@@ -131,6 +135,8 @@
+ }
+
+ return JNI_TRUE;
++#endif
++ return JNI_FALSE;
+ }
+
+ /*
+@@ -141,6 +147,7 @@
+ Java_sun_print_CUPSPrinter_getCupsServer(JNIEnv *env,
+ jobject printObj)
+ {
++#if 0
+ jstring cServer = NULL;
+ const char* server = j2d_cupsServer();
+ if (server != NULL) {
+@@ -152,6 +159,8 @@
+ }
+ }
+ return cServer;
++#endif
++ return NULL;
+ }
+
+ /*
+@@ -162,8 +171,11 @@
+ Java_sun_print_CUPSPrinter_getCupsPort(JNIEnv *env,
+ jobject printObj)
+ {
++#if 0
+ int port = j2d_ippPort();
+ return (jint) port;
++#endif
++ return 0;
+ }
+
+
+@@ -177,6 +189,7 @@
+ jstring server,
+ jint port)
+ {
++#if 0
+ const char *serverName;
+ serverName = (*env)->GetStringUTFChars(env, server, NULL);
+ if (serverName != NULL) {
+@@ -187,6 +200,7 @@
+ return JNI_TRUE;
+ }
+ }
++#endif
+ return JNI_FALSE;
+ }
+
+@@ -199,6 +213,7 @@
+ jobject printObj,
+ jstring printer)
+ {
++#if 0
+ ppd_file_t *ppd;
+ ppd_option_t *optionTray, *optionPage;
+ ppd_choice_t *choice;
+@@ -304,6 +319,8 @@
+ j2d_ppdClose(ppd);
+ unlink(filename);
+ return nameArray;
++#endif
++ return NULL;
+ }
+
+
+@@ -315,6 +332,7 @@
+ jobject printObj,
+ jstring printer)
+ {
++#if 0
+ ppd_file_t *ppd;
+ ppd_option_t *option;
+ ppd_choice_t *choice;
+@@ -374,4 +392,6 @@
+ j2d_ppdClose(ppd);
+ unlink(filename);
+ return sizeArray;
++#endif
++ return NULL;
+ }
+Index: openjdk/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-04-24 09:34:17.000000000 +0200
++++ openjdk/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-09-29 13:57:14.454815276 +0200
+@@ -244,6 +244,8 @@
+ * that might be specified.
+ */
+ fontConfig = createFontConfiguration();
++ if (fontConfig == null)
++ return null;
+ getPlatformFontPathFromFontConfig();
+
+ String extraFontPath = fontConfig.getExtraFontPath();
+Index: openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-04-24 09:34:33.000000000 +0200
++++ openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-09-29 13:57:14.454815276 +0200
+@@ -899,7 +899,8 @@
+
+ // Implements SunGraphicsEnvironment.createFontConfiguration.
+ protected FontConfiguration createFontConfiguration() {
+- return new MFontConfiguration(this);
++// return new MFontConfiguration(this);
++ return null;
+ }
+ public FontConfiguration
+ createFontConfiguration(boolean preferLocaleFonts,
+Index: openjdk/jdk/make/launchers/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/launchers/Makefile 2009-09-29 13:48:33.490815135 +0200
++++ openjdk/jdk/make/launchers/Makefile 2009-09-29 13:57:14.454815276 +0200
+@@ -57,7 +57,7 @@
+ endif
+ # Run MAKE $@ for all generic launchers
+ define make-all-launchers
+-$(call make-launcher, appletviewer, sun.applet.Main, , )
++#$(call make-launcher, appletviewer, sun.applet.Main, , )
+ $(call make-launcher, apt, com.sun.tools.apt.Main, , )
+ $(call make-launcher, extcheck, com.sun.tools.extcheck.Main, , )
+ $(call make-launcher, idlj, com.sun.tools.corba.se.idl.toJavaPortable.Compile, , )
+@@ -93,7 +93,7 @@
+ -J-Dcom.sun.CORBA.activation.Port=1049 \
+ -J-Dcom.sun.CORBA.POA.ORBServerId=1, )
+ $(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
+-$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
++#$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
+ $(call make-launcher, rmic, sun.rmi.rmic.Main, , )
+ $(call make-launcher, rmid, sun.rmi.server.Activation, , )
+ $(call make-launcher, rmiregistry, sun.rmi.registry.RegistryImpl, , )
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-fix-freetype.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-fix-freetype.patch
new file mode 100644
index 0000000..3420fbd
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-fix-freetype.patch
@@ -0,0 +1,13 @@
+Index: openjdk/jdk/make/tools/freetypecheck/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/tools/freetypecheck/Makefile 2009-09-29 13:48:33.590565061 +0200
++++ openjdk/jdk/make/tools/freetypecheck/Makefile 2009-09-29 14:00:04.470566156 +0200
+@@ -45,7 +45,7 @@
+ FT_OPTIONS = $(CFLAGS)
+ endif
+
+-FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2
++FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2 $(FREETYPE2_CFLAGS) $(FREETYPE2_LIBS) $(FREETYPE2_HEADERS)
+ FT_OPTIONS += $(XARCH)
+
+ #add runtime library search path
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-fix-zlib.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-fix-zlib.patch
new file mode 100644
index 0000000..eff7e48
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-ecj-fix-zlib.patch
@@ -0,0 +1,61 @@
+Index: openjdk/jdk/make/com/sun/java/pack/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2009-09-29 13:48:34.538565136 +0200
++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2009-09-29 14:00:26.226565853 +0200
+@@ -80,7 +80,7 @@
+ OTHER_LDLIBS += $(JVMLIB)
+ endif
+
+-OTHER_LDLIBS += -lz
++OTHER_LDLIBS += -L$(libdir) -lz
+ CXXFLAGS_DBG += -DFULL
+ CXXFLAGS_OPT += -DPRODUCT
+ CXXFLAGS_COMMON += -DFULL
+Index: openjdk/jdk/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
++++ openjdk/jdk/make/common/Defs.gmk 2009-09-29 14:00:26.226565853 +0200
+@@ -289,7 +289,7 @@
+
+ endif # PROGRAM
+
+-LDLIBS_COMMON += $(EXTRA_LIBS)
++LDLIBS_COMMON += $(EXTRA_LIBS) -L$(libdir)
+
+ #
+ # Default is to build, not import native binaries
+@@ -425,7 +425,7 @@
+ CLASSDESTDIR = $(CLASSBINDIR)
+ endif
+
+-INCLUDES = -I. -I$(CLASSHDRDIR) \
++INCLUDES = -I$(includedir) -I. -I$(CLASSHDRDIR) \
+ $(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES)
+ OTHER_CPPFLAGS = $(INCLUDES)
+
+Index: openjdk/jdk/make/common/Program.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Program.gmk 2009-09-29 13:48:33.914565255 +0200
++++ openjdk/jdk/make/common/Program.gmk 2009-09-29 14:00:26.226565853 +0200
+@@ -73,7 +73,7 @@
+ # itself, as with all the Windows libraries.
+ #
+ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
+- LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
++ LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli -L $(libdir)
+ OTHER_LDLIBS += -ljli
+ ifeq ($(PLATFORM), solaris)
+ ifeq ($(ARCH_DATA_MODEL), 32)
+Index: openjdk/jdk/make/java/jli/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/java/jli/Makefile 2009-09-29 13:48:33.806565054 +0200
++++ openjdk/jdk/make/java/jli/Makefile 2009-09-29 14:00:26.230565844 +0200
+@@ -61,7 +61,7 @@
+ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
+ LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
+ # Guarantee very limited dependencies
+- LDLIBS = -lz -lc
++ LDLIBS = -L$(libdir) -lz -lc
+ endif
+
+ ifeq ($(PLATFORM), windows)
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-hotspot-make-arch-sane-for-x86.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-hotspot-make-arch-sane-for-x86.patch
new file mode 100644
index 0000000..9d7b9bb
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-hotspot-make-arch-sane-for-x86.patch
@@ -0,0 +1,1130 @@
+From b8a51665ada45e3beb0823c03c025d5514f5e745 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Thu, 22 Oct 2009 16:35:25 +0200
+Subject: [PATCH] hotspot: make arch sane for x86
+
+diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
+index 38e0f78..64c8410 100644
+--- openjdk/hotspot/agent/make/saenv.sh
++++ openjdk/hotspot/agent/make/saenv.sh
+@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+ CPU=amd64
+ else
+- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
++ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+- CPU=i386
++ CPU=x86
+ fi
+ else
+ SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
+diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+index 83ddd1a..c20c7eb 100644
+--- openjdk/hotspot/make/defs.make
++++ openjdk/hotspot/make/defs.make
+@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
+ ifdef LP64
+ BUILDARCH = amd64
+ else
+- BUILDARCH = i486
++ BUILDARCH = x86
+ endif
+ endif
+ ifeq ($(BUILDARCH), sparc)
+@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
+
+ # LIBARCH is 1:1 mapping from BUILDARCH
+ LIBARCH = $(LIBARCH/$(BUILDARCH))
+- LIBARCH/i486 = i386
++ LIBARCH/x86 = x86
+ LIBARCH/amd64 = amd64
+ LIBARCH/sparc = sparc
+ LIBARCH/sparcv9 = sparcv9
+diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
+index bc82543..4a1ef4e 100644
+--- openjdk/hotspot/make/jprt.config
++++ openjdk/hotspot/make/jprt.config
+@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
+ # LINUX: X86, AMD64
+ osarch=`uname -m`
+ if [ "${osarch}" = i686 ] ; then
+- linux_arch=i586
++ linux_arch=x86
+ elif [ "${osarch}" = x86_64 ] ; then
+ linux_arch=amd64
+ fi
+diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
+index eb2ce82..7193de0 100644
+--- openjdk/hotspot/make/jprt.properties
++++ openjdk/hotspot/make/jprt.properties
+@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
+ jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
+ jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
+
+-jprt.my.linux.i586=linux_i586
++jprt.my.linux.x86=linux_x86
+ jprt.my.linux.x64=linux_x64
+ jprt.my.windows.i586=windows_i586
+ jprt.my.windows.x64=windows_x64
+@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
+
+-jprt.my.linux.i586.test.targets = \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
+- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
++jprt.my.linux.x86.test.targets = \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
++ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
+
+ jprt.my.linux.x64.test.targets = \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
+@@ -294,7 +294,7 @@ jprt.test.targets = \
+ ${jprt.my.solaris.sparcv9.test.targets}, \
+ ${jprt.my.solaris.i586.test.targets}, \
+ ${jprt.my.solaris.x64.test.targets}, \
+- ${jprt.my.linux.i586.test.targets}, \
++ ${jprt.my.linux.x86.test.targets}, \
+ ${jprt.my.linux.x64.test.targets}, \
+ ${jprt.my.windows.i586.test.targets}, \
+ ${jprt.my.windows.x64.test.targets}
+diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
+index e317fdd..5d3b1ff 100644
+--- openjdk/hotspot/make/linux/build.sh
++++ openjdk/hotspot/make/linux/build.sh
+@@ -43,7 +43,7 @@ esac
+
+ case `uname -m` in
+ i386|i486|i586|i686)
+- mach=i386
++ mach=x86
+ ;;
+ *)
+ echo "Unsupported machine: " `uname -m`
+diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+index add9823..cbbf81f 100644
+--- openjdk/hotspot/make/linux/makefiles/buildtree.make
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make
+@@ -30,7 +30,7 @@
+ # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
+ # environment or on the command-line:
+ #
+-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
++# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
+ # BUILDARCH - build directory
+ # LIBARCH - the corresponding directory in JDK/JRE
+ # GAMMADIR - top of workspace
+@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
+ DATA_MODE = $(DATA_MODE/$(BUILDARCH))
+ JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
+
+-DATA_MODE/i486 = 32
++DATA_MODE/x86 = 32
+ DATA_MODE/sparc = 32
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64 = 64
+diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
+index 113d4f8..d3f06cb 100644
+--- openjdk/hotspot/make/linux/makefiles/cscope.make
++++ openjdk/hotspot/make/linux/makefiles/cscope.make
+@@ -78,7 +78,7 @@ endif
+ # Processor-specific files for other processors are excluded by default. Use
+ # CS_CPU=x to include platform-specific files for other platforms.
+ ifndef CS_CPU
+-CS_CPU = i486 sparc amd64 ia64
++CS_CPU = x86 sparc amd64 ia64
+ CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
+ endif
+
+diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
+index 9131c79..138dfb3 100644
+--- openjdk/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
+ HS_ARCH = sparc
+ endif
+
++# x86
++ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH_DATA_MODEL = 32
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
++ HS_ARCH = x86
++endif
++
+ # x86_64
+ ifeq ($(ARCH), x86_64)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
+ HS_ARCH = x86
+ else
+ ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
+ HS_ARCH = x86
+- # We have to reset ARCH to i686 since SRCARCH relies on it
+- ARCH = i686
+ endif
+ endif
+
+-# i686
+-ifeq ($(ARCH), i686)
+- ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
+- HS_ARCH = x86
+-endif
+-
+ JDK_INCLUDE_SUBDIR=linux
+
+ # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
+diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+index 0a9f75b..2e29bb9 100644
+--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
++++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+@@ -30,7 +30,7 @@ CC = cc
+ AS = $(CC) -c
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+
+ CFLAGS += $(ARCHFLAG)
+diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
+deleted file mode 100644
+index 610ac91..0000000
+--- openjdk/hotspot/make/linux/platform_i486
++++ /dev/null
+@@ -1,15 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = gcc
+-
+-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
+index 325a3fe..717fc75 100644
+--- openjdk/hotspot/make/linux/platform_i486.suncc
++++ openjdk/hotspot/make/linux/platform_i486.suncc
+@@ -8,10 +8,10 @@ os_arch = linux_x86
+
+ os_arch_model = linux_x86_32
+
+-lib_arch = i386
++lib_arch = x86
+
+ compiler = sparcWorks
+
+-gnu_dis_arch = i386
++gnu_dis_arch = x86
+
+ sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
+new file mode 100644
+index 0000000..5c613fe
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86
+@@ -0,0 +1,15 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = gcc
++
++sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+index b2b3162..a4bbe70 100644
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
+ // i386: 224, ia64: 1105, amd64: 186, sparc 143
+ #ifdef __ia64__
+ #define SYS_gettid 1105
+-#elif __i386__
++#elif __x86__
+ #define SYS_gettid 224
+ #elif __amd64__
+ #define SYS_gettid 186
+@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
+ #elif defined(IA64)
+ static char cpu_arch[] = "ia64";
+ #elif defined(IA32)
+-static char cpu_arch[] = "i386";
++static char cpu_arch[] = "x86";
+ #elif defined(AMD64)
+ static char cpu_arch[] = "amd64";
+ #elif defined(SPARC)
+diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
+index 6bdf4b8..fd43c6e 100644
+--- openjdk/hotspot/src/share/tools/hsdis/Makefile
++++ openjdk/hotspot/src/share/tools/hsdis/Makefile
+@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
+ endif
+
+ # Default arch; it is changed below as needed.
+-ARCH = i386
++ARCH = x86
+ OS = $(shell uname)
+
+ CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
+@@ -87,7 +87,7 @@ endif # SunOS
+ LIBARCH = $(ARCH)
+ ifdef LP64
+ LIBARCH64/sparc = sparcv9
+-LIBARCH64/i386 = amd64
++LIBARCH64/x86 = amd64
+ LIBARCH64 = $(LIBARCH64/$(ARCH))
+ ifneq ($(LIBARCH64),)
+ LIBARCH = $(LIBARCH64)
+diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+index 75b7efe..62c692b 100644
+--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
++++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
+ else
+ disassembler_usage(stderr); /* better than nothing */
+ (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
+-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
+- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
++#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
++ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
+ (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
+ (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
+ #endif
+@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
+ static const char* native_arch_name() {
+ const char* res = HOTSPOT_LIB_ARCH;
+ #ifdef LIBARCH_amd64
+- res = "i386:x86-64";
++ res = "x86:x86-64";
+ #endif
+ #ifdef LIBARCH_sparc
+ res = "sparc:v8plusb";
+diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
+index 2596d85..c2f3eb9 100644
+--- openjdk/hotspot/test/Makefile
++++ openjdk/hotspot/test/Makefile
+@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
+ PLATFORM = solaris
+ ARCH = $(shell uname -p)
+ ifeq ($(ARCH), i386)
+- ARCH=i586
++ ARCH=x86
+ endif
+ endif
+ ifeq ($(OSNAME), Linux)
+ PLATFORM = linux
+ ARCH = $(shell uname -m)
+- ifeq ($(ARCH), i386)
+- ARCH = i586
++ ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH = x86
+ endif
+ endif
+ ifeq ($(OSNAME), Windows_NT)
+@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
+ ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
+ ARCH = x64
+ else
+- ARCH = i586
++ ARCH = x86
+ endif
+ endif
+ endif
+diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
+index 38e0f78..64c8410 100644
+--- openjdk/hotspot/agent/make/saenv.sh
++++ openjdk/hotspot/agent/make/saenv.sh
+@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+ CPU=amd64
+ else
+- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
++ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+- CPU=i386
++ CPU=x86
+ fi
+ else
+ SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
+diff --git openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+index c4ca7de..54c12ca 100644
+--- openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
++++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+@@ -29,7 +29,7 @@
+ #define amd64 1
+ #endif
+
+-#ifdef i386
++#ifdef x86
+ #include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
+ #endif
+
+@@ -295,7 +295,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+ }
+
+ #undef NPRGREG
+-#ifdef i386
++#ifdef x86
+ #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
+ #endif
+ #ifdef ia64
+@@ -314,7 +314,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+
+ #undef REG_INDEX
+
+-#ifdef i386
++#ifdef x86
+ #define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
+
+ regs[REG_INDEX(GS)] = (uintptr_t) gregs.xgs;
+@@ -333,7 +333,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+ regs[REG_INDEX(CS)] = (uintptr_t) gregs.xcs;
+ regs[REG_INDEX(SS)] = (uintptr_t) gregs.xss;
+
+-#endif /* i386 */
++#endif /* x86 */
+
+ #if ia64
+ regs = (*env)->GetLongArrayElements(env, array, &isCopy);
+diff --git openjdk/hotspot/agent/src/os/linux/Makefile openjdk/hotspot/agent/src/os/linux/Makefile
+index a16f3a7..85fecb1 100644
+--- openjdk/hotspot/agent/src/os/linux/Makefile
++++ openjdk/hotspot/agent/src/os/linux/Makefile
+@@ -22,7 +22,7 @@
+ #
+ #
+
+-ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )
++ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo x86 ; fi )
+ GCC = gcc$(GCC_SUFFIX)
+
+ JAVAH = ${JAVA_HOME}/bin/javah
+diff --git openjdk/hotspot/agent/src/os/linux/ps_core.c openjdk/hotspot/agent/src/os/linux/ps_core.c
+index 3562f2d..47ab01b 100644
+--- openjdk/hotspot/agent/src/os/linux/ps_core.c
++++ openjdk/hotspot/agent/src/os/linux/ps_core.c
+@@ -540,7 +540,7 @@ static bool core_handle_prstatus(struct ps_prochandle* ph, const char* buf, size
+
+ if (is_debug()) {
+ print_debug("integer regset\n");
+-#ifdef i386
++#ifdef x86
+ // print the regset
+ print_debug("\teax = 0x%x\n", newthr->regs.eax);
+ print_debug("\tebx = 0x%x\n", newthr->regs.ebx);
+diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+index 83ddd1a..c20c7eb 100644
+--- openjdk/hotspot/make/defs.make
++++ openjdk/hotspot/make/defs.make
+@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
+ ifdef LP64
+ BUILDARCH = amd64
+ else
+- BUILDARCH = i486
++ BUILDARCH = x86
+ endif
+ endif
+ ifeq ($(BUILDARCH), sparc)
+@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
+
+ # LIBARCH is 1:1 mapping from BUILDARCH
+ LIBARCH = $(LIBARCH/$(BUILDARCH))
+- LIBARCH/i486 = i386
++ LIBARCH/x86 = x86
+ LIBARCH/amd64 = amd64
+ LIBARCH/sparc = sparc
+ LIBARCH/sparcv9 = sparcv9
+diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
+index bc82543..4a1ef4e 100644
+--- openjdk/hotspot/make/jprt.config
++++ openjdk/hotspot/make/jprt.config
+@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
+ # LINUX: X86, AMD64
+ osarch=`uname -m`
+ if [ "${osarch}" = i686 ] ; then
+- linux_arch=i586
++ linux_arch=x86
+ elif [ "${osarch}" = x86_64 ] ; then
+ linux_arch=amd64
+ fi
+diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
+index eb2ce82..7193de0 100644
+--- openjdk/hotspot/make/jprt.properties
++++ openjdk/hotspot/make/jprt.properties
+@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
+ jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
+ jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
+
+-jprt.my.linux.i586=linux_i586
++jprt.my.linux.x86=linux_x86
+ jprt.my.linux.x64=linux_x64
+ jprt.my.windows.i586=windows_i586
+ jprt.my.windows.x64=windows_x64
+@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
+
+-jprt.my.linux.i586.test.targets = \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
+- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
++jprt.my.linux.x86.test.targets = \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
++ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
+
+ jprt.my.linux.x64.test.targets = \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
+@@ -294,7 +294,7 @@ jprt.test.targets = \
+ ${jprt.my.solaris.sparcv9.test.targets}, \
+ ${jprt.my.solaris.i586.test.targets}, \
+ ${jprt.my.solaris.x64.test.targets}, \
+- ${jprt.my.linux.i586.test.targets}, \
++ ${jprt.my.linux.x86.test.targets}, \
+ ${jprt.my.linux.x64.test.targets}, \
+ ${jprt.my.windows.i586.test.targets}, \
+ ${jprt.my.windows.x64.test.targets}
+diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
+index e317fdd..5d3b1ff 100644
+--- openjdk/hotspot/make/linux/build.sh
++++ openjdk/hotspot/make/linux/build.sh
+@@ -43,7 +43,7 @@ esac
+
+ case `uname -m` in
+ i386|i486|i586|i686)
+- mach=i386
++ mach=x86
+ ;;
+ *)
+ echo "Unsupported machine: " `uname -m`
+diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+index add9823..cbbf81f 100644
+--- openjdk/hotspot/make/linux/makefiles/buildtree.make
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make
+@@ -30,7 +30,7 @@
+ # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
+ # environment or on the command-line:
+ #
+-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
++# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
+ # BUILDARCH - build directory
+ # LIBARCH - the corresponding directory in JDK/JRE
+ # GAMMADIR - top of workspace
+@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
+ DATA_MODE = $(DATA_MODE/$(BUILDARCH))
+ JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
+
+-DATA_MODE/i486 = 32
++DATA_MODE/x86 = 32
+ DATA_MODE/sparc = 32
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64 = 64
+diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
+index 113d4f8..d3f06cb 100644
+--- openjdk/hotspot/make/linux/makefiles/cscope.make
++++ openjdk/hotspot/make/linux/makefiles/cscope.make
+@@ -78,7 +78,7 @@ endif
+ # Processor-specific files for other processors are excluded by default. Use
+ # CS_CPU=x to include platform-specific files for other platforms.
+ ifndef CS_CPU
+-CS_CPU = i486 sparc amd64 ia64
++CS_CPU = x86 sparc amd64 ia64
+ CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
+ endif
+
+diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
+index 9131c79..138dfb3 100644
+--- openjdk/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
+ HS_ARCH = sparc
+ endif
+
++# x86
++ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH_DATA_MODEL = 32
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
++ HS_ARCH = x86
++endif
++
+ # x86_64
+ ifeq ($(ARCH), x86_64)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
+ HS_ARCH = x86
+ else
+ ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
+ HS_ARCH = x86
+- # We have to reset ARCH to i686 since SRCARCH relies on it
+- ARCH = i686
+ endif
+ endif
+
+-# i686
+-ifeq ($(ARCH), i686)
+- ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
+- HS_ARCH = x86
+-endif
+-
+ JDK_INCLUDE_SUBDIR=linux
+
+ # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
+diff --git openjdk/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+index a2c24bc..27bad01 100644
+--- openjdk/hotspot/make/linux/makefiles/gcc.make
++++ openjdk/hotspot/make/linux/makefiles/gcc.make
+@@ -77,7 +77,7 @@ CFLAGS += -fcheck-new
+ CFLAGS += -g
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32 -march=i586
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+ ARCHFLAG/ia64 =
+ ARCHFLAG/sparc = -m32 -mcpu=v9
+diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+index 0a9f75b..2e29bb9 100644
+--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
++++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+@@ -30,7 +30,7 @@ CC = cc
+ AS = $(CC) -c
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+
+ CFLAGS += $(ARCHFLAG)
+diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
+deleted file mode 100644
+index 610ac91..0000000
+--- openjdk/hotspot/make/linux/platform_i486
++++ /dev/null
+@@ -1,15 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = gcc
+-
+-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
+deleted file mode 100644
+index 325a3fe..0000000
+--- openjdk/hotspot/make/linux/platform_i486.suncc
++++ /dev/null
+@@ -1,17 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = sparcWorks
+-
+-gnu_dis_arch = i386
+-
+-sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
+new file mode 100644
+index 0000000..5c613fe
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86
+@@ -0,0 +1,15 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = gcc
++
++sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86.suncc openjdk/hotspot/make/linux/platform_x86.suncc
+new file mode 100644
+index 0000000..717fc75
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86.suncc
+@@ -0,0 +1,17 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = sparcWorks
++
++gnu_dis_arch = x86
++
++sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/src/os/linux/launcher/java_md.c openjdk/hotspot/src/os/linux/launcher/java_md.c
+index 50a86cd..48141be 100644
+--- openjdk/hotspot/src/os/linux/launcher/java_md.c
++++ openjdk/hotspot/src/os/linux/launcher/java_md.c
+@@ -56,8 +56,8 @@
+ * models is supported, then DUAL_MODE is defined. When DUAL_MODE is
+ * defined, the architecture names for the narrow and wide version of
+ * the architecture are defined in BIG_ARCH and SMALL_ARCH. Currently
+- * only Solaris on sparc/sparcv9 and i586/amd64 is DUAL_MODE; linux
+- * i586/amd64 could be defined as DUAL_MODE but that is not the
++ * only Solaris on sparc/sparcv9 and x86/amd64 is DUAL_MODE; linux
++ * x86/amd64 could be defined as DUAL_MODE but that is not the
+ * current policy.
+ */
+
+@@ -75,8 +75,8 @@
+
+ #else /* 32-bit data model */
+
+-# ifdef i586
+-# define ARCH "i386"
++# ifdef x86
++# define ARCH "x86"
+ # elif defined(__sparc)
+ # define ARCH "sparc"
+ # endif
+@@ -90,7 +90,7 @@
+ # define SMALL_ARCH "sparc"
+ # else
+ # define BIG_ARCH "amd64"
+-# define SMALL_ARCH "i386"
++# define SMALL_ARCH "x86"
+ # endif
+ # include <sys/systeminfo.h>
+ # include <sys/elf.h>
+@@ -1103,7 +1103,7 @@ void PrintMachineDependentOptions() {
+ * This code is somewhat more confused with #ifdef's than we'd
+ * like because this file is used by both Solaris and Linux
+ * platforms, and so needs to be parameterized for SPARC and
+- * i586 hardware. The other Linux platforms (amd64 and ia64)
++ * x86 hardware. The other Linux platforms (amd64 and ia64)
+ * don't even ask this question, because they only come with
+ * server JVMs. */
+
+@@ -1168,11 +1168,11 @@ solaris_sparc_ServerClassMachine(void) {
+
+ #endif /* __sun && __sparc */
+
+-#if defined(__sun) && defined(i586)
++#if defined(__sun) && defined(x86)
+
+ /*
+ * A utility method for asking the CPU about itself.
+- * There's a corresponding version of linux-i586
++ * There's a corresponding version of linux-x86
+ * because the compilers are different.
+ */
+ void
+@@ -1218,13 +1218,13 @@ get_cpuid(uint32_t arg,
+ #endif
+ }
+
+-#endif /* __sun && i586 */
++#endif /* __sun && x86 */
+
+-#if defined(__linux__) && defined(i586)
++#if defined(__linux__) && defined(x86)
+
+ /*
+ * A utility method for asking the CPU about itself.
+- * There's a corresponding version of solaris-i586
++ * There's a corresponding version of solaris-x86
+ * because the compilers are different.
+ */
+ void
+@@ -1286,11 +1286,11 @@ get_cpuid(uint32_t arg,
+ #endif
+ }
+
+-#endif /* __linux__ && i586 */
++#endif /* __linux__ && x86 */
+
+-#ifdef i586
++#ifdef x86
+ /*
+- * Routines shared by solaris-i586 and linux-i586.
++ * Routines shared by solaris-x86 and linux-x86.
+ */
+
+ enum HyperThreadingSupport_enum {
+@@ -1430,11 +1430,11 @@ physical_processors(void) {
+ return result;
+ }
+
+-#endif /* i586 */
++#endif /* x86 */
+
+-#if defined(__sun) && defined(i586)
++#if defined(__sun) && defined(x86)
+
+-/* The definition of a server-class machine for solaris-i586/amd64 */
++/* The definition of a server-class machine for solaris-x86/amd64 */
+ jboolean
+ solaris_i586_ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+@@ -1463,11 +1463,11 @@ solaris_i586_ServerClassMachine(void) {
+ return result;
+ }
+
+-#endif /* __sun && i586 */
++#endif /* __sun && x86 */
+
+-#if defined(__linux__) && defined(i586)
++#if defined(__linux__) && defined(x86)
+
+-/* The definition of a server-class machine for linux-i586 */
++/* The definition of a server-class machine for linux-x86 */
+ jboolean
+ linux_i586_ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+@@ -1496,7 +1496,7 @@ linux_i586_ServerClassMachine(void) {
+ return result;
+ }
+
+-#endif /* __linux__ && i586 */
++#endif /* __linux__ && x86 */
+
+ /* Dispatch to the platform-specific definition of "server-class" */
+ jboolean
+@@ -1504,9 +1504,9 @@ ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+ #if defined(__sun) && defined(__sparc)
+ result = solaris_sparc_ServerClassMachine();
+-#elif defined(__sun) && defined(i586)
++#elif defined(__sun) && defined(x86)
+ result = solaris_i586_ServerClassMachine();
+-#elif defined(__linux__) && defined(i586)
++#elif defined(__linux__) && defined(x86)
+ result = linux_i586_ServerClassMachine();
+ #else
+ if (_launcher_debug) {
+diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+index b2b3162..a4bbe70 100644
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
+ // i386: 224, ia64: 1105, amd64: 186, sparc 143
+ #ifdef __ia64__
+ #define SYS_gettid 1105
+-#elif __i386__
++#elif __x86__
+ #define SYS_gettid 224
+ #elif __amd64__
+ #define SYS_gettid 186
+@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
+ #elif defined(IA64)
+ static char cpu_arch[] = "ia64";
+ #elif defined(IA32)
+-static char cpu_arch[] = "i386";
++static char cpu_arch[] = "x86";
+ #elif defined(AMD64)
+ static char cpu_arch[] = "amd64";
+ #elif defined(SPARC)
+diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
+index 6bdf4b8..fd43c6e 100644
+--- openjdk/hotspot/src/share/tools/hsdis/Makefile
++++ openjdk/hotspot/src/share/tools/hsdis/Makefile
+@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
+ endif
+
+ # Default arch; it is changed below as needed.
+-ARCH = i386
++ARCH = x86
+ OS = $(shell uname)
+
+ CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
+@@ -87,7 +87,7 @@ endif # SunOS
+ LIBARCH = $(ARCH)
+ ifdef LP64
+ LIBARCH64/sparc = sparcv9
+-LIBARCH64/i386 = amd64
++LIBARCH64/x86 = amd64
+ LIBARCH64 = $(LIBARCH64/$(ARCH))
+ ifneq ($(LIBARCH64),)
+ LIBARCH = $(LIBARCH64)
+diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+index 75b7efe..62c692b 100644
+--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
++++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
+ else
+ disassembler_usage(stderr); /* better than nothing */
+ (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
+-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
+- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
++#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
++ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
+ (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
+ (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
+ #endif
+@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
+ static const char* native_arch_name() {
+ const char* res = HOTSPOT_LIB_ARCH;
+ #ifdef LIBARCH_amd64
+- res = "i386:x86-64";
++ res = "x86:x86-64";
+ #endif
+ #ifdef LIBARCH_sparc
+ res = "sparc:v8plusb";
+diff --git openjdk/hotspot/src/share/vm/adlc/Test/i486.ad openjdk/hotspot/src/share/vm/adlc/Test/i486.ad
+deleted file mode 100644
+index e69de29..0000000
+diff --git openjdk/hotspot/src/share/vm/adlc/Test/x86.ad openjdk/hotspot/src/share/vm/adlc/Test/x86.ad
+new file mode 100644
+index 0000000..e69de29
+diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
+index 2596d85..c2f3eb9 100644
+--- openjdk/hotspot/test/Makefile
++++ openjdk/hotspot/test/Makefile
+@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
+ PLATFORM = solaris
+ ARCH = $(shell uname -p)
+ ifeq ($(ARCH), i386)
+- ARCH=i586
++ ARCH=x86
+ endif
+ endif
+ ifeq ($(OSNAME), Linux)
+ PLATFORM = linux
+ ARCH = $(shell uname -m)
+- ifeq ($(ARCH), i386)
+- ARCH = i586
++ ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH = x86
+ endif
+ endif
+ ifeq ($(OSNAME), Windows_NT)
+@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
+ ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
+ ARCH = x64
+ else
+- ARCH = i586
++ ARCH = x86
+ endif
+ endif
+ endif
+--
+1.6.5
+
+diff --git openjdk/hotspot/make/linux/makefiles/i486.make b/hotspot/make/linux/makefiles/i486.make
+deleted file mode 100644
+index 9dd0b44..0000000
+--- openjdk/hotspot/make/linux/makefiles/i486.make
++++ /dev/null
+@@ -1,36 +0,0 @@
+-#
+-# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+-# CA 95054 USA or visit www.sun.com if you need additional information or
+-# have any questions.
+-#
+-#
+-
+-# TLS helper, assembled from .s file
+-# Not included in includeDB because it has no dependencies
+-Obj_Files += linux_x86_32.o
+-
+-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
+-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
+-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
+-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
+-# Must also specify if CPU is little endian
+-CFLAGS += -DVM_LITTLE_ENDIAN
+-
+-OPT_CFLAGS/compactingPermGenGen.o = -O1
+diff --git openjdk/hotspot/make/linux/makefiles/x86.make openjdk/hotspot/make/linux/makefiles/x86.make
+new file mode 100644
+index 0000000..9dd0b44
+--- /dev/null
++++ openjdk/hotspot/make/linux/makefiles/x86.make
+@@ -0,0 +1,36 @@
++#
++# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++# CA 95054 USA or visit www.sun.com if you need additional information or
++# have any questions.
++#
++#
++
++# TLS helper, assembled from .s file
++# Not included in includeDB because it has no dependencies
++Obj_Files += linux_x86_32.o
++
++# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
++OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
++# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
++OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
++# Must also specify if CPU is little endian
++CFLAGS += -DVM_LITTLE_ENDIAN
++
++OPT_CFLAGS/compactingPermGenGen.o = -O1
+
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-jdk-sane-x86-arch.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-jdk-sane-x86-arch.patch
new file mode 100644
index 0000000..af8b33e
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-jdk-sane-x86-arch.patch
@@ -0,0 +1,216 @@
+From 662e11a8b6017f39ceb6d00dcdbfe11473b56174 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:06:43 +0200
+Subject: [PATCH] sane-arch2
+
+---
+ openjdk/jdk/make/common/shared/Compiler-gcc.gmk | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: openjdk/jdk/make/common/shared/Compiler-gcc.gmk
+===================================================================
+--- openjdk/jdk/make/common/shared/Compiler-gcc.gmk.orig 2010-04-22 12:04:08.000000000 +0200
++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2010-04-22 12:13:53.335169757 +0200
+@@ -85,8 +85,8 @@
+ REQUIRED_CC_VER = 3.2
+ REQUIRED_GCC_VER = 3.2.*
+ endif
+- ifeq ($(ARCH), i586)
+- # i586
++ ifeq ($(ARCH), x86)
++ # x86
+ REQUIRED_CC_VER = 3.2
+ REQUIRED_GCC_VER = 3.2.1*
+ REQUIRED_GCC_VER_INT = 3.2.1-7a
+Index: openjdk/jdk/src/solaris/bin/i586/jvm.cfg
+===================================================================
+--- openjdk/jdk/src/solaris/bin/i586/jvm.cfg 2010-02-17 04:14:46.000000000 +0100
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-# Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation. Sun designates this
+-# particular file as subject to the "Classpath" exception as provided
+-# by Sun in the LICENSE file that accompanied this code.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+-# CA 95054 USA or visit www.sun.com if you need additional information or
+-# have any questions.
+-#
+-# List of JVMs that can be used as an option to java, javac, etc.
+-# Order is important -- first in this list is the default JVM.
+-# NOTE that this both this file and its format are UNSUPPORTED and
+-# WILL GO AWAY in a future release.
+-#
+-# You may also select a JVM in an arbitrary location with the
+-# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
+-# and may not be available in a future release.
+-#
+--client IF_SERVER_CLASS -server
+--server KNOWN
+--hotspot ALIASED_TO -client
+--classic WARN
+--native ERROR
+--green ERROR
+Index: openjdk/jdk/src/solaris/bin/x86/jvm.cfg
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ openjdk/jdk/src/solaris/bin/x86/jvm.cfg 2010-04-22 12:12:10.545603344 +0200
+@@ -0,0 +1,38 @@
++# Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation. Sun designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Sun in the LICENSE file that accompanied this code.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++# CA 95054 USA or visit www.sun.com if you need additional information or
++# have any questions.
++#
++# List of JVMs that can be used as an option to java, javac, etc.
++# Order is important -- first in this list is the default JVM.
++# NOTE that this both this file and its format are UNSUPPORTED and
++# WILL GO AWAY in a future release.
++#
++# You may also select a JVM in an arbitrary location with the
++# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
++# and may not be available in a future release.
++#
++-client IF_SERVER_CLASS -server
++-server KNOWN
++-hotspot ALIASED_TO -client
++-classic WARN
++-native ERROR
++-green ERROR
+Index: openjdk/jdk/make/common/shared/Platform.gmk
+===================================================================
+--- openjdk/jdk/make/common/shared/Platform.gmk.orig 2010-04-22 12:04:08.000000000 +0200
++++ openjdk/jdk/make/common/shared/Platform.gmk 2010-04-22 12:16:43.848486263 +0200
+@@ -56,8 +56,8 @@
+ # OS_VENDOR company name
+ # TEMP_DISK /tmp or C:/temp
+ # ARCH_DATA_MODEL 32 or 64
+-# ARCH sparc, sparcv9, i586, amd64, or ia64
+-# ARCH_FAMILY sparc or i586
++# ARCH sparc, sparcv9, x86, amd64, or ia64
++# ARCH_FAMILY sparc or x86
+ # ARCHPROP sparc or x86
+ # ARCH_VM_SUBDIR jre/bin, jre/lib/sparc, etc.
+ # LIBARCH sparc, sparcv9, i386, amd64, or ia64
+@@ -124,7 +124,7 @@
+ processor := $(shell uname -p)
+ archExpr = case "$(processor)" in \
+ i[3-9]86) \
+- echo i586 \
++ echo 586 \
+ ;; \
+ sparc*) \
+ echo sparc \
+@@ -200,7 +200,7 @@
+ endif
+ archExpr = case "$(mach)" in \
+ i[3-9]86) \
+- echo i586 \
++ echo x86 \
+ ;; \
+ ia64) \
+ echo ia64 \
+@@ -237,7 +237,7 @@
+ ARCH=sparcv9
+ endif
+ else
+- # i586 is 32-bit, amd64 is 64-bit
++ # x86 is 32-bit, amd64 is 64-bit
+ ifndef ARCH_DATA_MODEL
+ ifeq ($(ARCH), alpha)
+ ARCH_DATA_MODEL=64
+@@ -248,7 +248,7 @@
+ ifeq ($(ARCH), arm)
+ ARCH_DATA_MODEL=32
+ endif
+- ifeq ($(ARCH), i586)
++ ifeq ($(ARCH), x86)
+ ARCH_DATA_MODEL=32
+ endif
+ ifeq ($(ARCH), ia64)
+@@ -281,12 +281,7 @@
+ endif
+ endif
+
+- # Need to maintain the jre/lib/i386 location for 32-bit Intel
+- ifeq ($(ARCH), i586)
+- LIBARCH = i386
+- else
+- LIBARCH = $(ARCH)
+- endif
++ LIBARCH = $(ARCH)
+
+ # Value of Java os.arch property
+ ARCHPROP = $(LIBARCH)
+@@ -378,8 +373,8 @@
+ REQUIRED_WINDOWS_VERSION=2000 or Unknown
+ #REQUIRED_WINDOWS_VERSION=XP Professional
+ # LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
+- ARCH=i586
+- LIBARCH=i386
++ ARCH=x86
++ LIBARCH=x86
+ # Value of Java os.arch property
+ ARCHPROP=x86
+ endif
+Index: icedtea6-1.8.11/openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h
+===================================================================
+--- openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-11-12 18:26:21.867320576 +0100
++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2011-11-12 19:42:57.310058108 +0100
+@@ -36,7 +36,7 @@
+ #define X_ALPHA 1
+ #define X_AMD64 2
+ #define X_ARM 3
+-#define X_I586 4
++#define X_X86 4
+ #define X_IA64 5
+ #define X_M68K 6
+ #define X_MIPS 7
+Index: icedtea6-1.8.11/openjdk-ecj/jdk/make/javax/sound/SoundDefs.gmk
+===================================================================
+--- openjdk/jdk/make/javax/sound/SoundDefs.gmk 2011-11-12 18:26:21.870653670 +0100
++++ openjdk/jdk/make/javax/sound/SoundDefs.gmk 2011-11-12 20:00:37.693679490 +0100
+@@ -70,9 +70,9 @@
+ CPPFLAGS += -DX_ARCH=X_ARM
+ endif # ARCH arm
+
+- ifeq ($(ARCH), i586)
+- CPPFLAGS += -DX_ARCH=X_I586
+- endif # ARCH i586
++ ifeq ($(ARCH), x86)
++ CPPFLAGS += -DX_ARCH=X_X86
++ endif # ARCH x86
+
+ ifeq ($(ARCH), ia64)
+ CPPFLAGS += -DX_ARCH=X_IA64
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-sane-x86-arch-name.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-sane-x86-arch-name.patch
new file mode 100644
index 0000000..b4c6857
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-sane-x86-arch-name.patch
@@ -0,0 +1,38 @@
+Index: icedtea6-1.8/acinclude.m4
+===================================================================
+--- icedtea6-1.8.orig/acinclude.m4 2010-04-10 21:58:40.000000000 +0200
++++ icedtea6-1.8/acinclude.m4 2010-04-22 10:09:42.752587915 +0200
+@@ -9,11 +9,11 @@
+ ARCHFLAG="-m64"
+ ;;
+ i?86)
+- BUILD_ARCH_DIR=i586
+- INSTALL_ARCH_DIR=i386
+- JRE_ARCH_DIR=i386
++ BUILD_ARCH_DIR=x86
++ INSTALL_ARCH_DIR=x86
++ JRE_ARCH_DIR=x86
+ ARCH_PREFIX=${LINUX32}
+- CROSS_TARGET_ARCH=i386
++ CROSS_TARGET_ARCH=x86
+ ARCHFLAG="-m32"
+ ;;
+ alpha*)
+@@ -765,7 +765,7 @@
+ ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
+ dnl can't use AC_CHECK_SIZEOF on multilib
+ case "${ZERO_LIBARCH}" in
+- i386|ppc|s390|sparc)
++ x86|ppc|s390|sparc)
+ ZERO_BITSPERWORD=32
+ ;;
+ amd64|ppc64|s390x|sparc64)
+@@ -777,7 +777,7 @@
+ esac
+ AC_C_BIGENDIAN([ZERO_ENDIANNESS="big"], [ZERO_ENDIANNESS="little"])
+ case "${ZERO_LIBARCH}" in
+- i386)
++ x86)
+ ZERO_ARCHDEF="IA32"
+ ;;
+ ppc*)
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-unbreak-float.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-unbreak-float.patch
new file mode 100644
index 0000000..9f875de
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-unbreak-float.patch
@@ -0,0 +1,18 @@
+Index: openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h
+===================================================================
+--- openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:49:39.972718207 +0100
++++ openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:50:04.635639302 +0100
+@@ -27,13 +27,11 @@
+
+ #include "jfdlibm.h"
+
+-#ifdef __NEWVALID /* special setup for Sun test regime */
+ #if defined(i386) || defined(i486) || \
+ defined(intel) || defined(x86) || \
+ defined(i86pc) || defined(_M_IA64) || defined(ia64)
+ #define _LITTLE_ENDIAN
+ #endif
+-#endif
+
+ #ifdef _LITTLE_ENDIAN
+ #define __HI(x) *(1+(int*)&x)
diff --git a/recipes-core/icedtea/icedtea6-native-1.8/build-hacks-native.patch b/recipes-core/icedtea/icedtea6-native-1.8/build-hacks-native.patch
new file mode 100644
index 0000000..9432d03
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8/build-hacks-native.patch
@@ -0,0 +1,15 @@
+Index: icedtea6-1.6.1/Makefile.am
+===================================================================
+--- icedtea6-1.6.1.orig/Makefile.am 2009-12-24 11:38:06.582572265 +0100
++++ icedtea6-1.6.1/Makefile.am 2009-12-24 11:57:27.159578486 +0100
+@@ -265,6 +265,10 @@
+ FT2_LIB="$(FREETYPE2_LIBS)" \
+ ALT_PARALLEL_COMPILE_JOBS="$(PARALLEL_JOBS)" \
+ HOTSPOT_BUILD_JOBS="$(PARALLEL_JOBS)" \
++ OE_CFLAGS="$(OE_CFLAGS)" \
++ OE_CPPFLAGS="$(OE_CPPFLAGS)" \
++ OE_CXXFLAGS="$(OE_CXXFLAGS)" \
++ OE_LDFLAGS="$(OE_LDFLAGS)" \
+ JAVAC="" \
+ RHINO_JAR="$(RHINO_JAR)" \
+ JAR_KNOWS_ATFILE="$(JAR_KNOWS_ATFILE)" \
diff --git a/recipes-core/icedtea/icedtea6-native-1.8/disable-library-checks.patch b/recipes-core/icedtea/icedtea6-native-1.8/disable-library-checks.patch
new file mode 100644
index 0000000..23b8bed
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8/disable-library-checks.patch
@@ -0,0 +1,141 @@
+Index: icedtea6-1.7/configure.ac
+===================================================================
+--- icedtea6-1.7.orig/configure.ac 2010-01-26 04:52:18.000000000 +0100
++++ icedtea6-1.7/configure.ac 2010-02-08 12:05:51.354556052 +0100
+@@ -205,9 +205,9 @@
+ fi
+
+ dnl pkgconfig cannot be used to find these headers and libraries.
+-AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
+- ,[AC_MSG_ERROR("CUPS headers were not found -
+- try installing cups-devel.")])
++#AC_CHECK_HEADERS([cups/cups.h cups/ppd.h],[]
++# ,[AC_MSG_ERROR("CUPS headers were not found -
++# try installing cups-devel.")])
+ AC_CHECK_HEADERS([X11/X.h],[]
+ ,[AC_MSG_ERROR("xorg headers were not found -
+ try installing xorg-x11-proto-devel.")])
+@@ -239,12 +239,12 @@
+ AC_SUBST(XT_LIBS)
+
+ dnl Check for libXp headers and libraries.
+-PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no])
+-if test "x${XP_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xp - \
+- Try installing libXp-devel.])
+-fi
++#PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no])
++#if test "x${XP_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xp - \
++# Try installing libXp-devel.])
++#fi
+ AC_SUBST(XP_CFLAGS)
+ AC_SUBST(XP_LIBS)
+
+@@ -258,16 +258,16 @@
+ AC_SUBST(X11_CFLAGS)
+ AC_SUBST(X11_LIBS)
+
+-dnl Check for libXinerama headers and libraries.
+-PKG_CHECK_MODULES(XINERAMA, xinerama,[XINERAMA_FOUND=yes]
+- ,[XINERAMA_FOUND=no])
+-if test "x${XINERAMA_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xinerama - \
+- Try installing libXinerama-devel.])
+-fi
+-AC_SUBST(XINERAMA_CFLAGS)
+-AC_SUBST(XINERAMA_LIBS)
++#dnl Check for libXinerama headers and libraries.
++#PKG_CHECK_MODULES(XINERAMA, xinerama,[XINERAMA_FOUND=yes]
++# ,[XINERAMA_FOUND=no])
++#if test "x${XINERAMA_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xinerama - \
++# Try installing libXinerama-devel.])
++#fi
++#AC_SUBST(XINERAMA_CFLAGS)
++#AC_SUBST(XINERAMA_LIBS)
+
+ if test "x${ENABLE_XRENDER}" = "xyes"
+ then
+@@ -341,26 +341,26 @@
+ AC_CONFIG_FILES([tapset/jstack.stp])
+ fi
+
+-dnl Check for libpng headers and libraries.
+-PKG_CHECK_MODULES(LIBPNG, libpng,[LIBPNG_FOUND=yes]
+- ,[LIBPNG_FOUND=no])
+-if test "x${LIBPNG_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find libpng - \
+- Try installing libpng-devel.])
+-fi
+-AC_SUBST(LIBPNG_CFLAGS)
+-AC_SUBST(LIBPNG_LIBS)
+-
+-dnl Check for libXtst headers and libraries.
+-PKG_CHECK_MODULES(XTST, xtst,[XTST_FOUND=yes],[XTST_FOUND=no])
+-if test "x${XTST_FOUND}" = xno
+-then
+- AC_MSG_ERROR([Could not find Xtst - \
+- Try installing libXtst-devel.])
+-fi
+-AC_SUBST(XTST_CFLAGS)
+-AC_SUBST(XTST_LIBS)
++#dnl Check for libpng headers and libraries.
++#PKG_CHECK_MODULES(LIBPNG, libpng,[LIBPNG_FOUND=yes]
++# ,[LIBPNG_FOUND=no])
++#if test "x${LIBPNG_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find libpng - \
++# Try installing libpng-devel.])
++#fi
++#AC_SUBST(LIBPNG_CFLAGS)
++#AC_SUBST(LIBPNG_LIBS)
++
++#dnl Check for libXtst headers and libraries.
++#PKG_CHECK_MODULES(XTST, xtst,[XTST_FOUND=yes],[XTST_FOUND=no])
++#if test "x${XTST_FOUND}" = xno
++#then
++# AC_MSG_ERROR([Could not find Xtst - \
++# Try installing libXtst-devel.])
++#fi
++#AC_SUBST(XTST_CFLAGS)
++#AC_SUBST(XTST_LIBS)
+
+ dnl Check for freetype2 headers and libraries.
+ PKG_CHECK_MODULES(FREETYPE2, freetype2,[FREETYPE2_FOUND=yes]
+@@ -373,18 +373,18 @@
+ AC_SUBST(FREETYPE2_CFLAGS)
+ AC_SUBST(FREETYPE2_LIBS)
+
+-dnl Check for alsa headers and libraries (only required for Linux).
+-if test "x${BUILD_OS_DIR}" = "xlinux"
+-then
+- PKG_CHECK_MODULES(ALSA, alsa,[ALSA_FOUND=yes],[ALSA_FOUND=no])
+- if test "x${ALSA_FOUND}" = xno
+- then
+- AC_MSG_ERROR([Could not find alsa - \
+- Try installing alsa-lib-devel.])
+- fi
+-AC_SUBST(ALSA_CFLAGS)
+-AC_SUBST(ALSA_LIBS)
+-fi
++#dnl Check for alsa headers and libraries (only required for Linux).
++#if test "x${BUILD_OS_DIR}" = "xlinux"
++#then
++# PKG_CHECK_MODULES(ALSA, alsa,[ALSA_FOUND=yes],[ALSA_FOUND=no])
++# if test "x${ALSA_FOUND}" = xno
++# then
++# AC_MSG_ERROR([Could not find alsa - \
++# Try installing alsa-lib-devel.])
++# fi
++#AC_SUBST(ALSA_CFLAGS)
++#AC_SUBST(ALSA_LIBS)
++#fi
+
+ if test "x${enable_pulse_java}" = "xyes"
+ then
diff --git a/recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-disable-compilation.patch b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-disable-compilation.patch
new file mode 100644
index 0000000..cd0f68a
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-disable-compilation.patch
@@ -0,0 +1,513 @@
+Index: openjdk/jdk/make/sun/awt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/awt/Makefile 2009-04-24 09:33:55.000000000 +0200
++++ openjdk/jdk/make/sun/awt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -180,7 +180,8 @@
+ include $(BUILDDIR)/common/Mapfile-vers.gmk
+ include $(BUILDDIR)/common/Library.gmk
+
+-build: fontconfigs
++#build: fontconfigs
++build:
+
+
+ ifeq ($(PLATFORM), windows)
+@@ -535,9 +536,9 @@
+ -I$(PLATFORM_SRC)/native/$(PKGDIR) \
+ $(EVENT_MODEL)
+
+-ifeq ($(PLATFORM), linux)
+-LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
+-endif
++#ifeq ($(PLATFORM), linux)
++#LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
++#endif
+
+ LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
+ $(AWT_RUNPATH)
+Index: openjdk/jdk/make/javax/sound/jsoundalsa/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/javax/sound/jsoundalsa/Makefile 2009-09-29 13:48:34.534565581 +0200
++++ openjdk/jdk/make/javax/sound/jsoundalsa/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -44,34 +44,35 @@
+ # Files
+ #
+
+-FILES_c = \
+- Utilities.c \
+- $(DAUDIOFILES_c) \
+- $(MIDIFILES_c) \
+- $(PORTFILES_c)
++#FILES_c = \
++# Utilities.c \
++# $(DAUDIOFILES_c) \
++# $(MIDIFILES_c) \
++# $(PORTFILES_c)
+
+ # platform dependent files
+-FILES_c += \
+- PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_PCM.c \
+- PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
+- PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
+- PLATFORM_API_LinuxOS_ALSA_Ports.c
+-
+-FILES_export = \
+- $(DAUDIOFILES_export) \
+- $(MIDIFILES_export) \
+- $(PORTFILES_export)
++#FILES_c += \
++# PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_PCM.c \
++# PLATFORM_API_LinuxOS_ALSA_PCMUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiIn.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiOut.c \
++# PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
++# PLATFORM_API_LinuxOS_ALSA_Ports.c
++
++FILES_export =
++#FILES_export = \
++# $(DAUDIOFILES_export) \
++# $(MIDIFILES_export) \
++# $(PORTFILES_export)
+
+-OTHER_LDLIBS += -lasound
++#OTHER_LDLIBS += -lasound
+
+ CPPFLAGS += \
+- -DUSE_DAUDIO=TRUE \
+- -DUSE_PORTS=TRUE \
+- -DUSE_PLATFORM_MIDI_OUT=TRUE \
+- -DUSE_PLATFORM_MIDI_IN=TRUE \
++ -DUSE_DAUDIO=FALSE \
++ -DUSE_PORTS=FALSE \
++ -DUSE_PLATFORM_MIDI_OUT=FALSE \
++ -DUSE_PLATFORM_MIDI_IN=FALSE \
+ -I$(SHARE_SRC)/native/com/sun/media/sound
+
+ #
+Index: openjdk/jdk/make/sun/splashscreen/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/splashscreen/Makefile 2009-09-29 13:48:33.738565601 +0200
++++ openjdk/jdk/make/sun/splashscreen/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -32,7 +32,8 @@
+ #
+ # Files
+ #
+-include FILES_c.gmk
++#include FILES_c.gmk
++FILES_c =
+
+ FILES_java = \
+ java/awt/SplashScreen.java
+@@ -62,9 +63,9 @@
+ CFLAGS += -DSPLASHSCREEN -DPNG_NO_MMX_CODE
+
+ ifneq ($(PLATFORM), windows)
+- CFLAGS += -DWITH_X11
+- CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
+- OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpng -ljpeg -lgif -lz -lpthread
++# CFLAGS += -DWITH_X11
++# CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
++# OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpng -ljpeg -lgif -lz -lpthread
+ else # PLATFORM
+ CFLAGS += -DWITH_WIN32
+ OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib
+@@ -79,7 +80,7 @@
+ vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/image/jpeg
+ vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen
+
+-CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
++#CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/splashscreen -I$(SHARE_SRC)/native/$(PKGDIR)/splashscreen
+
+ ifeq ($(PLATFORM), linux)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+Index: openjdk/jdk/make/sun/xawt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/xawt/Makefile 2009-04-24 09:33:56.000000000 +0200
++++ openjdk/jdk/make/sun/xawt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -41,15 +41,16 @@
+ #
+ # Files
+ #
+-include FILES_c_unix.gmk
+-include FILES_export_unix.gmk
++#include FILES_c_unix.gmk
++FILES_c =
++#include FILES_export_unix.gmk
+ AUTO_FILES_JAVA_DIRS = sun/awt/X11
+ AUTO_JAVA_PRUNE = WrapperGenerator.java
+
+ LDFLAGS += -L$(OPENWIN_LIB)
+
+ ifeq ($(PLATFORM), linux)
+-LDFLAGS += -lpthread
++#LDFLAGS += -lpthread
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+
+@@ -86,16 +87,19 @@
+ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl
+ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11
+
+-OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -ldl \
+- $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
++#OTHER_LDLIBS = $(LIBM) -lawt -lXext -lX11 -ldl \
++# $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi
+
+ ifeq ($(PLATFORM), solaris)
+ CPPFLAGS += -DFUNCPROTO=15
+ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+ endif
+
+-CPPFLAGS += -I$(CUPS_HEADERS_PATH)
++#CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+
++# Normally we would like to patch these includes away but
++# we need them for the successfull compilation of the sizer
++# executables.
+ CPPFLAGS += -DXAWT -DXAWT_HACK \
+ -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
+ -I$(PLATFORM_SRC)/native/sun/awt \
+@@ -124,10 +128,10 @@
+
+ ifeq ($(PLATFORM), linux)
+ # Allows for builds on Debian GNU Linux, X11 is in a different place
+- CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
+- -I/usr/include/X11/extensions \
+- -I$(MOTIF_DIR)/include \
+- -I$(OPENWIN_HOME)/include
++# CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
++# -I/usr/include/X11/extensions \
++# -I$(MOTIF_DIR)/include \
++# -I$(OPENWIN_HOME)/include
+ endif
+
+ ifeq ($(PLATFORM), solaris)
+@@ -238,18 +242,20 @@
+ $(SIZER_DIR) $(XLIBTYPES) "sizer" $(subst .,,$(suffix $(basename $@)))
+
+ $(SIZES): $(SIZERS)
+- @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
+- $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
+- $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
+- $(CHMOD) +w $@;\
+- else \
+- $(ECHO) GENERATING $@; \
+- $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
+- fi
+- @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
+- $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+- $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+- fi
++ touch $(SIZES)
++#
++# @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \
++# $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \
++# $(CP) $(PREDEFINED_SIZES_TMPL) $@; \
++# $(CHMOD) +w $@;\
++# else \
++# $(ECHO) GENERATING $@; \
++# $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
++# fi
++# @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
++# $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
++# $(DIFF) $@ $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
++# fi
+
+ $(TEMPDIR)/.gen.wrappers: $(SIZES) $(WRAPPER_GENERATOR_CLASS) $(XLIBTYPES)
+ $(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \
+Index: openjdk/jdk/make/sun/jawt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/jawt/Makefile 2009-09-29 13:48:34.186565471 +0200
++++ openjdk/jdk/make/sun/jawt/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -36,7 +36,8 @@
+ ifeq ($(PLATFORM), windows)
+ FILES_cpp = jawt.cpp
+ else # PLATFORM
+-FILES_c = jawt.c
++FILES_c =
++#FILES_c = jawt.c
+ endif # PLATFORM
+
+ FILES_h = $(INCLUDEDIR)/jawt.h \
+Index: openjdk/jdk/make/sun/jpeg/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/jpeg/Makefile 2009-09-29 13:48:33.726565626 +0200
++++ openjdk/jdk/make/sun/jpeg/Makefile 2009-09-29 13:57:14.446815782 +0200
+@@ -37,7 +37,8 @@
+ #
+ # Files
+ #
+-include FILES_c.gmk
++FILES_c =
++#include FILES_c.gmk
+
+ AUTO_FILES_JAVA_DIRS = sun/awt/image com/sun/imageio/plugins/jpeg
+
+Index: openjdk/jdk/make/common/shared/Defs-java.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/shared/Defs-java.gmk 2009-09-29 13:48:55.954565215 +0200
++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2009-09-29 13:57:14.446815782 +0200
+@@ -36,14 +36,14 @@
+ # Memory related -J flags that all uses of java tools should use.
+ #
+ JAVA_MEM_FLAGS = -Xmx$(MAX_VM_MEMORY)m
+-ifneq (,$(filter $(ARCH), ia64 s390))
++#ifneq (,$(filter $(ARCH), ia64 s390))
+ # Special flags for javac on ia64 to work around a VM problem with
+ # bad code generation during inlining (what version had this problem?):
+ # Suspect this may not be needed anymore.
+- JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
+-else
+- JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
+-endif
++# JAVA_MEM_FLAGS += -Xms$(MAX_VM_MEMORY)m -XX:-Inline
++#else
++# JAVA_MEM_FLAGS += -Xms$(MIN_VM_MEMORY)m -XX:PermSize=32m -XX:MaxPermSize=160m
++#endif
+
+ #
+ # All java tools (javac, javah, and javadoc) run faster with certain java
+Index: openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-04-24 09:34:04.000000000 +0200
++++ openjdk/jdk/src/share/classes/java/awt/GraphicsEnvironment.java 2009-09-29 13:57:14.450815511 +0200
+@@ -113,7 +113,7 @@
+ * @since 1.4
+ */
+ public static boolean isHeadless() {
+- return getHeadlessProperty();
++ return true;
+ }
+
+ /**
+Index: openjdk/corba/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/corba/make/common/Defs.gmk 2009-04-24 09:30:19.000000000 +0200
++++ openjdk/corba/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
+@@ -444,11 +444,11 @@
+ # Tool flags
+ #
+ ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
+-CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
+-CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
+-CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
++CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(OE_CFLAGS)
++CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(OE_CXXFLAGS)
++CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) $(OE_CPPFLAGS) \
+ $(DEFINES) $(OPTIONS:%=-D%)
+-LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
++LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) $(OE_LDFLAGS)
+ LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
+ LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
+ $(OTHER_LINTFLAGS)
+Index: openjdk/jdk/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Defs.gmk 2009-09-29 13:48:33.590565061 +0200
++++ openjdk/jdk/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
+@@ -662,11 +662,11 @@
+ # Tool flags
+ #
+ ASFLAGS = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
+-CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS)
+-CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS)
+-CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
++CFLAGS = $(CFLAGS_$(VARIANT)/BYFILE) $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(OE_CFLAGS)
++CXXFLAGS = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(OE_CXXFLAGS)
++CPPFLAGS = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) $(OE_CPPFLAGS) \
+ $(DEFINES) $(OPTIONS:%=-D%)
+-LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
++LDFLAGS = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS) $(OE_LDFLAGS)
+ LDLIBS = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
+ LINTFLAGS = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
+ $(OTHER_LINTFLAGS)
+Index: openjdk/hotspot/make/linux/makefiles/vm.make
+===================================================================
+--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2009-09-29 13:48:34.098565716 +0200
++++ openjdk/hotspot/make/linux/makefiles/vm.make 2009-09-29 13:57:14.450815511 +0200
+@@ -170,6 +170,7 @@
+ LIBS_VM += $(LLVM_LIBS)
+ endif
+
++LFLAGS_VM = $(OE_LDFLAGS)
+ LINK_VM = $(LINK_LIB.c)
+
+ # rule for building precompiled header
+Index: openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c
+===================================================================
+--- openjdk.orig/jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-04-24 09:34:34.000000000 +0200
++++ openjdk/jdk/src/solaris/native/sun/awt/CUPSfuncs.c 2009-09-29 13:57:14.450815511 +0200
+@@ -26,8 +26,10 @@
+ #include <jni.h>
+ #include <jni_util.h>
+ #include <dlfcn.h>
++#if 0
+ #include <cups/cups.h>
+ #include <cups/ppd.h>
++#endif
+
+ //#define CUPS_DEBUG
+
+@@ -37,6 +39,7 @@
+ #define DPRINTF(x, y)
+ #endif
+
++#if 0
+ typedef const char* (*fn_cupsServer)(void);
+ typedef int (*fn_ippPort)(void);
+ typedef http_t* (*fn_httpConnect)(const char *, int);
+@@ -56,7 +59,7 @@
+ fn_ppdClose j2d_ppdClose;
+ fn_ppdFindOption j2d_ppdFindOption;
+ fn_ppdPageSize j2d_ppdPageSize;
+-
++#endif
+
+ /*
+ * Initialize library functions.
+@@ -65,6 +68,7 @@
+ JNIEXPORT jboolean JNICALL
+ Java_sun_print_CUPSPrinter_initIDs(JNIEnv *env,
+ jobject printObj) {
++#if 0
+ void *handle = dlopen("libcups.so.2", RTLD_LAZY | RTLD_GLOBAL);
+
+ if (handle == NULL) {
+@@ -131,6 +135,8 @@
+ }
+
+ return JNI_TRUE;
++#endif
++ return JNI_FALSE;
+ }
+
+ /*
+@@ -141,6 +147,7 @@
+ Java_sun_print_CUPSPrinter_getCupsServer(JNIEnv *env,
+ jobject printObj)
+ {
++#if 0
+ jstring cServer = NULL;
+ const char* server = j2d_cupsServer();
+ if (server != NULL) {
+@@ -152,6 +159,8 @@
+ }
+ }
+ return cServer;
++#endif
++ return NULL;
+ }
+
+ /*
+@@ -162,8 +171,11 @@
+ Java_sun_print_CUPSPrinter_getCupsPort(JNIEnv *env,
+ jobject printObj)
+ {
++#if 0
+ int port = j2d_ippPort();
+ return (jint) port;
++#endif
++ return 0;
+ }
+
+
+@@ -177,6 +189,7 @@
+ jstring server,
+ jint port)
+ {
++#if 0
+ const char *serverName;
+ serverName = (*env)->GetStringUTFChars(env, server, NULL);
+ if (serverName != NULL) {
+@@ -187,6 +200,7 @@
+ return JNI_TRUE;
+ }
+ }
++#endif
+ return JNI_FALSE;
+ }
+
+@@ -199,6 +213,7 @@
+ jobject printObj,
+ jstring printer)
+ {
++#if 0
+ ppd_file_t *ppd;
+ ppd_option_t *optionTray, *optionPage;
+ ppd_choice_t *choice;
+@@ -304,6 +319,8 @@
+ j2d_ppdClose(ppd);
+ unlink(filename);
+ return nameArray;
++#endif
++ return NULL;
+ }
+
+
+@@ -315,6 +332,7 @@
+ jobject printObj,
+ jstring printer)
+ {
++#if 0
+ ppd_file_t *ppd;
+ ppd_option_t *option;
+ ppd_choice_t *choice;
+@@ -374,4 +392,6 @@
+ j2d_ppdClose(ppd);
+ unlink(filename);
+ return sizeArray;
++#endif
++ return NULL;
+ }
+Index: openjdk/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-04-24 09:34:17.000000000 +0200
++++ openjdk/jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java 2009-09-29 13:57:14.454815276 +0200
+@@ -244,6 +244,8 @@
+ * that might be specified.
+ */
+ fontConfig = createFontConfiguration();
++ if (fontConfig == null)
++ return null;
+ getPlatformFontPathFromFontConfig();
+
+ String extraFontPath = fontConfig.getExtraFontPath();
+Index: openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java
+===================================================================
+--- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-04-24 09:34:33.000000000 +0200
++++ openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2009-09-29 13:57:14.454815276 +0200
+@@ -899,7 +899,8 @@
+
+ // Implements SunGraphicsEnvironment.createFontConfiguration.
+ protected FontConfiguration createFontConfiguration() {
+- return new MFontConfiguration(this);
++// return new MFontConfiguration(this);
++ return null;
+ }
+ public FontConfiguration
+ createFontConfiguration(boolean preferLocaleFonts,
+Index: openjdk/jdk/make/launchers/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/launchers/Makefile 2009-09-29 13:48:33.490815135 +0200
++++ openjdk/jdk/make/launchers/Makefile 2009-09-29 13:57:14.454815276 +0200
+@@ -57,7 +57,7 @@
+ endif
+ # Run MAKE $@ for all generic launchers
+ define make-all-launchers
+-$(call make-launcher, appletviewer, sun.applet.Main, , )
++#$(call make-launcher, appletviewer, sun.applet.Main, , )
+ $(call make-launcher, apt, com.sun.tools.apt.Main, , )
+ $(call make-launcher, extcheck, com.sun.tools.extcheck.Main, , )
+ $(call make-launcher, idlj, com.sun.tools.corba.se.idl.toJavaPortable.Compile, , )
+@@ -93,7 +93,7 @@
+ -J-Dcom.sun.CORBA.activation.Port=1049 \
+ -J-Dcom.sun.CORBA.POA.ORBServerId=1, )
+ $(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
+-$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
++#$(call make-launcher, policytool, sun.security.tools.PolicyTool, , )
+ $(call make-launcher, rmic, sun.rmi.rmic.Main, , )
+ $(call make-launcher, rmid, sun.rmi.server.Activation, , )
+ $(call make-launcher, rmiregistry, sun.rmi.registry.RegistryImpl, , )
diff --git a/recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-fix-freetype.patch b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-fix-freetype.patch
new file mode 100644
index 0000000..3420fbd
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-fix-freetype.patch
@@ -0,0 +1,13 @@
+Index: openjdk/jdk/make/tools/freetypecheck/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/tools/freetypecheck/Makefile 2009-09-29 13:48:33.590565061 +0200
++++ openjdk/jdk/make/tools/freetypecheck/Makefile 2009-09-29 14:00:04.470566156 +0200
+@@ -45,7 +45,7 @@
+ FT_OPTIONS = $(CFLAGS)
+ endif
+
+-FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2
++FT_OPTIONS += -I$(FT_HEADERS) -I$(FT_HEADERS)/freetype2 $(FREETYPE2_CFLAGS) $(FREETYPE2_LIBS) $(FREETYPE2_HEADERS)
+ FT_OPTIONS += $(XARCH)
+
+ #add runtime library search path
diff --git a/recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-fix-zlib.patch b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-fix-zlib.patch
new file mode 100644
index 0000000..eff7e48
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-ecj-fix-zlib.patch
@@ -0,0 +1,61 @@
+Index: openjdk/jdk/make/com/sun/java/pack/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2009-09-29 13:48:34.538565136 +0200
++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2009-09-29 14:00:26.226565853 +0200
+@@ -80,7 +80,7 @@
+ OTHER_LDLIBS += $(JVMLIB)
+ endif
+
+-OTHER_LDLIBS += -lz
++OTHER_LDLIBS += -L$(libdir) -lz
+ CXXFLAGS_DBG += -DFULL
+ CXXFLAGS_OPT += -DPRODUCT
+ CXXFLAGS_COMMON += -DFULL
+Index: openjdk/jdk/make/common/Defs.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Defs.gmk 2009-09-29 13:57:14.450815511 +0200
++++ openjdk/jdk/make/common/Defs.gmk 2009-09-29 14:00:26.226565853 +0200
+@@ -289,7 +289,7 @@
+
+ endif # PROGRAM
+
+-LDLIBS_COMMON += $(EXTRA_LIBS)
++LDLIBS_COMMON += $(EXTRA_LIBS) -L$(libdir)
+
+ #
+ # Default is to build, not import native binaries
+@@ -425,7 +425,7 @@
+ CLASSDESTDIR = $(CLASSBINDIR)
+ endif
+
+-INCLUDES = -I. -I$(CLASSHDRDIR) \
++INCLUDES = -I$(includedir) -I. -I$(CLASSHDRDIR) \
+ $(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES)
+ OTHER_CPPFLAGS = $(INCLUDES)
+
+Index: openjdk/jdk/make/common/Program.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Program.gmk 2009-09-29 13:48:33.914565255 +0200
++++ openjdk/jdk/make/common/Program.gmk 2009-09-29 14:00:26.226565853 +0200
+@@ -73,7 +73,7 @@
+ # itself, as with all the Windows libraries.
+ #
+ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
+- LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
++ LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli -L $(libdir)
+ OTHER_LDLIBS += -ljli
+ ifeq ($(PLATFORM), solaris)
+ ifeq ($(ARCH_DATA_MODEL), 32)
+Index: openjdk/jdk/make/java/jli/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/java/jli/Makefile 2009-09-29 13:48:33.806565054 +0200
++++ openjdk/jdk/make/java/jli/Makefile 2009-09-29 14:00:26.230565844 +0200
+@@ -61,7 +61,7 @@
+ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
+ LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
+ # Guarantee very limited dependencies
+- LDLIBS = -lz -lc
++ LDLIBS = -L$(libdir) -lz -lc
+ endif
+
+ ifeq ($(PLATFORM), windows)
diff --git a/recipes-core/icedtea/icedtea6-native-1.8/icedtea-hotspot-make-arch-sane-for-x86.patch b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-hotspot-make-arch-sane-for-x86.patch
new file mode 100644
index 0000000..9d7b9bb
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-hotspot-make-arch-sane-for-x86.patch
@@ -0,0 +1,1130 @@
+From b8a51665ada45e3beb0823c03c025d5514f5e745 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Thu, 22 Oct 2009 16:35:25 +0200
+Subject: [PATCH] hotspot: make arch sane for x86
+
+diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
+index 38e0f78..64c8410 100644
+--- openjdk/hotspot/agent/make/saenv.sh
++++ openjdk/hotspot/agent/make/saenv.sh
+@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+ CPU=amd64
+ else
+- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
++ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+- CPU=i386
++ CPU=x86
+ fi
+ else
+ SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
+diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+index 83ddd1a..c20c7eb 100644
+--- openjdk/hotspot/make/defs.make
++++ openjdk/hotspot/make/defs.make
+@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
+ ifdef LP64
+ BUILDARCH = amd64
+ else
+- BUILDARCH = i486
++ BUILDARCH = x86
+ endif
+ endif
+ ifeq ($(BUILDARCH), sparc)
+@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
+
+ # LIBARCH is 1:1 mapping from BUILDARCH
+ LIBARCH = $(LIBARCH/$(BUILDARCH))
+- LIBARCH/i486 = i386
++ LIBARCH/x86 = x86
+ LIBARCH/amd64 = amd64
+ LIBARCH/sparc = sparc
+ LIBARCH/sparcv9 = sparcv9
+diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
+index bc82543..4a1ef4e 100644
+--- openjdk/hotspot/make/jprt.config
++++ openjdk/hotspot/make/jprt.config
+@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
+ # LINUX: X86, AMD64
+ osarch=`uname -m`
+ if [ "${osarch}" = i686 ] ; then
+- linux_arch=i586
++ linux_arch=x86
+ elif [ "${osarch}" = x86_64 ] ; then
+ linux_arch=amd64
+ fi
+diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
+index eb2ce82..7193de0 100644
+--- openjdk/hotspot/make/jprt.properties
++++ openjdk/hotspot/make/jprt.properties
+@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
+ jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
+ jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
+
+-jprt.my.linux.i586=linux_i586
++jprt.my.linux.x86=linux_x86
+ jprt.my.linux.x64=linux_x64
+ jprt.my.windows.i586=windows_i586
+ jprt.my.windows.x64=windows_x64
+@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
+
+-jprt.my.linux.i586.test.targets = \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
+- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
++jprt.my.linux.x86.test.targets = \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
++ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
+
+ jprt.my.linux.x64.test.targets = \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
+@@ -294,7 +294,7 @@ jprt.test.targets = \
+ ${jprt.my.solaris.sparcv9.test.targets}, \
+ ${jprt.my.solaris.i586.test.targets}, \
+ ${jprt.my.solaris.x64.test.targets}, \
+- ${jprt.my.linux.i586.test.targets}, \
++ ${jprt.my.linux.x86.test.targets}, \
+ ${jprt.my.linux.x64.test.targets}, \
+ ${jprt.my.windows.i586.test.targets}, \
+ ${jprt.my.windows.x64.test.targets}
+diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
+index e317fdd..5d3b1ff 100644
+--- openjdk/hotspot/make/linux/build.sh
++++ openjdk/hotspot/make/linux/build.sh
+@@ -43,7 +43,7 @@ esac
+
+ case `uname -m` in
+ i386|i486|i586|i686)
+- mach=i386
++ mach=x86
+ ;;
+ *)
+ echo "Unsupported machine: " `uname -m`
+diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+index add9823..cbbf81f 100644
+--- openjdk/hotspot/make/linux/makefiles/buildtree.make
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make
+@@ -30,7 +30,7 @@
+ # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
+ # environment or on the command-line:
+ #
+-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
++# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
+ # BUILDARCH - build directory
+ # LIBARCH - the corresponding directory in JDK/JRE
+ # GAMMADIR - top of workspace
+@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
+ DATA_MODE = $(DATA_MODE/$(BUILDARCH))
+ JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
+
+-DATA_MODE/i486 = 32
++DATA_MODE/x86 = 32
+ DATA_MODE/sparc = 32
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64 = 64
+diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
+index 113d4f8..d3f06cb 100644
+--- openjdk/hotspot/make/linux/makefiles/cscope.make
++++ openjdk/hotspot/make/linux/makefiles/cscope.make
+@@ -78,7 +78,7 @@ endif
+ # Processor-specific files for other processors are excluded by default. Use
+ # CS_CPU=x to include platform-specific files for other platforms.
+ ifndef CS_CPU
+-CS_CPU = i486 sparc amd64 ia64
++CS_CPU = x86 sparc amd64 ia64
+ CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
+ endif
+
+diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
+index 9131c79..138dfb3 100644
+--- openjdk/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
+ HS_ARCH = sparc
+ endif
+
++# x86
++ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH_DATA_MODEL = 32
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
++ HS_ARCH = x86
++endif
++
+ # x86_64
+ ifeq ($(ARCH), x86_64)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
+ HS_ARCH = x86
+ else
+ ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
+ HS_ARCH = x86
+- # We have to reset ARCH to i686 since SRCARCH relies on it
+- ARCH = i686
+ endif
+ endif
+
+-# i686
+-ifeq ($(ARCH), i686)
+- ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
+- HS_ARCH = x86
+-endif
+-
+ JDK_INCLUDE_SUBDIR=linux
+
+ # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
+diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+index 0a9f75b..2e29bb9 100644
+--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
++++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+@@ -30,7 +30,7 @@ CC = cc
+ AS = $(CC) -c
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+
+ CFLAGS += $(ARCHFLAG)
+diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
+deleted file mode 100644
+index 610ac91..0000000
+--- openjdk/hotspot/make/linux/platform_i486
++++ /dev/null
+@@ -1,15 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = gcc
+-
+-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
+index 325a3fe..717fc75 100644
+--- openjdk/hotspot/make/linux/platform_i486.suncc
++++ openjdk/hotspot/make/linux/platform_i486.suncc
+@@ -8,10 +8,10 @@ os_arch = linux_x86
+
+ os_arch_model = linux_x86_32
+
+-lib_arch = i386
++lib_arch = x86
+
+ compiler = sparcWorks
+
+-gnu_dis_arch = i386
++gnu_dis_arch = x86
+
+ sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
+new file mode 100644
+index 0000000..5c613fe
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86
+@@ -0,0 +1,15 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = gcc
++
++sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+index b2b3162..a4bbe70 100644
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
+ // i386: 224, ia64: 1105, amd64: 186, sparc 143
+ #ifdef __ia64__
+ #define SYS_gettid 1105
+-#elif __i386__
++#elif __x86__
+ #define SYS_gettid 224
+ #elif __amd64__
+ #define SYS_gettid 186
+@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
+ #elif defined(IA64)
+ static char cpu_arch[] = "ia64";
+ #elif defined(IA32)
+-static char cpu_arch[] = "i386";
++static char cpu_arch[] = "x86";
+ #elif defined(AMD64)
+ static char cpu_arch[] = "amd64";
+ #elif defined(SPARC)
+diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
+index 6bdf4b8..fd43c6e 100644
+--- openjdk/hotspot/src/share/tools/hsdis/Makefile
++++ openjdk/hotspot/src/share/tools/hsdis/Makefile
+@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
+ endif
+
+ # Default arch; it is changed below as needed.
+-ARCH = i386
++ARCH = x86
+ OS = $(shell uname)
+
+ CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
+@@ -87,7 +87,7 @@ endif # SunOS
+ LIBARCH = $(ARCH)
+ ifdef LP64
+ LIBARCH64/sparc = sparcv9
+-LIBARCH64/i386 = amd64
++LIBARCH64/x86 = amd64
+ LIBARCH64 = $(LIBARCH64/$(ARCH))
+ ifneq ($(LIBARCH64),)
+ LIBARCH = $(LIBARCH64)
+diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+index 75b7efe..62c692b 100644
+--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
++++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
+ else
+ disassembler_usage(stderr); /* better than nothing */
+ (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
+-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
+- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
++#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
++ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
+ (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
+ (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
+ #endif
+@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
+ static const char* native_arch_name() {
+ const char* res = HOTSPOT_LIB_ARCH;
+ #ifdef LIBARCH_amd64
+- res = "i386:x86-64";
++ res = "x86:x86-64";
+ #endif
+ #ifdef LIBARCH_sparc
+ res = "sparc:v8plusb";
+diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
+index 2596d85..c2f3eb9 100644
+--- openjdk/hotspot/test/Makefile
++++ openjdk/hotspot/test/Makefile
+@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
+ PLATFORM = solaris
+ ARCH = $(shell uname -p)
+ ifeq ($(ARCH), i386)
+- ARCH=i586
++ ARCH=x86
+ endif
+ endif
+ ifeq ($(OSNAME), Linux)
+ PLATFORM = linux
+ ARCH = $(shell uname -m)
+- ifeq ($(ARCH), i386)
+- ARCH = i586
++ ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH = x86
+ endif
+ endif
+ ifeq ($(OSNAME), Windows_NT)
+@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
+ ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
+ ARCH = x64
+ else
+- ARCH = i586
++ ARCH = x86
+ endif
+ endif
+ endif
+diff --git openjdk/hotspot/agent/make/saenv.sh openjdk/hotspot/agent/make/saenv.sh
+index 38e0f78..64c8410 100644
+--- openjdk/hotspot/agent/make/saenv.sh
++++ openjdk/hotspot/agent/make/saenv.sh
+@@ -43,9 +43,9 @@ if [ "$OS" = "Linux" ]; then
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+ CPU=amd64
+ else
+- SA_LIBPATH=$STARTDIR/../src/os/linux/i386:$STARTDIR/linux/i386
++ SA_LIBPATH=$STARTDIR/../src/os/linux/x86:$STARTDIR/linux/x86
+ OPTIONS="-Dsa.library.path=$SA_LIBPATH"
+- CPU=i386
++ CPU=x86
+ fi
+ else
+ SA_LIBPATH=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/solaris/`uname -p`
+diff --git openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+index c4ca7de..54c12ca 100644
+--- openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
++++ openjdk/hotspot/agent/src/os/linux/LinuxDebuggerLocal.c
+@@ -29,7 +29,7 @@
+ #define amd64 1
+ #endif
+
+-#ifdef i386
++#ifdef x86
+ #include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
+ #endif
+
+@@ -295,7 +295,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+ }
+
+ #undef NPRGREG
+-#ifdef i386
++#ifdef x86
+ #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
+ #endif
+ #ifdef ia64
+@@ -314,7 +314,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+
+ #undef REG_INDEX
+
+-#ifdef i386
++#ifdef x86
+ #define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
+
+ regs[REG_INDEX(GS)] = (uintptr_t) gregs.xgs;
+@@ -333,7 +333,7 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo
+ regs[REG_INDEX(CS)] = (uintptr_t) gregs.xcs;
+ regs[REG_INDEX(SS)] = (uintptr_t) gregs.xss;
+
+-#endif /* i386 */
++#endif /* x86 */
+
+ #if ia64
+ regs = (*env)->GetLongArrayElements(env, array, &isCopy);
+diff --git openjdk/hotspot/agent/src/os/linux/Makefile openjdk/hotspot/agent/src/os/linux/Makefile
+index a16f3a7..85fecb1 100644
+--- openjdk/hotspot/agent/src/os/linux/Makefile
++++ openjdk/hotspot/agent/src/os/linux/Makefile
+@@ -22,7 +22,7 @@
+ #
+ #
+
+-ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )
++ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo x86 ; fi )
+ GCC = gcc$(GCC_SUFFIX)
+
+ JAVAH = ${JAVA_HOME}/bin/javah
+diff --git openjdk/hotspot/agent/src/os/linux/ps_core.c openjdk/hotspot/agent/src/os/linux/ps_core.c
+index 3562f2d..47ab01b 100644
+--- openjdk/hotspot/agent/src/os/linux/ps_core.c
++++ openjdk/hotspot/agent/src/os/linux/ps_core.c
+@@ -540,7 +540,7 @@ static bool core_handle_prstatus(struct ps_prochandle* ph, const char* buf, size
+
+ if (is_debug()) {
+ print_debug("integer regset\n");
+-#ifdef i386
++#ifdef x86
+ // print the regset
+ print_debug("\teax = 0x%x\n", newthr->regs.eax);
+ print_debug("\tebx = 0x%x\n", newthr->regs.ebx);
+diff --git openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+index 83ddd1a..c20c7eb 100644
+--- openjdk/hotspot/make/defs.make
++++ openjdk/hotspot/make/defs.make
+@@ -207,7 +207,7 @@ ifneq ($(OSNAME),windows)
+ ifdef LP64
+ BUILDARCH = amd64
+ else
+- BUILDARCH = i486
++ BUILDARCH = x86
+ endif
+ endif
+ ifeq ($(BUILDARCH), sparc)
+@@ -218,7 +218,7 @@ ifneq ($(OSNAME),windows)
+
+ # LIBARCH is 1:1 mapping from BUILDARCH
+ LIBARCH = $(LIBARCH/$(BUILDARCH))
+- LIBARCH/i486 = i386
++ LIBARCH/x86 = x86
+ LIBARCH/amd64 = amd64
+ LIBARCH/sparc = sparc
+ LIBARCH/sparcv9 = sparcv9
+diff --git openjdk/hotspot/make/jprt.config openjdk/hotspot/make/jprt.config
+index bc82543..4a1ef4e 100644
+--- openjdk/hotspot/make/jprt.config
++++ openjdk/hotspot/make/jprt.config
+@@ -111,7 +111,7 @@ elif [ "${osname}" = Linux ] ; then
+ # LINUX: X86, AMD64
+ osarch=`uname -m`
+ if [ "${osarch}" = i686 ] ; then
+- linux_arch=i586
++ linux_arch=x86
+ elif [ "${osarch}" = x86_64 ] ; then
+ linux_arch=amd64
+ fi
+diff --git openjdk/hotspot/make/jprt.properties openjdk/hotspot/make/jprt.properties
+index eb2ce82..7193de0 100644
+--- openjdk/hotspot/make/jprt.properties
++++ openjdk/hotspot/make/jprt.properties
+@@ -70,7 +70,7 @@ jprt.my.solaris.x64.jdk6u10=solaris_x64_5.10
+ jprt.my.solaris.x64.jdk6u14=solaris_x64_5.10
+ jprt.my.solaris.x64=${jprt.my.solaris.x64.${jprt.tools.default.release}}
+
+-jprt.my.linux.i586=linux_i586
++jprt.my.linux.x86=linux_x86
+ jprt.my.linux.x64=linux_x64
+ jprt.my.windows.i586=windows_i586
+ jprt.my.windows.x64=windows_x64
+@@ -201,30 +201,30 @@ jprt.my.solaris.i586.test.targets= \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_2, \
+ ${jprt.my.solaris.i586}-{product|fastdebug}-{c1|c2}-scimark_3
+
+-jprt.my.linux.i586.test.targets = \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-jvm98, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-scimark, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-product-c1-runThese_Xcomp_3, \
+- ${jprt.my.linux.i586}-fastdebug-c1-runThese_Xshare, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp, \
+- ${jprt.my.linux.i586}-fastdebug-c2-runThese_Xcomp_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_default, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_SerialGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParallelGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_ParNewGC, \
+- ${jprt.my.linux.i586}-product-{c1|c2}-GCOld_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_default, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_ParallelGC, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c1-jbb_CMS, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_2, \
+- ${jprt.my.linux.i586}-{product|fastdebug}-c2-scimark_3
++jprt.my.linux.x86.test.targets = \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-jvm98, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-scimark, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-product-c1-runThese_Xcomp_3, \
++ ${jprt.my.linux.x86}-fastdebug-c1-runThese_Xshare, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp, \
++ ${jprt.my.linux.x86}-fastdebug-c2-runThese_Xcomp_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_SerialGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_ParNewGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-{c1|c2}-GCBasher_CMS, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_default, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_SerialGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParallelGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_ParNewGC, \
++ ${jprt.my.linux.x86}-product-{c1|c2}-GCOld_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_default, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_ParallelGC, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c1-jbb_CMS, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_2, \
++ ${jprt.my.linux.x86}-{product|fastdebug}-c2-scimark_3
+
+ jprt.my.linux.x64.test.targets = \
+ ${jprt.my.linux.x64}-{product|fastdebug}-c2-jvm98, \
+@@ -294,7 +294,7 @@ jprt.test.targets = \
+ ${jprt.my.solaris.sparcv9.test.targets}, \
+ ${jprt.my.solaris.i586.test.targets}, \
+ ${jprt.my.solaris.x64.test.targets}, \
+- ${jprt.my.linux.i586.test.targets}, \
++ ${jprt.my.linux.x86.test.targets}, \
+ ${jprt.my.linux.x64.test.targets}, \
+ ${jprt.my.windows.i586.test.targets}, \
+ ${jprt.my.windows.x64.test.targets}
+diff --git openjdk/hotspot/make/linux/build.sh openjdk/hotspot/make/linux/build.sh
+index e317fdd..5d3b1ff 100644
+--- openjdk/hotspot/make/linux/build.sh
++++ openjdk/hotspot/make/linux/build.sh
+@@ -43,7 +43,7 @@ esac
+
+ case `uname -m` in
+ i386|i486|i586|i686)
+- mach=i386
++ mach=x86
+ ;;
+ *)
+ echo "Unsupported machine: " `uname -m`
+diff --git openjdk/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make
+index add9823..cbbf81f 100644
+--- openjdk/hotspot/make/linux/makefiles/buildtree.make
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make
+@@ -30,7 +30,7 @@
+ # The macros ARCH, GAMMADIR, OS_FAMILY and VARIANT must be defined in the
+ # environment or on the command-line:
+ #
+-# ARCH - sparc, i486, ... HotSpot cpu and os_cpu source directory
++# ARCH - sparc, x86, ... HotSpot cpu and os_cpu source directory
+ # BUILDARCH - build directory
+ # LIBARCH - the corresponding directory in JDK/JRE
+ # GAMMADIR - top of workspace
+@@ -316,7 +316,7 @@ NO_JAVA_HOME_MSG = \
+ DATA_MODE = $(DATA_MODE/$(BUILDARCH))
+ JAVA_FLAG = $(JAVA_FLAG/$(DATA_MODE))
+
+-DATA_MODE/i486 = 32
++DATA_MODE/x86 = 32
+ DATA_MODE/sparc = 32
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64 = 64
+diff --git openjdk/hotspot/make/linux/makefiles/cscope.make openjdk/hotspot/make/linux/makefiles/cscope.make
+index 113d4f8..d3f06cb 100644
+--- openjdk/hotspot/make/linux/makefiles/cscope.make
++++ openjdk/hotspot/make/linux/makefiles/cscope.make
+@@ -78,7 +78,7 @@ endif
+ # Processor-specific files for other processors are excluded by default. Use
+ # CS_CPU=x to include platform-specific files for other platforms.
+ ifndef CS_CPU
+-CS_CPU = i486 sparc amd64 ia64
++CS_CPU = x86 sparc amd64 ia64
+ CS_PRUNE_CPU = $(patsubst %,-o -name '*%*',$(filter-out ${SRCARCH},${CS_CPU}))
+ endif
+
+diff --git openjdk/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make
+index 9131c79..138dfb3 100644
+--- openjdk/hotspot/make/linux/makefiles/defs.make
++++ openjdk/hotspot/make/linux/makefiles/defs.make
+@@ -85,6 +85,14 @@ ifeq ($(ARCH), sparc)
+ HS_ARCH = sparc
+ endif
+
++# x86
++ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH_DATA_MODEL = 32
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
++ HS_ARCH = x86
++endif
++
+ # x86_64
+ ifeq ($(ARCH), x86_64)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+@@ -95,22 +103,12 @@ ifeq ($(ARCH), x86_64)
+ HS_ARCH = x86
+ else
+ ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
++ PLATFORM = linux-x86
++ VM_PLATFORM = linux_x86
+ HS_ARCH = x86
+- # We have to reset ARCH to i686 since SRCARCH relies on it
+- ARCH = i686
+ endif
+ endif
+
+-# i686
+-ifeq ($(ARCH), i686)
+- ARCH_DATA_MODEL = 32
+- PLATFORM = linux-i586
+- VM_PLATFORM = linux_i486
+- HS_ARCH = x86
+-endif
+-
+ JDK_INCLUDE_SUBDIR=linux
+
+ # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
+diff --git openjdk/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
+index a2c24bc..27bad01 100644
+--- openjdk/hotspot/make/linux/makefiles/gcc.make
++++ openjdk/hotspot/make/linux/makefiles/gcc.make
+@@ -77,7 +77,7 @@ CFLAGS += -fcheck-new
+ CFLAGS += -g
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32 -march=i586
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+ ARCHFLAG/ia64 =
+ ARCHFLAG/sparc = -m32 -mcpu=v9
+diff --git openjdk/hotspot/make/linux/makefiles/sparcWorks.make openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+index 0a9f75b..2e29bb9 100644
+--- openjdk/hotspot/make/linux/makefiles/sparcWorks.make
++++ openjdk/hotspot/make/linux/makefiles/sparcWorks.make
+@@ -30,7 +30,7 @@ CC = cc
+ AS = $(CC) -c
+
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+-ARCHFLAG/i486 = -m32
++ARCHFLAG/x86 = -m32
+ ARCHFLAG/amd64 = -m64
+
+ CFLAGS += $(ARCHFLAG)
+diff --git openjdk/hotspot/make/linux/platform_i486 openjdk/hotspot/make/linux/platform_i486
+deleted file mode 100644
+index 610ac91..0000000
+--- openjdk/hotspot/make/linux/platform_i486
++++ /dev/null
+@@ -1,15 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = gcc
+-
+-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_i486.suncc openjdk/hotspot/make/linux/platform_i486.suncc
+deleted file mode 100644
+index 325a3fe..0000000
+--- openjdk/hotspot/make/linux/platform_i486.suncc
++++ /dev/null
+@@ -1,17 +0,0 @@
+-os_family = linux
+-
+-arch = x86
+-
+-arch_model = x86_32
+-
+-os_arch = linux_x86
+-
+-os_arch_model = linux_x86_32
+-
+-lib_arch = i386
+-
+-compiler = sparcWorks
+-
+-gnu_dis_arch = i386
+-
+-sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86 openjdk/hotspot/make/linux/platform_x86
+new file mode 100644
+index 0000000..5c613fe
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86
+@@ -0,0 +1,15 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = gcc
++
++sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/make/linux/platform_x86.suncc openjdk/hotspot/make/linux/platform_x86.suncc
+new file mode 100644
+index 0000000..717fc75
+--- /dev/null
++++ openjdk/hotspot/make/linux/platform_x86.suncc
+@@ -0,0 +1,17 @@
++os_family = linux
++
++arch = x86
++
++arch_model = x86_32
++
++os_arch = linux_x86
++
++os_arch_model = linux_x86_32
++
++lib_arch = x86
++
++compiler = sparcWorks
++
++gnu_dis_arch = x86
++
++sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+diff --git openjdk/hotspot/src/os/linux/launcher/java_md.c openjdk/hotspot/src/os/linux/launcher/java_md.c
+index 50a86cd..48141be 100644
+--- openjdk/hotspot/src/os/linux/launcher/java_md.c
++++ openjdk/hotspot/src/os/linux/launcher/java_md.c
+@@ -56,8 +56,8 @@
+ * models is supported, then DUAL_MODE is defined. When DUAL_MODE is
+ * defined, the architecture names for the narrow and wide version of
+ * the architecture are defined in BIG_ARCH and SMALL_ARCH. Currently
+- * only Solaris on sparc/sparcv9 and i586/amd64 is DUAL_MODE; linux
+- * i586/amd64 could be defined as DUAL_MODE but that is not the
++ * only Solaris on sparc/sparcv9 and x86/amd64 is DUAL_MODE; linux
++ * x86/amd64 could be defined as DUAL_MODE but that is not the
+ * current policy.
+ */
+
+@@ -75,8 +75,8 @@
+
+ #else /* 32-bit data model */
+
+-# ifdef i586
+-# define ARCH "i386"
++# ifdef x86
++# define ARCH "x86"
+ # elif defined(__sparc)
+ # define ARCH "sparc"
+ # endif
+@@ -90,7 +90,7 @@
+ # define SMALL_ARCH "sparc"
+ # else
+ # define BIG_ARCH "amd64"
+-# define SMALL_ARCH "i386"
++# define SMALL_ARCH "x86"
+ # endif
+ # include <sys/systeminfo.h>
+ # include <sys/elf.h>
+@@ -1103,7 +1103,7 @@ void PrintMachineDependentOptions() {
+ * This code is somewhat more confused with #ifdef's than we'd
+ * like because this file is used by both Solaris and Linux
+ * platforms, and so needs to be parameterized for SPARC and
+- * i586 hardware. The other Linux platforms (amd64 and ia64)
++ * x86 hardware. The other Linux platforms (amd64 and ia64)
+ * don't even ask this question, because they only come with
+ * server JVMs. */
+
+@@ -1168,11 +1168,11 @@ solaris_sparc_ServerClassMachine(void) {
+
+ #endif /* __sun && __sparc */
+
+-#if defined(__sun) && defined(i586)
++#if defined(__sun) && defined(x86)
+
+ /*
+ * A utility method for asking the CPU about itself.
+- * There's a corresponding version of linux-i586
++ * There's a corresponding version of linux-x86
+ * because the compilers are different.
+ */
+ void
+@@ -1218,13 +1218,13 @@ get_cpuid(uint32_t arg,
+ #endif
+ }
+
+-#endif /* __sun && i586 */
++#endif /* __sun && x86 */
+
+-#if defined(__linux__) && defined(i586)
++#if defined(__linux__) && defined(x86)
+
+ /*
+ * A utility method for asking the CPU about itself.
+- * There's a corresponding version of solaris-i586
++ * There's a corresponding version of solaris-x86
+ * because the compilers are different.
+ */
+ void
+@@ -1286,11 +1286,11 @@ get_cpuid(uint32_t arg,
+ #endif
+ }
+
+-#endif /* __linux__ && i586 */
++#endif /* __linux__ && x86 */
+
+-#ifdef i586
++#ifdef x86
+ /*
+- * Routines shared by solaris-i586 and linux-i586.
++ * Routines shared by solaris-x86 and linux-x86.
+ */
+
+ enum HyperThreadingSupport_enum {
+@@ -1430,11 +1430,11 @@ physical_processors(void) {
+ return result;
+ }
+
+-#endif /* i586 */
++#endif /* x86 */
+
+-#if defined(__sun) && defined(i586)
++#if defined(__sun) && defined(x86)
+
+-/* The definition of a server-class machine for solaris-i586/amd64 */
++/* The definition of a server-class machine for solaris-x86/amd64 */
+ jboolean
+ solaris_i586_ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+@@ -1463,11 +1463,11 @@ solaris_i586_ServerClassMachine(void) {
+ return result;
+ }
+
+-#endif /* __sun && i586 */
++#endif /* __sun && x86 */
+
+-#if defined(__linux__) && defined(i586)
++#if defined(__linux__) && defined(x86)
+
+-/* The definition of a server-class machine for linux-i586 */
++/* The definition of a server-class machine for linux-x86 */
+ jboolean
+ linux_i586_ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+@@ -1496,7 +1496,7 @@ linux_i586_ServerClassMachine(void) {
+ return result;
+ }
+
+-#endif /* __linux__ && i586 */
++#endif /* __linux__ && x86 */
+
+ /* Dispatch to the platform-specific definition of "server-class" */
+ jboolean
+@@ -1504,9 +1504,9 @@ ServerClassMachine(void) {
+ jboolean result = JNI_FALSE;
+ #if defined(__sun) && defined(__sparc)
+ result = solaris_sparc_ServerClassMachine();
+-#elif defined(__sun) && defined(i586)
++#elif defined(__sun) && defined(x86)
+ result = solaris_i586_ServerClassMachine();
+-#elif defined(__linux__) && defined(i586)
++#elif defined(__linux__) && defined(x86)
+ result = linux_i586_ServerClassMachine();
+ #else
+ if (_launcher_debug) {
+diff --git openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+index b2b3162..a4bbe70 100644
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -164,7 +164,7 @@ bool os::have_special_privileges() {
+ // i386: 224, ia64: 1105, amd64: 186, sparc 143
+ #ifdef __ia64__
+ #define SYS_gettid 1105
+-#elif __i386__
++#elif __x86__
+ #define SYS_gettid 224
+ #elif __amd64__
+ #define SYS_gettid 186
+@@ -181,7 +181,7 @@ static char cpu_arch[] = ZERO_LIBARCH;
+ #elif defined(IA64)
+ static char cpu_arch[] = "ia64";
+ #elif defined(IA32)
+-static char cpu_arch[] = "i386";
++static char cpu_arch[] = "x86";
+ #elif defined(AMD64)
+ static char cpu_arch[] = "amd64";
+ #elif defined(SPARC)
+diff --git openjdk/hotspot/src/share/tools/hsdis/Makefile openjdk/hotspot/src/share/tools/hsdis/Makefile
+index 6bdf4b8..fd43c6e 100644
+--- openjdk/hotspot/src/share/tools/hsdis/Makefile
++++ openjdk/hotspot/src/share/tools/hsdis/Makefile
+@@ -32,7 +32,7 @@ BINUTILS = $(shell cd ../../../../..;pwd)/binutils-2.17-$(LIBARCH)
+ endif
+
+ # Default arch; it is changed below as needed.
+-ARCH = i386
++ARCH = x86
+ OS = $(shell uname)
+
+ CPPFLAGS += -I$(BINUTILS)/include -I$(BINUTILS)/bfd
+@@ -87,7 +87,7 @@ endif # SunOS
+ LIBARCH = $(ARCH)
+ ifdef LP64
+ LIBARCH64/sparc = sparcv9
+-LIBARCH64/i386 = amd64
++LIBARCH64/x86 = amd64
+ LIBARCH64 = $(LIBARCH64/$(ARCH))
+ ifneq ($(LIBARCH64),)
+ LIBARCH = $(LIBARCH64)
+diff --git openjdk/hotspot/src/share/tools/hsdis/hsdis.c openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+index 75b7efe..62c692b 100644
+--- openjdk/hotspot/src/share/tools/hsdis/hsdis.c
++++ openjdk/hotspot/src/share/tools/hsdis/hsdis.c
+@@ -383,8 +383,8 @@ static void print_help(struct hsdis_app_data* app_data,
+ else
+ disassembler_usage(stderr); /* better than nothing */
+ (*printf_callback)(printf_stream, " mach=<arch> select disassembly mode\n");
+-#if defined(LIBARCH_i386) || defined(LIBARCH_amd64)
+- (*printf_callback)(printf_stream, " mach=i386 select 32-bit mode\n");
++#if defined(LIBARCH_x86) || defined(LIBARCH_amd64)
++ (*printf_callback)(printf_stream, " mach=x86 select 32-bit mode\n");
+ (*printf_callback)(printf_stream, " mach=x86-64 select 64-bit mode\n");
+ (*printf_callback)(printf_stream, " suffix always print instruction suffix\n");
+ #endif
+@@ -406,7 +406,7 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
+ static const char* native_arch_name() {
+ const char* res = HOTSPOT_LIB_ARCH;
+ #ifdef LIBARCH_amd64
+- res = "i386:x86-64";
++ res = "x86:x86-64";
+ #endif
+ #ifdef LIBARCH_sparc
+ res = "sparc:v8plusb";
+diff --git openjdk/hotspot/src/share/vm/adlc/Test/i486.ad openjdk/hotspot/src/share/vm/adlc/Test/i486.ad
+deleted file mode 100644
+index e69de29..0000000
+diff --git openjdk/hotspot/src/share/vm/adlc/Test/x86.ad openjdk/hotspot/src/share/vm/adlc/Test/x86.ad
+new file mode 100644
+index 0000000..e69de29
+diff --git openjdk/hotspot/test/Makefile openjdk/hotspot/test/Makefile
+index 2596d85..c2f3eb9 100644
+--- openjdk/hotspot/test/Makefile
++++ openjdk/hotspot/test/Makefile
+@@ -33,14 +33,14 @@ ifeq ($(OSNAME), SunOS)
+ PLATFORM = solaris
+ ARCH = $(shell uname -p)
+ ifeq ($(ARCH), i386)
+- ARCH=i586
++ ARCH=x86
+ endif
+ endif
+ ifeq ($(OSNAME), Linux)
+ PLATFORM = linux
+ ARCH = $(shell uname -m)
+- ifeq ($(ARCH), i386)
+- ARCH = i586
++ ifeq ($(findstring 86,$(ARCH)), 86)
++ ARCH = x86
+ endif
+ endif
+ ifeq ($(OSNAME), Windows_NT)
+@@ -55,7 +55,7 @@ ifeq ($(OSNAME), Windows_NT)
+ ifeq ($(word 1, $(PROCESSOR_IDENTIFIER)),EM64T)
+ ARCH = x64
+ else
+- ARCH = i586
++ ARCH = x86
+ endif
+ endif
+ endif
+--
+1.6.5
+
+diff --git openjdk/hotspot/make/linux/makefiles/i486.make b/hotspot/make/linux/makefiles/i486.make
+deleted file mode 100644
+index 9dd0b44..0000000
+--- openjdk/hotspot/make/linux/makefiles/i486.make
++++ /dev/null
+@@ -1,36 +0,0 @@
+-#
+-# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+-# CA 95054 USA or visit www.sun.com if you need additional information or
+-# have any questions.
+-#
+-#
+-
+-# TLS helper, assembled from .s file
+-# Not included in includeDB because it has no dependencies
+-Obj_Files += linux_x86_32.o
+-
+-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
+-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
+-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
+-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
+-# Must also specify if CPU is little endian
+-CFLAGS += -DVM_LITTLE_ENDIAN
+-
+-OPT_CFLAGS/compactingPermGenGen.o = -O1
+diff --git openjdk/hotspot/make/linux/makefiles/x86.make openjdk/hotspot/make/linux/makefiles/x86.make
+new file mode 100644
+index 0000000..9dd0b44
+--- /dev/null
++++ openjdk/hotspot/make/linux/makefiles/x86.make
+@@ -0,0 +1,36 @@
++#
++# Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++# CA 95054 USA or visit www.sun.com if you need additional information or
++# have any questions.
++#
++#
++
++# TLS helper, assembled from .s file
++# Not included in includeDB because it has no dependencies
++Obj_Files += linux_x86_32.o
++
++# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
++OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
++# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
++OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
++# Must also specify if CPU is little endian
++CFLAGS += -DVM_LITTLE_ENDIAN
++
++OPT_CFLAGS/compactingPermGenGen.o = -O1
+
diff --git a/recipes-core/icedtea/icedtea6-native-1.8/icedtea-jdk-sane-x86-arch.patch b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-jdk-sane-x86-arch.patch
new file mode 100644
index 0000000..f730c4a
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-jdk-sane-x86-arch.patch
@@ -0,0 +1,186 @@
+From 662e11a8b6017f39ceb6d00dcdbfe11473b56174 Mon Sep 17 00:00:00 2001
+From: woglinde <woglinde@rhein.zuhause.netz>
+Date: Fri, 23 Oct 2009 18:06:43 +0200
+Subject: [PATCH] sane-arch2
+
+---
+ openjdk/jdk/make/common/shared/Compiler-gcc.gmk | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: openjdk/jdk/make/common/shared/Compiler-gcc.gmk
+===================================================================
+--- openjdk/jdk/make/common/shared/Compiler-gcc.gmk.orig 2010-04-22 12:04:08.000000000 +0200
++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2010-04-22 12:13:53.335169757 +0200
+@@ -85,8 +85,8 @@
+ REQUIRED_CC_VER = 3.2
+ REQUIRED_GCC_VER = 3.2.*
+ endif
+- ifeq ($(ARCH), i586)
+- # i586
++ ifeq ($(ARCH), x86)
++ # x86
+ REQUIRED_CC_VER = 3.2
+ REQUIRED_GCC_VER = 3.2.1*
+ REQUIRED_GCC_VER_INT = 3.2.1-7a
+Index: openjdk/jdk/src/solaris/bin/i586/jvm.cfg
+===================================================================
+--- openjdk/jdk/src/solaris/bin/i586/jvm.cfg 2010-02-17 04:14:46.000000000 +0100
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,38 +0,0 @@
+-# Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
+-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+-#
+-# This code is free software; you can redistribute it and/or modify it
+-# under the terms of the GNU General Public License version 2 only, as
+-# published by the Free Software Foundation. Sun designates this
+-# particular file as subject to the "Classpath" exception as provided
+-# by Sun in the LICENSE file that accompanied this code.
+-#
+-# This code is distributed in the hope that it will be useful, but WITHOUT
+-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+-# version 2 for more details (a copy is included in the LICENSE file that
+-# accompanied this code).
+-#
+-# You should have received a copy of the GNU General Public License version
+-# 2 along with this work; if not, write to the Free Software Foundation,
+-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+-#
+-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+-# CA 95054 USA or visit www.sun.com if you need additional information or
+-# have any questions.
+-#
+-# List of JVMs that can be used as an option to java, javac, etc.
+-# Order is important -- first in this list is the default JVM.
+-# NOTE that this both this file and its format are UNSUPPORTED and
+-# WILL GO AWAY in a future release.
+-#
+-# You may also select a JVM in an arbitrary location with the
+-# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
+-# and may not be available in a future release.
+-#
+--client IF_SERVER_CLASS -server
+--server KNOWN
+--hotspot ALIASED_TO -client
+--classic WARN
+--native ERROR
+--green ERROR
+Index: openjdk/jdk/src/solaris/bin/x86/jvm.cfg
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ openjdk/jdk/src/solaris/bin/x86/jvm.cfg 2010-04-22 12:12:10.545603344 +0200
+@@ -0,0 +1,38 @@
++# Copyright 2001-2004 Sun Microsystems, Inc. All Rights Reserved.
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++#
++# This code is free software; you can redistribute it and/or modify it
++# under the terms of the GNU General Public License version 2 only, as
++# published by the Free Software Foundation. Sun designates this
++# particular file as subject to the "Classpath" exception as provided
++# by Sun in the LICENSE file that accompanied this code.
++#
++# This code is distributed in the hope that it will be useful, but WITHOUT
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++# version 2 for more details (a copy is included in the LICENSE file that
++# accompanied this code).
++#
++# You should have received a copy of the GNU General Public License version
++# 2 along with this work; if not, write to the Free Software Foundation,
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++#
++# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++# CA 95054 USA or visit www.sun.com if you need additional information or
++# have any questions.
++#
++# List of JVMs that can be used as an option to java, javac, etc.
++# Order is important -- first in this list is the default JVM.
++# NOTE that this both this file and its format are UNSUPPORTED and
++# WILL GO AWAY in a future release.
++#
++# You may also select a JVM in an arbitrary location with the
++# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
++# and may not be available in a future release.
++#
++-client IF_SERVER_CLASS -server
++-server KNOWN
++-hotspot ALIASED_TO -client
++-classic WARN
++-native ERROR
++-green ERROR
+Index: openjdk/jdk/make/common/shared/Platform.gmk
+===================================================================
+--- openjdk/jdk/make/common/shared/Platform.gmk.orig 2010-04-22 12:04:08.000000000 +0200
++++ openjdk/jdk/make/common/shared/Platform.gmk 2010-04-22 12:16:43.848486263 +0200
+@@ -56,8 +56,8 @@
+ # OS_VENDOR company name
+ # TEMP_DISK /tmp or C:/temp
+ # ARCH_DATA_MODEL 32 or 64
+-# ARCH sparc, sparcv9, i586, amd64, or ia64
+-# ARCH_FAMILY sparc or i586
++# ARCH sparc, sparcv9, x86, amd64, or ia64
++# ARCH_FAMILY sparc or x86
+ # ARCHPROP sparc or x86
+ # ARCH_VM_SUBDIR jre/bin, jre/lib/sparc, etc.
+ # LIBARCH sparc, sparcv9, i386, amd64, or ia64
+@@ -124,7 +124,7 @@
+ processor := $(shell uname -p)
+ archExpr = case "$(processor)" in \
+ i[3-9]86) \
+- echo i586 \
++ echo 586 \
+ ;; \
+ sparc*) \
+ echo sparc \
+@@ -200,7 +200,7 @@
+ endif
+ archExpr = case "$(mach)" in \
+ i[3-9]86) \
+- echo i586 \
++ echo x86 \
+ ;; \
+ ia64) \
+ echo ia64 \
+@@ -237,7 +237,7 @@
+ ARCH=sparcv9
+ endif
+ else
+- # i586 is 32-bit, amd64 is 64-bit
++ # x86 is 32-bit, amd64 is 64-bit
+ ifndef ARCH_DATA_MODEL
+ ifeq ($(ARCH), alpha)
+ ARCH_DATA_MODEL=64
+@@ -248,7 +248,7 @@
+ ifeq ($(ARCH), arm)
+ ARCH_DATA_MODEL=32
+ endif
+- ifeq ($(ARCH), i586)
++ ifeq ($(ARCH), x86)
+ ARCH_DATA_MODEL=32
+ endif
+ ifeq ($(ARCH), ia64)
+@@ -281,12 +281,7 @@
+ endif
+ endif
+
+- # Need to maintain the jre/lib/i386 location for 32-bit Intel
+- ifeq ($(ARCH), i586)
+- LIBARCH = i386
+- else
+- LIBARCH = $(ARCH)
+- endif
++ LIBARCH = $(ARCH)
+
+ # Value of Java os.arch property
+ ARCHPROP = $(LIBARCH)
+@@ -378,8 +373,8 @@
+ REQUIRED_WINDOWS_VERSION=2000 or Unknown
+ #REQUIRED_WINDOWS_VERSION=XP Professional
+ # LIBARCH is used to preserve the jre/lib/i386 directory name for 32-bit intel
+- ARCH=i586
+- LIBARCH=i386
++ ARCH=x86
++ LIBARCH=x86
+ # Value of Java os.arch property
+ ARCHPROP=x86
+ endif
diff --git a/recipes-core/icedtea/icedtea6-native-1.8/icedtea-sane-x86-arch-name.patch b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-sane-x86-arch-name.patch
new file mode 100644
index 0000000..b4c6857
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-sane-x86-arch-name.patch
@@ -0,0 +1,38 @@
+Index: icedtea6-1.8/acinclude.m4
+===================================================================
+--- icedtea6-1.8.orig/acinclude.m4 2010-04-10 21:58:40.000000000 +0200
++++ icedtea6-1.8/acinclude.m4 2010-04-22 10:09:42.752587915 +0200
+@@ -9,11 +9,11 @@
+ ARCHFLAG="-m64"
+ ;;
+ i?86)
+- BUILD_ARCH_DIR=i586
+- INSTALL_ARCH_DIR=i386
+- JRE_ARCH_DIR=i386
++ BUILD_ARCH_DIR=x86
++ INSTALL_ARCH_DIR=x86
++ JRE_ARCH_DIR=x86
+ ARCH_PREFIX=${LINUX32}
+- CROSS_TARGET_ARCH=i386
++ CROSS_TARGET_ARCH=x86
+ ARCHFLAG="-m32"
+ ;;
+ alpha*)
+@@ -765,7 +765,7 @@
+ ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
+ dnl can't use AC_CHECK_SIZEOF on multilib
+ case "${ZERO_LIBARCH}" in
+- i386|ppc|s390|sparc)
++ x86|ppc|s390|sparc)
+ ZERO_BITSPERWORD=32
+ ;;
+ amd64|ppc64|s390x|sparc64)
+@@ -777,7 +777,7 @@
+ esac
+ AC_C_BIGENDIAN([ZERO_ENDIANNESS="big"], [ZERO_ENDIANNESS="little"])
+ case "${ZERO_LIBARCH}" in
+- i386)
++ x86)
+ ZERO_ARCHDEF="IA32"
+ ;;
+ ppc*)
diff --git a/recipes-core/icedtea/icedtea6-native-1.8/icedtea-unbreak-float.patch b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-unbreak-float.patch
new file mode 100644
index 0000000..9f875de
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native-1.8/icedtea-unbreak-float.patch
@@ -0,0 +1,18 @@
+Index: openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h
+===================================================================
+--- openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:49:39.972718207 +0100
++++ openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:50:04.635639302 +0100
+@@ -27,13 +27,11 @@
+
+ #include "jfdlibm.h"
+
+-#ifdef __NEWVALID /* special setup for Sun test regime */
+ #if defined(i386) || defined(i486) || \
+ defined(intel) || defined(x86) || \
+ defined(i86pc) || defined(_M_IA64) || defined(ia64)
+ #define _LITTLE_ENDIAN
+ #endif
+-#endif
+
+ #ifdef _LITTLE_ENDIAN
+ #define __HI(x) *(1+(int*)&x)
diff --git a/recipes-core/icedtea/icedtea6-native.inc b/recipes-core/icedtea/icedtea6-native.inc
new file mode 100644
index 0000000..afd7239
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native.inc
@@ -0,0 +1,215 @@
+DESCRIPTION = "Harness to build the source code from OpenJDK using Free Software build tools"
+HOMEPAGE = "http://icedtea.classpath.org"
+LICENSE = "GPL with Classpath Exception"
+INC_PR = "r4"
+
+DEPENDS = "virtual/javac-native virtual/java-native classpath-native \
+ xalan-j-native xerces-j-native rhino-native \
+ ant-native \
+ libx11-native xproto-native libxt-native libxext-native \
+ freetype-native zlib-native giflib-native jpeg-native \
+ zip-native \
+ "
+
+inherit native java autotools
+
+JAVA_HOME[unexport] = "1"
+
+# No parallel build yet.
+PARALLEL_MAKE = ""
+
+# openjdk-ecj looks in /usr/include and /usr/lib for freetype by default.
+export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2"
+export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}"
+
+# Configure options compatible with Cacao >= 0.99 only!
+EXTRA_OECONF = "\
+ --with-parallel-jobs=1 \
+ --disable-docs \
+ --disable-pulse-java \
+ --disable-plugin \
+ --disable-npplugin \
+ --disable-xrender \
+ \
+ --with-ecj=${STAGING_BINDIR_NATIVE}/ecj-bootstrap \
+ \
+ --with-ecj-jar=${STAGING_DATADIR_JAVA_NATIVE}/ecj-bootstrap.jar \
+ --with-java=${STAGING_BINDIR_NATIVE}/java \
+ --with-javac=${STAGING_BINDIR_NATIVE}/ecj-bootstrap \
+ --with-javah=${STAGING_BINDIR_NATIVE}/gjavah \
+ --with-jar=${STAGING_BINDIR_NATIVE}/fastjar \
+ --with-rmic=${STAGING_BINDIR_NATIVE}/grmic \
+ --with-xalan2-jar=${STAGING_DATADIR_NATIVE}/java/xalan2.jar \
+ --with-xalan2-serializer-jar=${STAGING_DATADIR_NATIVE}/java/serializer.jar \
+ --with-xerces2-jar=${STAGING_DATADIR_NATIVE}/java/xercesImpl.jar \
+ --with-rhino=${STAGING_DATADIR_NATIVE}/java/rhino.jar \
+ --with-openjdk-src-dir=${WORKDIR}/openjdk-src-dir \
+ --with-gcj-home=${WORKDIR}/fake-jdk \
+ \
+ --enable-openjdk-cross-compilation \
+ "
+
+JDK_DIR = "icedtea6-native"
+
+JDK_INSTALL_DIR = "${D}/${libdir_jvm}/${JDK_DIR}"
+
+do_configure_prepend() {
+
+ case "${TARGET_ARCH}" in
+ x86_64)
+ libarch=amd64
+ ;;
+ i386|i486|i586|i686)
+ libarch=x86
+ ;;
+ *)
+ arch=${TARGET_ARCH}
+ libarch=${TARGET_ARCH}
+ ;;
+ esac
+
+ chmod -R ug+w ${WORKDIR}/openjdk-src-dir
+ (cd ${WORKDIR}/openjdk-src-dir && sh ${S}/fsg.sh)
+
+ # Automatically copy everything that starts with "icedtea" and ends with
+ # ".patch" into the patches directory.
+ find ${WORKDIR} -maxdepth 1 -name "icedtea*.patch" -exec cp {} ${S}/patches \;
+
+ # Prepare JDK-like directory with Classpath' files which we can treat as a
+ # SYSTEM_GCJ_DIR afterwards.
+ mkdir -p ${WORKDIR}/fake-jdk/jre/lib/
+ ln -sf ${STAGING_DATADIR_NATIVE}/classpath/glibj.zip ${WORKDIR}/fake-jdk/jre/lib/rt.jar
+
+ mkdir -p ${WORKDIR}/fake-jdk/include
+ for i in ${STAGING_INCDIR_NATIVE}/classpath/* ;do
+ test -r $i | continue;
+ bn=`basename $i`
+ ln -sf $i ${WORKDIR}/fake-jdk/include/$bn;
+ done
+}
+
+do_configure_append() {
+ oe_runmake patch-ecj
+
+ for F in openjdk-ecj/jdk/make/common/shared/Compiler-gcc.gmk openjdk-ecj/corba/make/common/shared/Compiler-gcc.gmk ;
+ do
+ sed -i \
+ -e"s|\$(COMPILER_PATH)gcc\$(GCC_SUFFIX)|${CC}|" \
+ -e"s|\$(COMPILER_PATH)gcc\$(GCC_SUFFIX) -E|${CPP}|" \
+ -e"s|\$(COMPILER_PATH)g++\$(GCC_SUFFIX)|${CXX}|" \
+ $F
+ done
+
+ for F in openjdk-ecj/hotspot/make/linux/makefiles/gcc.make openjdk-ecj/hotspot/agent/src/os/linux/Makefile ;
+ do
+ sed -i \
+ -e"s|gcc\$(GCC_SUFFIX)|${CC}|" \
+ -e"s|g++\$(GCC_SUFFIX)|${CXX}|" \
+ $F
+ done
+}
+
+EXTRA_OEMAKE = ' \
+ ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \
+ '
+
+do_compile() {
+ # OpenJDK uses slightly different names for certain arches. We need to know
+ # this to create some files which are expected by the build.
+ case "${TARGET_ARCH}" in
+ x86_64)
+ arch=amd64
+ libarch=amd64
+ ;;
+ i386|i486|i586|i686)
+ arch=x86
+ libarch=x86
+ ;;
+ *)
+ arch=${TARGET_ARCH}
+ libarch=${TARGET_ARCH}
+ ;;
+ esac
+
+ install -d openjdk-ecj/control/build/linux-$arch/hotspot/import/jre/lib
+ if [ $libarch != $arch ]; then
+ # Something is strange with the directoy naming. OpenJDK uses both variants.
+ ln -sf $libarch openjdk-ecj/control/build/linux-$arch/hotspot/import/jre/lib/$arch
+ fi
+
+
+ # First build hotspot to get a libjvm.so
+ echo "1/2 Building Hotspot"
+ oe_runmake hotspot
+
+ # Remove the strange recursive symlink that is created here (If it is not there, then just skip this).
+ rm -f bootstrap/ecj/jre/lib/$libarch || true
+
+ # Copy libjvm.so for target into bootstrap/jdk1.6.0/jre/lib
+ install -d bootstrap/ecj/jre/lib/$libarch
+ cp openjdk-ecj/build/linux-$arch/j2sdk-image/jre/lib/$libarch/server/libjvm.so bootstrap/ecj/jre/lib/$libarch
+
+ # OpenJDK build expects these files to exist (by creating those files we pretend
+ # that stuff was compiled)
+ common_dir=openjdk-ecj/build/linux-$arch/tmp/sun
+ for D in javax.sound/jsoundalsa sun.awt.X11/xawt sun.awt/jawt;
+ do
+ echo "creating $common_dir/$D/obj64/.files_compiled"
+ install -d $common_dir/$D/obj64
+ touch $common_dir/$D/obj64/.files_compiled
+
+ echo "creating $common_dir/$D/obj/.files_compiled"
+ install -d $common_dir/$D/obj
+ touch $common_dir/$D/obj/.files_compiled
+ done
+
+ # now use the jni.h from the hotspot
+ #cp
+
+ echo "2/2 Running make icedtea-against-ecj"
+ # Now cross-compile bootstrap JDK
+ rm stamps/icedtea-against-ecj.stamp stamps/icedtea-ecj.stamp || true
+ oe_runmake icedtea-against-ecj
+
+ # Creates a nice symlink which allows us to reach the created files easily.
+ oe_runmake stamps/bootstrap-directory-symlink.stamp
+}
+
+do_install() {
+ case "${TARGET_ARCH}" in
+ x86_64)
+ JDK_ARCH=amd64
+ ;;
+ i386|i486|i586|i686)
+ JDK_ARCH=x86
+ ;;
+ *)
+ JDK_ARCH=${TARGET_ARCH}
+ ;;
+ esac
+
+ install -d ${JDK_INSTALL_DIR}
+
+ for F in bootstrap/icedtea/{bin,include,jre,lib}
+ do
+ cp -RL $F ${JDK_INSTALL_DIR}
+ done
+
+ install -d ${JDK_INSTALL_DIR}/include/hpi
+ cp openjdk-ecj/jdk/src/solaris/hpi/export/*.h ${JDK_INSTALL_DIR}/include/hpi
+ cp openjdk-ecj/jdk/src/share/hpi/export/*.h ${JDK_INSTALL_DIR}/include/hpi
+
+ install -d ${JDK_INSTALL_DIR}/include/javavm
+ cp openjdk-ecj/jdk/src/share/javavm/export/*.h ${JDK_INSTALL_DIR}/include/javavm
+ cp openjdk-ecj/jdk/src/solaris/javavm/export/*.h ${JDK_INSTALL_DIR}/include/javavm
+
+ install -d ${JDK_INSTALL_DIR}/generated
+ cp generated/sun/awt/X11/generator/sizer.32 ${JDK_INSTALL_DIR}/generated
+
+ # Fix libjvm.so dependency of libfontmanager.so
+ ln -sf server/libjvm.so ${JDK_INSTALL_DIR}/jre/lib/${JDK_ARCH}/libjvm.so
+ ln -sf server/libjvm.so ${JDK_INSTALL_DIR}/jre/lib/${JDK_ARCH}/libjvm.so.0
+
+ # Fix missing write permissions on the files.
+ chmod ug+w -R ${JDK_INSTALL_DIR}
+}
diff --git a/recipes-core/icedtea/icedtea6-native_1.7.10.bb b/recipes-core/icedtea/icedtea6-native_1.7.10.bb
new file mode 100644
index 0000000..77c6232
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native_1.7.10.bb
@@ -0,0 +1,36 @@
+require ${PN}.inc
+
+PR = "${INC_PR}.0"
+
+SRC_URI = "\
+ http://icedtea.classpath.org/download/source/icedtea6-${PV}.tar.gz;name=iced \
+ http://download.java.net/openjdk/jdk6/promoted/b17/openjdk-6-src-b17-14_oct_2009.tar.gz;subdir=openjdk-src-dir;name=ojdk \
+ file://disable-library-checks.patch \
+ file://icedtea-fix-jar-path.patch \
+ file://build-hacks-native.patch \
+ file://icedtea-sane-x86-arch-name.patch \
+ file://icedtea-javac-in.patch \
+ ${ICEDTEA_PATCHES} \
+ "
+SRC_URI[ojdk.md5sum] = "078fe0ab744c98694decc77f2456c560"
+SRC_URI[ojdk.sha256sum] = "2019a4c3d2d14620caa78d7df49fd987a041066b4631bde4fd8424033f3c1785"
+SRC_URI[iced.md5sum] = "0d61041e46253d089f1b30114716012d"
+SRC_URI[iced.sha256sum] = "dbca9d7598352d178651c8cc28ff887c59a27f0125785a58e9f9723611137f78"
+
+ICEDTEA_PATCHES = "\
+ file://icedtea-ecj-disable-compilation.patch;apply=no \
+ file://icedtea-ecj-fix-freetype.patch;apply=no \
+ file://icedtea-ecj-fix-zlib.patch;apply=no \
+ file://icedtea-hotspot-make-arch-sane-for-x86.patch;apply=no \
+ file://icedtea-jdk-sane-x86-arch.patch;apply=no \
+ file://icedtea-unbreak-float.patch;apply=no \
+ "
+
+export DISTRIBUTION_PATCHES = "\
+ patches/icedtea-ecj-disable-compilation.patch \
+ patches/icedtea-ecj-fix-freetype.patch \
+ patches/icedtea-ecj-fix-zlib.patch \
+ patches/icedtea-hotspot-make-arch-sane-for-x86.patch \
+ patches/icedtea-jdk-sane-x86-arch.patch \
+ patches/icedtea-unbreak-float.patch \
+ "
diff --git a/recipes-core/icedtea/icedtea6-native_1.8.11.bb b/recipes-core/icedtea/icedtea6-native_1.8.11.bb
new file mode 100644
index 0000000..d87d9f3
--- /dev/null
+++ b/recipes-core/icedtea/icedtea6-native_1.8.11.bb
@@ -0,0 +1,58 @@
+# Note: DO NOT USE THIS PACKAGE. While the build is fine, the resulting JDK
+# is unable to compile itself yet (some issue with the built-in XML parser).
+require ${PN}.inc
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+PR = "${INC_PR}.0"
+
+SRC_URI = "\
+ http://icedtea.classpath.org/download/source/icedtea6-${PV}.tar.gz;name=iced \
+ http://download.java.net/openjdk/jdk6/promoted/b18/openjdk-6-src-b18-16_feb_2010.tar.gz;subdir=openjdk-src-dir;name=ojdk \
+ ${JAXWS_URI} \
+ ${JAF_URI} \
+ ${JAXP_URI} \
+ file://disable-library-checks.patch \
+ file://build-hacks-native.patch \
+ file://icedtea-sane-x86-arch-name.patch \
+ ${ICEDTEA_PATCHES} \
+ "
+SRC_URI[ojdk.md5sum] = "94db01691ab38f98b7d42b2ebf4d5c0b"
+SRC_URI[ojdk.sha256sum] = "778ea7b323aaa24d3c6e8fe32b8bb0f49040d9e86271859077ada9f9ee3c8ebf"
+SRC_URI[iced.md5sum] = "e0edfb08a4eedf1b9f1cef26a9bd4ab4"
+SRC_URI[iced.sha256sum] = "6eb418ec0609080a71bda16896124d6e1ac23b2f54af52e05fc22c719e12ca29"
+
+JAXWS_URI = "http://icedtea.classpath.org/download/source/drops/jdk6-jaxws-2009_10_27.zip;name=jaxws"
+SRC_URI[jaxws.md5sum] = "3ea5728706169498b722b898a1008acf"
+SRC_URI[jaxws.sha256sum] = "155ff3be83c980e197621a2fbf7ee34e8e0f536489351a5865cf0e52206245e2"
+
+JAF_URI = "http://icedtea.classpath.org/download/source/drops/jdk6-jaf-2009_10_27.zip;name=jaf"
+SRC_URI[jaf.md5sum] = "7a50bb540a27cdd0001885630088b758"
+SRC_URI[jaf.sha256sum] = "fdc51476fc6bcc69ea1f099f33e84601a126bfa8b11c8fa11c25dc574345aa9f"
+
+JAXP_URI = "https://jaxp.dev.java.net/files/nidaba/documents/913/147329/jdk6-jaxp-2009_10_13.zip;name=jaxp"
+SRC_URI[jaxp.md5sum] = "a2f7b972124cd776ff71e7754eb9a429"
+SRC_URI[jaxp.sha256sum] = "8714d55de18db48ca9da0ee986202005082f44cf4c215da8683342b70e61792b"
+
+
+ICEDTEA_PATCHES = "\
+ file://icedtea-ecj-disable-compilation.patch;apply=no \
+ file://icedtea-ecj-fix-freetype.patch;apply=no \
+ file://icedtea-ecj-fix-zlib.patch;apply=no \
+ file://icedtea-hotspot-make-arch-sane-for-x86.patch;apply=no \
+ file://icedtea-jdk-sane-x86-arch.patch;apply=no \
+ file://icedtea-unbreak-float.patch;apply=no \
+ "
+
+export DISTRIBUTION_PATCHES = "\
+ patches/icedtea-ecj-disable-compilation.patch \
+ patches/icedtea-ecj-fix-freetype.patch \
+ patches/icedtea-ecj-fix-zlib.patch \
+ patches/icedtea-hotspot-make-arch-sane-for-x86.patch \
+ patches/icedtea-jdk-sane-x86-arch.patch \
+ patches/icedtea-unbreak-float.patch \
+ "
+
+EXTRA_OECONF += " --with-jaxws-drop-zip=${DL_DIR}/jdk6-jaxws-2009_10_27.zip \
+ --with-jaf-drop-zip=${DL_DIR}/jdk6-jaf-2009_10_27.zip \
+ --with-jaxp-drop-zip=${DL_DIR}/jdk6-jaxp-2009_10_13.zip "
diff --git a/recipes-core/jacl/jacl_1.4.1.bb b/recipes-core/jacl/jacl_1.4.1.bb
new file mode 100644
index 0000000..80635e1
--- /dev/null
+++ b/recipes-core/jacl/jacl_1.4.1.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "Tcl interpreter for Java"
+# see this case study about JACL http://olex.openlogic.com/wazi/2008/jacl-license-case-study/
+LICENSE = "JACL"
+LIC_FILES_CHKSUM = " \
+ file://license.ucb;md5=997c6617d2f2a747e39945c0f2d1a264 \
+ file://license.terms;md5=ce3ac33515250b3a438b2633ccb29aac \
+ "
+
+HOMEPAGE = "http://sourceforge.net/projects/tcljava"
+
+SRC_URI = "http://downloads.sourceforge.net/tcljava/jacl${PV}.tar.gz"
+
+inherit java-library
+
+S = "${WORKDIR}/jacl${PV}"
+
+do_compile() {
+ mkdir -p build
+
+ javac -sourcepath src/tcljava:src/jacl -d build `find src/tcljava src/jacl -name "*.java"`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "a7ec8300e8933164e854460c73ac6269"
+SRC_URI[sha256sum] = "0edac0a7d2253c29c44ccc92427fa9ad4ee81b6c82142e417f72399a8584b749"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/jakarta-commons/commons-beanutils_1.8.0.bb b/recipes-core/jakarta-commons/commons-beanutils_1.8.0.bb
new file mode 100644
index 0000000..500937d
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-beanutils_1.8.0.bb
@@ -0,0 +1,13 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Static utility methods useful in manipulating Java classes that conform to the JavaBeans Specification"
+
+SRC_URI = "http://www.apache.org/dist/commons/beanutils/source/${BP}-src.tar.gz"
+
+DEPENDS += "commons-collections3 commons-logging"
+RDEPENDS_${PN} = "libcommons-collections3-java libcommons-logging-java"
+
+CP = "commons-collections3 commons-logging"
+
+SRC_URI[md5sum] = "1bce3cfa4ae33c94686422e78abc0792"
+SRC_URI[sha256sum] = "aff3c8c772e4ff32f2d9a37a727a488583372e45535a3d5aad09662691851dcf"
diff --git a/recipes-core/jakarta-commons/commons-cli_1.1.bb b/recipes-core/jakarta-commons/commons-cli_1.1.bb
new file mode 100644
index 0000000..bcfaf65
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-cli_1.1.bb
@@ -0,0 +1,10 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Java argument parsing helper classes"
+
+SRC_URI = "http://www.apache.org/dist/commons/cli/source/${BP}-src.tar.gz"
+
+
+
+SRC_URI[md5sum] = "ccc1aa194132e2387557bbb7f65391f4"
+SRC_URI[sha256sum] = "929eb140c136673e7f5029cd206c81b3c1f5e66bba0dfdcd021b9dd5596356d2"
diff --git a/recipes-core/jakarta-commons/commons-codec_1.3.bb b/recipes-core/jakarta-commons/commons-codec_1.3.bb
new file mode 100644
index 0000000..6af47e1
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-codec_1.3.bb
@@ -0,0 +1,10 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Java library with simple encoder and decoders for various formats such as Base64 and Hexadecimal"
+
+SRC_URI = "http://www.apache.org/dist/commons/codec/source/${BP}-src.tar.gz"
+
+S = "${WORKDIR}/${BP}"
+
+SRC_URI[md5sum] = "af3c3acf618de6108d65fcdc92b492e1"
+SRC_URI[sha256sum] = "12effcf3fea025bd34edbfec60a6216ca453fb27e781d8e5783caf75fd33d90e"
diff --git a/recipes-core/jakarta-commons/commons-collections3_3.2.1.bb b/recipes-core/jakarta-commons/commons-collections3_3.2.1.bb
new file mode 100644
index 0000000..7e3478b
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-collections3_3.2.1.bb
@@ -0,0 +1,11 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "A set of abstract data type interfaces and implementations that offer a wealth of useful functionality and a solid foundation for extending that functionality"
+
+SRC_URI = "http://www.apache.org/dist/commons/collections/source/commons-collections-${PV}-src.tar.gz"
+
+S = "${WORKDIR}/commons-collections-${PV}-src"
+
+
+SRC_URI[md5sum] = "031ce05872ddb0462f0dcce1e5babbe9"
+SRC_URI[sha256sum] = "9a4a800cb7ecdaf3b6f608cd608682b88b506f1b1c4b727d15471ae3329fc63d"
diff --git a/recipes-core/jakarta-commons/commons-collections_2.1.1.bb b/recipes-core/jakarta-commons/commons-collections_2.1.1.bb
new file mode 100644
index 0000000..79bd612
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-collections_2.1.1.bb
@@ -0,0 +1,9 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "A set of abstract data type interfaces and implementations that offer a wealth of useful functionality and a solid foundation for extending that functionality"
+
+SRC_URI = "http://www.apache.org/dist/commons/collections/source/${BP}-src.tar.gz"
+
+
+SRC_URI[md5sum] = "3fc2e8f9d0647074cba992b534ecf6df"
+SRC_URI[sha256sum] = "73eb5907a31c8770480c70f6a6a8d9a9a2ffe602e1b461c045cff51ace4cab2a"
diff --git a/recipes-core/jakarta-commons/commons-configuration_1.5.bb b/recipes-core/jakarta-commons/commons-configuration_1.5.bb
new file mode 100644
index 0000000..93febd7
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-configuration_1.5.bb
@@ -0,0 +1,24 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Generic configuration interface for Java applications"
+
+SRC_URI = " \
+ http://www.apache.org/dist/commons/configuration/source/${BP}-src.tar.gz;name=archive \
+ http://ftp.hosting-studio.de/pub/linux/apache/ant/source/apache-ant-1.7.1-src.tar.bz2;name=ant \
+ "
+
+DEPENDS += "commons-logging commons-collections3 commons-beanutils commons-codec commons-digester commons-jxpath commons-lang servlet2.4"
+RDEPENDS_${PN} = "libcommons-logging-java libcommons-collections3-java libcommons-beanutils-java libcommons-codec-java libcommons-digester-java libcommons-jxpath-java libcommons-lang-java libservlet2.4-java"
+
+CP = "commons-logging commons-collections3 commons-beanutils commons-codec commons-digester commons-jxpath commons-lang servlet-api-2.4"
+
+# Makes use of -sourcepath hack: We inject Ant sourcefiles into the build and remove them
+# afterwards.
+COMPILE_SOURCEPATH = "${WORKDIR}/apache-ant-1.7.1/src/main:src/java"
+
+CLEAN_PATH = "build/org/apache/tools"
+
+SRC_URI[archive.md5sum] = "6a019d26d576a87eda2ef84c8ffc2e31"
+SRC_URI[archive.sha256sum] = "06e5dd81c1302118298156f70b8138fa131ed8f258671b1b67e36a34d80357a0"
+SRC_URI[ant.md5sum] = "0d68db4a1ada5c91bcbf53cefd0c2fd7"
+SRC_URI[ant.sha256sum] = "4dc49a7260ef90a6dc6611b7e96b9f047d507589736d4a2ad6efbe3edfc6fba6"
diff --git a/recipes-core/jakarta-commons/commons-digester_1.8.bb b/recipes-core/jakarta-commons/commons-digester_1.8.bb
new file mode 100644
index 0000000..feb0786
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-digester_1.8.bb
@@ -0,0 +1,15 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Converts XML to a Java object by a set of mapping rules."
+
+SRC_URI = "http://www.apache.org/dist/commons/digester/source/${BP}-src.tar.gz"
+
+DEPENDS += "commons-logging commons-beanutils"
+RDEPENDS_${PN} = "libcommons-logging-java libcommons-beanutils-java"
+
+CP = "commons-logging commons-beanutils"
+
+FINDARGS = "-name '*.dtd'"
+
+SRC_URI[md5sum] = "689f41905a68c67f7231f9afbb3e2147"
+SRC_URI[sha256sum] = "d9a965c82828a881d2ab6256fba7076f62815a9545b3af9d553dc5271577182b"
diff --git a/recipes-core/jakarta-commons/commons-discovery_0.4.bb b/recipes-core/jakarta-commons/commons-discovery_0.4.bb
new file mode 100644
index 0000000..0de4c5c
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-discovery_0.4.bb
@@ -0,0 +1,13 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "discovering, or finding, implementations for pluggable interfaces"
+
+SRC_URI = "http://www.apache.org/dist/commons/discovery/source/${BP}-src.tar.gz"
+
+DEPENDS += "commons-logging"
+RDEPENDS_${PN} = "libcommons-logging-java"
+
+CP = "commons-logging"
+
+SRC_URI[md5sum] = "1275ad4c6ce54b9323269e30dc42dd0e"
+SRC_URI[sha256sum] = "596242302be4f0502073f5a934c608289bba6221591e7dbea53ce629f67498a3"
diff --git a/recipes-core/jakarta-commons/commons-el_1.0.bb b/recipes-core/jakarta-commons/commons-el_1.0.bb
new file mode 100644
index 0000000..3ba21ee
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-el_1.0.bb
@@ -0,0 +1,17 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Implementation of the JSP2.0 Expression Language API"
+
+SRC_URI = "http://www.apache.org/dist/commons/el/source/${BP}-src.tar.gz"
+
+DEPENDS += "jsp2.0 servlet2.4"
+RDEPENDS_${PN} = "libjsp2.0-java libservlet2.4-java"
+
+CP = "jsp-api-2.0 servlet-api-2.4"
+
+FINDARGS = "\( -name '*.properties' -or -name '*.jj' \)"
+
+
+
+SRC_URI[md5sum] = "25038283a0b5f638db5e891295d20020"
+SRC_URI[sha256sum] = "3c9bdded6073563aaaddc9ad7c7387b242dc03cc385381503026b665a366c2c6"
diff --git a/recipes-core/jakarta-commons/commons-fileupload_1.2.1.bb b/recipes-core/jakarta-commons/commons-fileupload_1.2.1.bb
new file mode 100644
index 0000000..34ff2c1
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-fileupload_1.2.1.bb
@@ -0,0 +1,17 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Robust, high-performance, file upload capability for Java servlets and web applications"
+
+SRC_URI = "http://www.apache.org/dist/commons/fileupload/source/${BP}-src.tar.gz"
+
+DEPENDS += "commons-beanutils commons-io servlet2.3"
+RDEPENDS_${PN} = "libcommons-beanutils-java libcommons-io-java libservlet2.3-java"
+
+CP = "commons-beanutils commons-io servlet-2.3"
+
+# Exclude portlet stuff from compilation like Debian does.
+COMPILE_FINDARGS = "-name '*.java' -not -wholename '*portlet*'"
+
+
+SRC_URI[md5sum] = "c2bdb9264aec564e3f4fbbdf4344a844"
+SRC_URI[sha256sum] = "08905cb3a0db4f7fa67f3b579b2c481060334d50d7f913c6974c7513243152f5"
diff --git a/recipes-core/jakarta-commons/commons-httpclient_3.1.bb b/recipes-core/jakarta-commons/commons-httpclient_3.1.bb
new file mode 100644
index 0000000..64f80f6
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-httpclient_3.1.bb
@@ -0,0 +1,16 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Efficient, up-to-date, and feature-rich package implementing the client side of the most recent HTTP standards and recommendations"
+
+SRC_URI = "http://www.apache.org/dist/httpcomponents/commons-httpclient/source/${BP}-src.tar.gz"
+
+S = "${WORKDIR}/${BP}"
+
+DEPENDS += "commons-logging commons-codec"
+RDEPENDS_${PN} = "libcommons-logging-java libcommons-codec-java"
+
+CP = "commons-logging commons-codec"
+
+
+SRC_URI[md5sum] = "2c9b0f83ed5890af02c0df1c1776f39b"
+SRC_URI[sha256sum] = "f9a496d3418b0e15894fb351652cd4fa5ca434ebfc3ce3bb8da40defd8b097f2"
diff --git a/recipes-core/jakarta-commons/commons-io_1.4.bb b/recipes-core/jakarta-commons/commons-io_1.4.bb
new file mode 100644
index 0000000..ce627ea
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-io_1.4.bb
@@ -0,0 +1,8 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Java library with utility classes, stream implementations, file filters and endian classes"
+
+SRC_URI = "http://www.apache.org/dist/commons/io/source/${BP}-src.tar.gz"
+
+SRC_URI[md5sum] = "24b228f2d0c40ffed9204cdab015bccf"
+SRC_URI[sha256sum] = "eca986497f7b4d1b1ec41821b1b5df827bb31fc14833e4449cfa8bcd5d7f29bb"
diff --git a/recipes-core/jakarta-commons/commons-jxpath_1.3.bb b/recipes-core/jakarta-commons/commons-jxpath_1.3.bb
new file mode 100644
index 0000000..9e612b2
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-jxpath_1.3.bb
@@ -0,0 +1,13 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "JXPath interpreter for Java"
+
+SRC_URI = "http://www.apache.org/dist/commons/jxpath/source/${BP}-src.tar.gz"
+
+DEPENDS += "commons-logging commons-collections3 commons-beanutils servlet2.3 jdom"
+RDEPENDS_${PN} = "libcommons-logging-java libcommons-collections3-java libcommons-beanutils-java libservlet2.3-java libjdom-java"
+
+CP = "commons-logging commons-collections3 commons-beanutils servlet-2.3 jdom"
+
+SRC_URI[md5sum] = "9af6ed5d009061986d709a370829860e"
+SRC_URI[sha256sum] = "da314198d75c6da660e2603bd1543a8f5d0b640c5144b748e62e59afc278efe6"
diff --git a/recipes-core/jakarta-commons/commons-lang_2.4.bb b/recipes-core/jakarta-commons/commons-lang_2.4.bb
new file mode 100644
index 0000000..a470d63
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-lang_2.4.bb
@@ -0,0 +1,9 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Set of Java classes that provide helper methods for the standard java.lang classes"
+
+SRC_URI = "http://www.apache.org/dist/commons/lang/source/${BP}-src.tar.gz"
+
+
+SRC_URI[md5sum] = "625ff5f2f968dd908bca43c9469d6e6b"
+SRC_URI[sha256sum] = "2445238cd0eb167e99a1147394f61325490559f3df7e7e8f628043fb70cbf2f4"
diff --git a/recipes-core/jakarta-commons/commons-logging_1.1.1.bb b/recipes-core/jakarta-commons/commons-logging_1.1.1.bb
new file mode 100644
index 0000000..235b7f4
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-logging_1.1.1.bb
@@ -0,0 +1,19 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Java Internet protocol suite library"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d273d63619c9aeaf15cdaf76422c4f87"
+
+SRC_URI = "http://www.apache.org/dist/commons/logging/source/${BP}-src.tar.gz"
+
+DEPENDS += "log4j1.2 servlet2.3 logkit"
+DEPENDS_virtclass-native += "log4j1.2-native servlet2.3-native logkit-native"
+
+CP = "log4j-1.2 servlet-2.3 logkit"
+
+COMPILE_FINDARGS = "-name '*.java' -and -not -name '*Avalon*'"
+
+SRC_URI[md5sum] = "e5cfa8cca13152d7545fde6b1783c60a"
+SRC_URI[sha256sum] = "b49a79fa78ebfae15dc46ae6f0144fee6b94ab608a25518c54609d3419909eb2"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/jakarta-commons/commons-net_1.4.1.bb b/recipes-core/jakarta-commons/commons-net_1.4.1.bb
new file mode 100644
index 0000000..26b8603
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-net_1.4.1.bb
@@ -0,0 +1,24 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Java Internet protocol suite library"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "http://www.apache.org/dist/commons/net/source/${BP}-src.tar.gz"
+
+S = "${WORKDIR}/${BP}"
+
+DEPENDS += "oro"
+DEPENDS_virtclass-native += "oro-native"
+
+RDEPENDS_${PN} = "liboro-java"
+RDEPENDS_${PN}_virtclass-native = ""
+
+CP = "oro"
+
+MAINSOURCES = "src/java/org"
+
+SRC_URI[md5sum] = "ccbb3f67b55e8a7a676499db4386673c"
+SRC_URI[sha256sum] = "fdea779f261f70b9bbec40121c830b11e3e63b6188f662f95505045ff8d44add"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/jakarta-commons/commons-pool_1.4.bb b/recipes-core/jakarta-commons/commons-pool_1.4.bb
new file mode 100644
index 0000000..b6bd4f4
--- /dev/null
+++ b/recipes-core/jakarta-commons/commons-pool_1.4.bb
@@ -0,0 +1,8 @@
+require jakarta-commons.inc
+
+DESCRIPTION = "Java Object-pooling API"
+
+SRC_URI = "http://www.apache.org/dist/commons/pool/source/${BP}-src.tar.gz"
+
+SRC_URI[md5sum] = "4dc988ee16e1471799af97763297b41b"
+SRC_URI[sha256sum] = "ca4452f2a2ce2daf6eaa1743ded2d3b36013200c48e3f2117b65584ca5cc1d9b"
diff --git a/recipes-core/jakarta-commons/jakarta-commons.inc b/recipes-core/jakarta-commons/jakarta-commons.inc
new file mode 100644
index 0000000..3ee081e
--- /dev/null
+++ b/recipes-core/jakarta-commons/jakarta-commons.inc
@@ -0,0 +1,60 @@
+LICENSE = "AL2.0"
+AUTHOR = "Apache Software Foundation"
+
+inherit java-library
+
+S = "${WORKDIR}/${BP}-src"
+
+# Directory in which the projects sources are located.
+MAINSOURCES = "src/java"
+
+# Directories which should appear in the -sourcepath argument.
+COMPILE_SOURCEPATH = "src/java"
+
+COMPILE_FINDARGS = "-name '*.java'"
+FINDARGS = "-name '*.properties'"
+
+# Directories to be removed after compilation.
+CLEAN_PATH = ""
+
+# Some projects have a replaceable version number in their manifest template.
+do_unpackpost() {
+ if [ -d src/conf ]
+ then
+ find src/conf -exec \
+ sed -i -e "s|@version@|${PV}|" {} \;
+ fi
+}
+
+addtask unpackpost after do_unpack before do_patch
+# Compile step is very similar for Jakarta commons packages
+do_compile() {
+ mkdir -p build
+
+ if [ "${CP}" ]
+ then
+ oe_makeclasspath cp -s ${CP}
+ else
+ cp=.
+ fi
+
+ echo "javac -sourcepath ${COMPILE_SOURCEPATH} -cp $cp -d build \`find ${MAINSOURCES} ${COMPILE_FINDARGS}\`"
+ javac -sourcepath ${COMPILE_SOURCEPATH} -cp $cp -d build `find ${MAINSOURCES} ${COMPILE_FINDARGS}`
+
+ # Copy extraneous files
+ echo "(cd ${MAINSOURCES} && find . ${FINDARGS} -exec cp {} ../../build/{} \;)"
+ (cd ${MAINSOURCES} && find . ${FINDARGS} -exec cp {} ../../build/{} \;)
+
+ # Optionally remove stuff after compilation (needed for sourcepath hacks).
+ if [ ${CLEAN_PATH} ]; then
+ rm -rf ${CLEAN_PATH}
+ fi
+
+ # Some projects have manifest, some have not. This works for both.
+ if [ -f src/conf/MANIFEST.MF ]
+ then
+ fastjar -C build -c -m src/conf/MANIFEST.MF -f ${JARFILENAME} .
+ else
+ fastjar -C build -c -f ${JARFILENAME} .
+ fi
+}
diff --git a/recipes-core/jakarta-libs/avalon-framework-api_4.3.bb b/recipes-core/jakarta-libs/avalon-framework-api_4.3.bb
new file mode 100644
index 0000000..b09c464
--- /dev/null
+++ b/recipes-core/jakarta-libs/avalon-framework-api_4.3.bb
@@ -0,0 +1,34 @@
+DESCRIPTION = "Common way for components to be created, initialized, configured, started. (API-only)"
+AUTHOR = "Apache Software Foundation"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1dece7821bf3fd70fe1309eaa37d52a2"
+
+SRC_URI = " \
+ http://www.apache.org/dist/excalibur/avalon-framework/source/${BP}-src.tar.gz;name=archive \
+ http://www.apache.org/dist/avalon/logkit/source/logkit-1.2.2-src.tar.gz;name=logkit \
+ "
+
+inherit java-library
+
+do_compile() {
+ mkdir -p build
+
+ # Allow reaching method definitions from logkit (stupid cyclic dependency).
+ srcpath=src/java:${WORKDIR}/logkit-1.2.2-dev/src/java
+
+ javac -sourcepath $srcpath -d build `find src/java -name "*.java"`
+
+ # Remove classes that belong to logkit ...
+ rm -rf ${S}/build/org/apache/log
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+
+SRC_URI[archive.md5sum] = "d4cffb4ba1d07bdc517ac6e322636495"
+SRC_URI[archive.sha256sum] = "a4d56a053609ddfc77f6a42c3f15a11708d5e0eb29ffc60a40b87e4cc7331d47"
+SRC_URI[logkit.md5sum] = "996ee20d6b5785ab71f4692f64d10f9c"
+SRC_URI[logkit.sha256sum] = "2c81edc87571fbd05797da7f65515e089c62cbb735bdbd10f93e29bd3aa3ddb8"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/jakarta-libs/bsf_2.4.0.bb b/recipes-core/jakarta-libs/bsf_2.4.0.bb
new file mode 100644
index 0000000..2ed56c5
--- /dev/null
+++ b/recipes-core/jakarta-libs/bsf_2.4.0.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "Bean Scripting Framework package"
+AUTHOR = "Apache Software Foundation"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b1e01b26bacfc2232046c90a330332b3"
+
+SRC_URI = "http://archive.apache.org/dist/jakarta/bsf/source/bsf-src-${PV}.tar.gz"
+
+inherit java-library
+
+DEPENDS = "jacl commons-logging rhino xalan-j bcel"
+DEPENDS_virtclass-native = "jacl-native commons-logging-native rhino-native xalan-j-native bcel-native"
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s commons-logging jacl rhino bcel xalan2
+
+ # Remove netrexx and jython support
+ rm -Rf src/org/apache/bsf/engines/netrexx
+ rm -Rf src/org/apache/bsf/engines/jython
+
+ javac -sourcepath src -cp $cp -d build `find src -name "*.java"`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+
+SRC_URI[md5sum] = "7e58b2a009c0f70ab36bbef420b25c07"
+SRC_URI[sha256sum] = "5ab58cf5738c144f4d85a4a442c2f33be2c4c502dca6e29e0c570c2a51ae6ae9"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/jakarta-libs/log4j1.2_1.2.15.bb b/recipes-core/jakarta-libs/log4j1.2_1.2.15.bb
new file mode 100644
index 0000000..ab62176
--- /dev/null
+++ b/recipes-core/jakarta-libs/log4j1.2_1.2.15.bb
@@ -0,0 +1,37 @@
+DESCRIPTION = "Java library to help the programmer output log statements to a variety of output targets"
+AUTHOR = "Apache Software Foundation"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f4ce41a6d1028498fcacde12f589bce7"
+
+SRC_URI = "http://archive.apache.org/dist/logging/log4j/${PV}/apache-log4j-${PV}.tar.gz"
+
+inherit java-library
+
+S = "${WORKDIR}/apache-log4j-${PV}"
+
+DEPENDS = "gnumail gnujaf"
+DEPENDS_virtclass-native = "gnumail-native gnujaf-native"
+
+
+JARFILENAME = "log4j-${PV}.jar"
+ALTJARFILENAMES = "log4j-1.2.jar log4j1.2.jar"
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s activation gnumail
+
+ # Built everything but the JMS and JMX classes (like in Debian)
+ javac -sourcepath src/main/java -cp $cp -d build `find src/main/java -name "*.java" -and -not \( -iwholename "*jms*" -or -iwholename "*jmx*" \)`
+
+ cp -R src/main/resources/* build/
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "10f04abe4d68d5a89e8eb167e4e45e1a"
+SRC_URI[sha256sum] = "f5d9f6aa78b9156ae2de2a32d0f26507d2e73db4993d501db2e79f0bd803ab31"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/jakarta-libs/logkit_1.2.2.bb b/recipes-core/jakarta-libs/logkit_1.2.2.bb
new file mode 100644
index 0000000..f23b037
--- /dev/null
+++ b/recipes-core/jakarta-libs/logkit_1.2.2.bb
@@ -0,0 +1,33 @@
+DESCRIPTION = "Logging toolkit designed for secure performance orientated logging in Java applications"
+AUTHOR = "Apache Software Foundation"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f1a1c8e1996e51c4dbc73e592a2ecf05"
+
+SRC_URI = "http://www.apache.org/dist/avalon/logkit/source/${BP}-src.tar.gz"
+
+inherit java-library
+
+S = "${WORKDIR}/${BP}-dev"
+
+DEPENDS = "oro servlet2.3 gnumail gnujaf log4j1.2 avalon-framework-api"
+DEPENDS_virtclass-native = "oro-native servlet2.3-native gnumail-native gnujaf-native log4j1.2-native avalon-framework-api-native"
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s oro servlet-2.3 activation gnumail log4j-1.2 avalon-framework-api
+
+ # Built everything but the JMS and JMX classes (like in Debian)
+ javac -encoding ISO8859-1 -sourcepath src/java -cp $cp -d build \
+ `find src/java -name \*.java -and -not \( -iwholename "*jms*" -or -wholename "*test*" \)`
+
+ (cd src/java && find . -name "*.properties" -exec cp {} ../../build/{} \;)
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "996ee20d6b5785ab71f4692f64d10f9c"
+SRC_URI[sha256sum] = "2c81edc87571fbd05797da7f65515e089c62cbb735bdbd10f93e29bd3aa3ddb8"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/jakarta-libs/oro_2.0.8.bb b/recipes-core/jakarta-libs/oro_2.0.8.bb
new file mode 100644
index 0000000..fa32ca5
--- /dev/null
+++ b/recipes-core/jakarta-libs/oro_2.0.8.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Perl5-compatible regular expressions library for Java"
+AUTHOR = "Apache Software Foundation"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=372b1e91335021ca74173b2ab4dc97dd"
+
+SRC_URI = "http://www.apache.org/dist/jakarta/oro/source/jakarta-${BP}.tar.gz"
+
+inherit java-library
+
+S = "${WORKDIR}/jakarta-${BP}"
+
+do_compile() {
+ mkdir -p build
+
+ javac -sourcepath src/java -d build `find src/java -name \*.java`
+
+ fastjar -C build -c -f ${JARFILENAME} org
+}
+
+SRC_URI[md5sum] = "6f7690c6ba9750e3cbb8ebd10078a79a"
+SRC_URI[sha256sum] = "4c4f3c7c479994c3ce09f542d4fbdc03eed58a2d7f320d32f2baf238b5b6f566"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/jakarta-libs/poi_3.0.bb b/recipes-core/jakarta-libs/poi_3.0.bb
new file mode 100644
index 0000000..b207bec
--- /dev/null
+++ b/recipes-core/jakarta-libs/poi_3.0.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "Java library for manipulating various file formats based upon Microsoft's OLE 2 Compound Document"
+LICENSE = "AL2.0"
+AUTHOR = "Apache Software Foundation"
+
+SRC_URI = "http://www.apache.org/dist/jakarta/poi/release/src/${BPN}-src-${PV}-FINAL-20070503.tar.gz"
+
+S = "${WORKDIR}/${BPN}-3.0-rc4"
+
+inherit java-library
+
+DEPENDS = "fastjar-native commons-collections3 commons-logging commons-lang commons-beanutils log4j1.2 xalan-j"
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s commons-collections3 commons-logging commons-lang commons-beanutils log4j-1.2 xalan2
+
+ javac -sourcepath src/java -cp $cp -d build \
+ `find src/java -name \*.java`
+
+ (cd src/java && find . -name "*.properties" -exec cp {} ../../build/{} \;)
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "1fb488c4061256197a667f1c480ffc33"
+SRC_URI[sha256sum] = "48a5aabb873d4cc654c95acf6576868d7a8a3ee97e1c6418e1d716698b6efa76"
diff --git a/recipes-core/jakarta-libs/regexp_1.5.bb b/recipes-core/jakarta-libs/regexp_1.5.bb
new file mode 100644
index 0000000..68196d0
--- /dev/null
+++ b/recipes-core/jakarta-libs/regexp_1.5.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Java Regular Expression package"
+AUTHOR = "Apache Software Foundation"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
+
+SRC_URI = "http://archive.apache.org/dist/jakarta/regexp/source/jakarta-${BP}.tar.gz"
+
+inherit java-library
+
+S = "${WORKDIR}/jakarta-${BP}"
+
+do_compile() {
+ mkdir -p build
+
+ javac -sourcepath src/java -d build `find src/java -name \*.java`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "b941b8f4de297827f3211c2cb34af199"
+SRC_URI[sha256sum] = "79e80af8cbeb68ddad75a1aa6244d7acd62176bfd69bcdc0640d11177dcde97d"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/jamvm/files/java-initial b/recipes-core/jamvm/files/java-initial
new file mode 100755
index 0000000..1b27f81
--- /dev/null
+++ b/recipes-core/jamvm/files/java-initial
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Wrapper which (almost) silently restarts the VM in case of segfaults.
+
+error_counter=0;
+error_occured=139
+while [ ${error_counter} -le 50 -a ${error_occured} -eq 139 ]; do
+ echo "Running JamVM-initial: ${@}"
+ jamvm-initial ${1+"$@"}
+ error_occured=$?
+ if [ ${error_occured} -eq 139 ]; then
+ echo "JamVM-initial crashed - silently trying again"
+ error_counter=$(( $error_counter + 1 ))
+ fi
+done
+
+exit ${error_occured}
diff --git a/recipes-core/jamvm/jamvm-initial/jamvm-initial.patch b/recipes-core/jamvm/jamvm-initial/jamvm-initial.patch
new file mode 100644
index 0000000..fb069f8
--- /dev/null
+++ b/recipes-core/jamvm/jamvm-initial/jamvm-initial.patch
@@ -0,0 +1,63 @@
+Index: jamvm-1.4.5/configure.ac
+===================================================================
+--- jamvm-1.4.5.orig/configure.ac
++++ jamvm-1.4.5/configure.ac
+@@ -1,6 +1,6 @@
+ dnl Process this file with autoconf to produce a configure script.
+ AC_INIT(src/jam.c)
+-AM_INIT_AUTOMAKE(jamvm, 1.4.5)
++AM_INIT_AUTOMAKE(jamvm-initial, 1.4.5)
+ AC_CONFIG_HEADERS([src/config.h])
+ AC_PREFIX_DEFAULT(/usr/local/jamvm)
+
+Index: jamvm-1.4.5/lib/Makefile.am
+===================================================================
+--- jamvm-1.4.5.orig/lib/Makefile.am
++++ jamvm-1.4.5/lib/Makefile.am
+@@ -1,4 +1,4 @@
+-@use_zip_yes@ GLIBJ_ZIP = ${with_classpath_install_dir}/share/classpath/glibj.zip
++@use_zip_yes@ GLIBJ_ZIP = ${with_classpath_install_dir}/share/classpath-initial/glibj.zip
+ @use_zip_no@ GLIBJ_ZIP = ${with_classpath_install_dir}/share/classpath/
+
+ SUBDIRS = jamvm java gnu sun
+Index: jamvm-1.4.5/src/dll.c
+===================================================================
+--- jamvm-1.4.5.orig/src/dll.c
++++ jamvm-1.4.5/src/dll.c
+@@ -294,7 +294,7 @@ char *getDllPath() {
+ }
+
+ char *getBootDllPath() {
+- return CLASSPATH_INSTALL_DIR"/lib/classpath";
++ return CLASSPATH_INSTALL_DIR"/lib/classpath-initial";
+ }
+
+ char *getDllName(char *name) {
+Index: jamvm-1.4.5/src/Makefile.am
+===================================================================
+--- jamvm-1.4.5.orig/src/Makefile.am
++++ jamvm-1.4.5/src/Makefile.am
+@@ -2,7 +2,7 @@ SUBDIRS = os
+ DIST_SUBDIRS = os arch
+
+ bin_PROGRAMS = jamvm
+-include_HEADERS = jni.h
++noinst_HEADERS = jni.h
+
+ lib_LTLIBRARIES = libjvm.la
+ noinst_LTLIBRARIES = libcore.la
+Index: jamvm-1.4.5/src/class.c
+===================================================================
+--- jamvm-1.4.5.orig/src/class.c
++++ jamvm-1.4.5/src/class.c
+@@ -1653,8 +1653,8 @@ void scanDirsForJars(char *directories)
+ }
+
+ #ifdef USE_ZIP
+-#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes.zip"
+-#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath/glibj.zip"
++#define JAMVM_CLASSES INSTALL_DIR"/share/jamvm-initial/classes.zip"
++#define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath-initial/glibj.zip"
+ #else
+ #define JAMVM_CLASSES INSTALL_DIR"/share/jamvm/classes"
+ #define CLASSPATH_CLASSES CLASSPATH_INSTALL_DIR"/share/classpath"
diff --git a/recipes-core/jamvm/jamvm-initial/libffi.patch b/recipes-core/jamvm/jamvm-initial/libffi.patch
new file mode 100644
index 0000000..216f03c
--- /dev/null
+++ b/recipes-core/jamvm/jamvm-initial/libffi.patch
@@ -0,0 +1,68 @@
+Index: jamvm-1.4.5/configure.ac
+===================================================================
+--- jamvm-1.4.5.orig/configure.ac 2007-02-05 04:18:05.000000000 +0100
++++ jamvm-1.4.5/configure.ac 2011-11-25 19:34:58.473683844 +0100
+@@ -166,10 +166,25 @@
+ enable_zip=no
+ fi])
+
+-AC_CHECK_LIB(ffi,ffi_call,,
+- [if test "$enable_ffi" != no; then
+- AC_MSG_ERROR(cannot find libffi)
+- fi])
++LIBFFI_FOUND=no
++if test "$enable_ffi" = yes
++then
++PKG_CHECK_MODULES([LIBFFI], [libffi], [LIBFFI_FOUND=yes], [LIBFFI_FOUND=no])
++if test "x${LIBFFI_FOUND}" = xno
++then
++ LIBFFI_FOUND=
++ AC_CHECK_HEADER([ffi.h],[LIBFFI_CFLAGS=],[LIBFFI_FOUND=no])
++ AC_SEARCH_LIBS([ffi_call], [ffi],[LIBFFI_LIBS=-lffi],[LIBFFI_FOUND=no])
++ if test "x${LIBFFI_FOUND}" = xno
++ then
++ AC_MSG_ERROR([Could not find libffi headers - \
++ Instal libffi-devel or libffi-dev.])
++ fi
++fi
++fi
++AC_SUBST(LIBFFI_CFLAGS)
++AC_SUBST(LIBFFI_LIBS)
++
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
+@@ -180,11 +195,6 @@
+ enable_zip=no
+ fi])
+
+-AC_CHECK_HEADER(ffi.h,,
+- [if test "$enable_ffi" != no; then
+- AC_MSG_ERROR(cannot find ffi.h)
+- fi])
+-
+ if test "$enable_zip" != no; then
+ AC_DEFINE([USE_ZIP],1,[use zip])
+ use_zip_yes=
+@@ -197,7 +207,7 @@
+ AC_SUBST(use_zip_yes)
+ AC_SUBST(use_zip_no)
+
+-if test "$enable_ffi" != no; then
++if test "x${LIBFFI_FOUND}" != no; then
+ AC_DEFINE([USE_FFI],1,[use FFI])
+ fi
+
+Index: jamvm-1.4.5/src/Makefile.am
+===================================================================
+--- jamvm-1.4.5.orig/src/Makefile.am 2006-12-25 05:10:18.000000000 +0100
++++ jamvm-1.4.5/src/Makefile.am 2011-11-25 19:35:26.537723112 +0100
+@@ -19,6 +19,7 @@
+
+ jamvm_LDADD = libcore.la
+ libjvm_la_LIBADD = libcore.la
+-libcore_la_LIBADD = os/@os@/@arch@/libnative.la os/@os@/libos.la
++libcore_la_LIBADD = os/@os@/@arch@/libnative.la os/@os@/libos.la $(LIBFFI_LIBS)
++libcore_la_CPPFLAGS = $(LIBFFI_CFLAGS)
+
+ DISTCLEANFILES = arch.h
diff --git a/recipes-core/jamvm/jamvm-initial_1.4.5.bb b/recipes-core/jamvm/jamvm-initial_1.4.5.bb
new file mode 100644
index 0000000..57caa64
--- /dev/null
+++ b/recipes-core/jamvm/jamvm-initial_1.4.5.bb
@@ -0,0 +1,47 @@
+SUMMARY = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
+HOMEPAGE = "http://jamvm.sourceforge.net/"
+LICENSE = "GPL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS = "zlib-native classpath-initial jikes-initial libffi-native"
+
+PROVIDES = "virtual/java-initial"
+
+S = "${WORKDIR}/jamvm-${PV}"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \
+ file://libffi.patch \
+ file://jamvm-initial.patch \
+ file://java-initial \
+ "
+
+# This uses 32 bit arm, so force the instruction set to arm, not thumb
+ARM_INSTRUCTION_SET = "arm"
+
+inherit native autotools
+
+# libdir must be modified so that jamvm-initial and -native
+# do not interfere
+EXTRA_OECONF = "\
+ --with-classpath-install-dir=${prefix} \
+ --program-suffix=-initial \
+ --libdir=${STAGING_LIBDIR}/jamvm-initial \
+ --enable-ffi \
+ "
+
+# jamvm-initial has to run some binaries which need lots of memory.
+CFLAGS += "-DDEFAULT_MAX_HEAP=512*MB"
+
+do_compile() {
+ oe_runmake \
+ JAVAC=jikes-initial \
+ GLIBJ_ZIP=${STAGING_DATADIR_NATIVE}/classpath-initial/glibj.zip
+}
+
+do_install_append() {
+ install -d ${D}${bindir}/
+ install -m 0755 ${WORKDIR}/java-initial ${D}${bindir}/
+}
+
+SRC_URI[md5sum] = "3f538bab6e1c77aed331e5e71f754f5b"
+SRC_URI[sha256sum] = "f329d1c8f42c06b53a3e82763d33900b100b8e9acd7afe02f7583c51253fd6e5"
diff --git a/recipes-core/jamvm/jamvm.inc b/recipes-core/jamvm/jamvm.inc
new file mode 100644
index 0000000..4eab1c1
--- /dev/null
+++ b/recipes-core/jamvm/jamvm.inc
@@ -0,0 +1,47 @@
+DESCRIPTION = "A compact Java Virtual Machine which conforms to the JVM specification version 2."
+HOMEPAGE = "http://jamvm.sourceforge.net/"
+LICENSE = "GPL"
+LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
+
+DEPENDS = "zlib classpath virtual/javac-native libffi"
+DEPENDS_virtclass-native = "zlib-native classpath-native ecj-initial libffi-native"
+
+RDEPENDS_${PN} = "classpath"
+RDEPENDS_${PN}_virtclass-native = ""
+
+PROVIDES_virtclass-native = "virtual/java-native"
+RPROVIDES_${PN} = "java2-runtime"
+RPROVIDES_${PN}_virtclass-native = ""
+
+BBCLASSEXTEND = "native"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/jamvm/jamvm-${PV}.tar.gz \
+ file://jamvm-jni_h-noinst.patch \
+ file://libffi.patch \
+ "
+
+
+inherit java autotools update-alternatives
+
+# This uses 32 bit arm, so force the instruction set to arm, not thumb
+ARM_INSTRUCTION_SET = "arm"
+
+
+EXTRA_OECONF = "--with-classpath-install-dir=${prefix} --libdir=${libdir}/jamvm --enable-ffi"
+
+# Enforce usage of ecj-initial.
+EXTRA_OMAKE_virtclass-native = "JAVAC=${STAGING_BINDIR_NATIVE}/ecj-initial"
+
+do_install_append_virtclass-native() {
+ install -d ${D}${bindir}
+ ln -s ${bindir}/jamvm ${D}${bindir}/java
+}
+
+PRIVATE_LIBS = "libjvm.so"
+
+FILES_${PN} += "${libdir}/jamvm/lib*.so"
+
+ALTERNATIVE_NAME = "java"
+ALTERNATIVE_PATH = "${bindir}/jamvm"
+ALTERNATIVE_PRIORITY = "4"
+
diff --git a/recipes-core/jamvm/jamvm/jamvm-jni_h-noinst.patch b/recipes-core/jamvm/jamvm/jamvm-jni_h-noinst.patch
new file mode 100644
index 0000000..f0884fd
--- /dev/null
+++ b/recipes-core/jamvm/jamvm/jamvm-jni_h-noinst.patch
@@ -0,0 +1,13 @@
+Index: jamvm-1.5.3/src/Makefile.am
+===================================================================
+--- jamvm-1.5.3.orig/src/Makefile.am 2009-09-29 09:29:13.386565473 +0200
++++ jamvm-1.5.3/src/Makefile.am 2009-09-29 09:33:47.702565852 +0200
+@@ -23,7 +23,7 @@
+ DIST_SUBDIRS = os arch interp
+
+ bin_PROGRAMS = jamvm
+-include_HEADERS = jni.h
++noinst_HEADERS = jni.h
+
+ lib_LTLIBRARIES = libjvm.la
+ noinst_LTLIBRARIES = libcore.la
diff --git a/recipes-core/jamvm/jamvm/libffi.patch b/recipes-core/jamvm/jamvm/libffi.patch
new file mode 100644
index 0000000..1f68c5e
--- /dev/null
+++ b/recipes-core/jamvm/jamvm/libffi.patch
@@ -0,0 +1,69 @@
+Index: git/configure.ac
+===================================================================
+--- git.orig/configure.ac 2011-11-18 15:47:15.339088111 +0100
++++ git/configure.ac 2011-11-18 15:47:15.742392674 +0100
+@@ -273,9 +273,24 @@
+ AC_CHECK_LIB(z,inflate,,AC_MSG_ERROR(zlib is missing))
+ fi
+
+-if test "$enable_ffi" != no; then
+- AC_CHECK_LIB(ffi,ffi_call,,AC_MSG_ERROR(libffi is missing))
++LIBFFI_FOUND=no
++if test "$enable_ffi" = yes
++then
++PKG_CHECK_MODULES([LIBFFI], [libffi], [LIBFFI_FOUND=yes], [LIBFFI_FOUND=no])
++if test "x${LIBFFI_FOUND}" = xno
++then
++ LIBFFI_FOUND=
++ AC_CHECK_HEADER([ffi.h],[LIBFFI_CFLAGS=],[LIBFFI_FOUND=no])
++ AC_SEARCH_LIBS([ffi_call], [ffi],[LIBFFI_LIBS=-lffi],[LIBFFI_FOUND=no])
++ if test "x${LIBFFI_FOUND}" = xno
++ then
++ AC_MSG_ERROR([Could not find libffi headers - \
++ Instal libffi-devel or libffi-dev.])
++ fi
++fi
+ fi
++AC_SUBST(LIBFFI_CFLAGS)
++AC_SUBST(LIBFFI_LIBS)
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
+@@ -285,10 +300,6 @@
+ AC_CHECK_HEADER(zlib.h,,AC_MSG_ERROR(zlib.h is missing))
+ fi
+
+-if test "$enable_ffi" != no; then
+- AC_CHECK_HEADER(ffi.h,,AC_MSG_ERROR(ffi.h is missing))
+-fi
+-
+ if test "$enable_zip" != no; then
+ AC_DEFINE([USE_ZIP],1,[use zip])
+ use_zip_yes=
+@@ -302,7 +313,9 @@
+ AC_SUBST(use_zip_no)
+
+ if test "$enable_ffi" != no; then
+- AC_DEFINE([USE_FFI],1,[use FFI])
++ if test "$LIBFFI_FOUND" != no; then
++ AC_DEFINE([USE_FFI],1,[use FFI])
++ fi
+ fi
+
+ if test "$enable_md_stubs" != no; then
+Index: git/src/Makefile.am
+===================================================================
+--- git.orig/src/Makefile.am 2011-11-18 15:47:15.685730049 +0100
++++ git/src/Makefile.am 2011-11-18 15:49:43.881825251 +0100
+@@ -43,8 +43,9 @@
+ jamvm_LDADD = libcore.la
+ libjvm_la_LIBADD = libcore.la
+ libcore_la_LIBADD = interp/libinterp.la os/@os@/@arch@/libnative.la \
+- os/@os@/libos.la classlib/@classlib@/libclasslib.la
++ os/@os@/libos.la classlib/@classlib@/libclasslib.la \
++ $(LIBFFI_LIBS)
+
+-AM_CPPFLAGS = -I$(top_srcdir)/src/interp/engine
++AM_CPPFLAGS = -I$(top_srcdir)/src/interp/engine $(LIBFFI_CFLAGS)
+
+ DISTCLEANFILES = arch.h classlib.h classlib-defs.h classlib-symbol.h
diff --git a/recipes-core/jamvm/jamvm_git.bb b/recipes-core/jamvm/jamvm_git.bb
new file mode 100644
index 0000000..6d06552
--- /dev/null
+++ b/recipes-core/jamvm/jamvm_git.bb
@@ -0,0 +1,15 @@
+# Note: You *must* use this together with classpath-native 0.98.
+# Otherwise it won't work!
+
+require jamvm.inc
+
+SRCREV = "4617da717ecb05654ea5bb9572338061106a414d"
+PV = "0.0+git${SRCPV}"
+
+SRC_URI = "git://git.berlios.de/jamvm;protocol=git \
+ file://jamvm-jni_h-noinst.patch \
+ file://libffi.patch \
+ "
+
+S = "${WORKDIR}/git"
+
diff --git a/recipes-core/jcraft/jsch_0.1.40.bb b/recipes-core/jcraft/jsch_0.1.40.bb
new file mode 100644
index 0000000..afb84d6
--- /dev/null
+++ b/recipes-core/jcraft/jsch_0.1.40.bb
@@ -0,0 +1,31 @@
+DESCRIPTION = "SSH implementation in Java"
+HOMEPAGE = "http://www.jcraft.com/jsch"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=55e3b6a0987ccd0c34530f3df2d206ae"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/jsch/jsch-${PV}.zip"
+
+inherit java-library
+
+DEPENDS = "jzlib"
+DEPENDS_virtclass-native = "jzlib-native"
+
+RDEPENDS_${PN} = "libjzlib-java"
+RDEPENDS_${PN}_virtclass-native = ""
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s jzlib
+
+ javac -sourcepath src -cp $cp -d build `find src -name "*.java"`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "b59cec19a487e95aed68378976b4b566"
+SRC_URI[sha256sum] = "ca9d2ae08fd7a8983fb00d04f0f0c216a985218a5eb364ff9bee73870f28e097"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/jcraft/jzlib_1.0.7.bb b/recipes-core/jcraft/jzlib_1.0.7.bb
new file mode 100644
index 0000000..5eb390c
--- /dev/null
+++ b/recipes-core/jcraft/jzlib_1.0.7.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "zlib implementation in Java"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a2b2e5b95bf768dd5c4ca097c9cde9e9"
+
+HOMEPAGE = "http://www.jcraft.com/jzlib"
+
+SRC_URI = "http://www.jcraft.com/jzlib/jzlib-${PV}.tar.gz"
+
+inherit java-library
+
+do_compile() {
+ mkdir -p build
+
+ javac -sourcepath . -d build `find com -name "*.java"`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "3c52a0afb970e8a1fb2d34f30d330a83"
+SRC_URI[sha256sum] = "20923a3f771a14c58c8cddfff2b589d568aff09f8a931919dc63ddaabb32407a"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/jdepend/jdepend_2.9.bb b/recipes-core/jdepend/jdepend_2.9.bb
new file mode 100644
index 0000000..8c9d444
--- /dev/null
+++ b/recipes-core/jdepend/jdepend_2.9.bb
@@ -0,0 +1,25 @@
+DESCRIPTION = "Design quality metrics generator for each Java"
+
+# see http://www.clarkware.com/software/license.txt
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f5777d32a7709d558c2877d4a6616230"
+
+HOMEPAGE = "http://clarkware.com/software/JDepend.html"
+
+SRC_URI = "http://www.clarkware.com/software/jdepend-${PV}.zip"
+
+inherit java-library
+
+do_compile() {
+ mkdir -p build
+
+ javac -sourcepath src -d build `find src -name "*.java"`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "4e979c0dda766ba1dd719905ca975c7b"
+SRC_URI[sha256sum] = "202de62e2f3d0667cc464720d5897d0ccb29767ec24e0a4d4c5bd6c4d37425a4"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/jikes/files/javac.jikes b/recipes-core/jikes/files/javac.jikes
new file mode 100644
index 0000000..8650d17
--- /dev/null
+++ b/recipes-core/jikes/files/javac.jikes
@@ -0,0 +1,2 @@
+#!/bin/sh
+jikes -bootclasspath /usr/share/classpath/glibj.zip $@
diff --git a/recipes-core/jikes/jikes-initial.bb b/recipes-core/jikes/jikes-initial.bb
new file mode 100644
index 0000000..613cb51
--- /dev/null
+++ b/recipes-core/jikes/jikes-initial.bb
@@ -0,0 +1,24 @@
+SUMMARY = "Initial Java 1.4-compatible (and not higher) compiler"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
+DEPENDS = "jikes-native classpath-initial"
+
+S = "${WORKDIR}"
+
+inherit native
+
+do_configure() {
+ :
+}
+
+do_compile() {
+ echo "#!/bin/sh" > jikes-initial
+ echo "${STAGING_BINDIR_NATIVE}/jikes -bootclasspath ${STAGING_DATADIR_NATIVE}/classpath-initial/glibj.zip \$@" >> jikes-initial
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 jikes-initial ${D}${bindir}
+}
+
+NATIVE_INSTALL_WORKS = "1"
diff --git a/recipes-core/jikes/jikes_1.22.bb b/recipes-core/jikes/jikes_1.22.bb
new file mode 100644
index 0000000..a3b7db3
--- /dev/null
+++ b/recipes-core/jikes/jikes_1.22.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "Java compiler adhering to language and VM specifications"
+HOMEPAGE = "http://jikes.sourceforge.net/"
+PRIORITY = "optional"
+SECTION = "devel"
+LICENSE = "IBM"
+LIC_FILES_CHKSUM = " \
+ file://COPYING;md5=2d52359fd0d8f0c3e371e4cd19b213c0 \
+ file://doc/license.htm;md5=43506e48033a385dc0936f620ae2c745 \
+ "
+SRC_URI = "${SOURCEFORGE_MIRROR}/jikes/jikes-${PV}.tar.bz2"
+
+inherit autotools update-alternatives
+
+BBCLASSEXTEND = "native"
+
+RDEPENDS_${PN} = "classpath"
+PROVIDES_virtclass-native = ""
+RDEPENDS_${PN}_virtclass-native = ""
+
+EXTRA_OECONF = "--disable-fp-emulation --enable-source15"
+
+# configure script incorrectly defines these when cross compiling for ARM
+CXXFLAGS_append_arm += "-UHAVE_64BIT_TYPES -DWORDS_BIGENDIAN=1"
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+ ln -s ${bindir}/jikes ${D}${bindir}/javac.jikes
+}
+
+PROVIDES = "virtual/javac"
+ALTERNATIVE_NAME = "javac"
+ALTERNATIVE_LINK = "/usr/bin/javac"
+ALTERNATIVE_PATH = "${bindir}/javac.jikes"
+
+SRC_URI[md5sum] = "cda958c7fef6b43b803e1d1ef9afcb85"
+SRC_URI[sha256sum] = "0cb02c763bc441349f6d38cacd52adf762302cce3a08e269f1f75f726e6e14e3"
diff --git a/recipes-core/jlex/files/jlex b/recipes-core/jlex/files/jlex
new file mode 100755
index 0000000..7a9e756
--- /dev/null
+++ b/recipes-core/jlex/files/jlex
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cp=OE_STAGING_DATADIR_JAVA/OE_JLEX_JAR
+
+exec OE_STAGING_BINDIR/java -cp $cp JLex.Main "$@"
diff --git a/recipes-core/jlex/jlex_1.2.6.bb b/recipes-core/jlex/jlex_1.2.6.bb
new file mode 100644
index 0000000..e0fe186
--- /dev/null
+++ b/recipes-core/jlex/jlex_1.2.6.bb
@@ -0,0 +1,47 @@
+DESCRIPTION = "Lexical analyzer generator for Java"
+AUTHOR = "Elliot Berk, A. Appel, C. Scott Ananian"
+LICENSE = "JLEX"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
+ "
+
+RDEPENDS_${PN} = "java2-runtime"
+RDEPENDS_${PN}_virtclass-native = ""
+
+inherit java-library
+
+SRC_URI = "http://www.cs.princeton.edu/~appel/modern/java/JLex/Archive/${PV}/Main.java \
+ file://jlex \
+ "
+
+S = "${WORKDIR}"
+
+do_configure() {
+ sed -i \
+ -e "s|OE_STAGING_BINDIR|${bindir}|" \
+ -e "s|OE_STAGING_DATADIR_JAVA|${datadir_java}|" \
+ -e "s|OE_JLEX_JAR|${BP}.jar|" \
+ ${WORKDIR}/jlex
+}
+
+do_compile() {
+ mkdir -p build
+
+ javac -d build Main.java
+
+ fastjar -C build -c -f ${BP}.jar .
+}
+
+do_install_append() {
+ install -d ${D}${bindir}
+ install -m 0755 jlex ${D}${bindir}/
+}
+
+PACKAGES = "${PN}"
+
+FILES_${PN} += "${datadir_java}"
+
+SRC_URI[md5sum] = "fe0cff5db3e2f0f5d67a153cf6c783af"
+SRC_URI[sha256sum] = "aeebaece3b3a53972bb0ba0f810540386c267070ee9dca6ffa43c6ff74a54bd7"
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/junit/junit4_4.3.1.bb b/recipes-core/junit/junit4_4.3.1.bb
new file mode 100644
index 0000000..bed0e42
--- /dev/null
+++ b/recipes-core/junit/junit4_4.3.1.bb
@@ -0,0 +1,29 @@
+DESCRIPTION = "JUnit is a testing framework for Java"
+LICENSE = "CPL"
+AUTHOR = "junit.org"
+HOMEPAGE = "http://www.junit.org"
+
+SRC_URI = "http://downloads.sourceforge.net/junit/junit-${PV}-src.jar"
+
+S = "${WORKDIR}"
+
+inherit java-library
+
+DEPENDS = "fastjar-native"
+
+do_compile() {
+ mkdir -p build
+
+ # Workaround for jamvm.
+ bcp=${STAGING_DATADIR_NATIVE}/classpath/glibj.zip
+
+ javac -source 5.0 -bootclasspath $bcp -sourcepath . -d build `find . -name "*.java"`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "170f9645a41398388e8553b32ff5f630"
+SRC_URI[sha256sum] = "57d1e49ee3fd0dbdc0a68a852925c973af5c30b1725b6aa63bfb42df6f7c3349"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/junit/junit_3.8.2.bb b/recipes-core/junit/junit_3.8.2.bb
new file mode 100644
index 0000000..a628ac4
--- /dev/null
+++ b/recipes-core/junit/junit_3.8.2.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "JUnit is a testing framework for Java"
+AUTHOR = "junit.org"
+HOMEPAGE = "http://www.junit.org"
+LICENSE = "CPL"
+LIC_FILES_CHKSUM = "file://cpl-v10.html;md5=67a4b75d42edcbd82d2878eba913691b"
+
+SRC_URI = "http://downloads.sourceforge.net/junit/junit${PV}.zip"
+
+S = "${WORKDIR}/junit${PV}"
+
+inherit java-library
+
+do_unpackpost() {
+ mkdir -p src
+
+ # Prevent deletion by do_removebinaries.
+ mv src.jar src.zip
+
+ unzip src.zip -d src
+}
+
+addtask unpackpost before do_removebinaries after do_unpack
+
+do_compile() {
+ mkdir -p build
+
+ # Workaround for jamvm.
+ bcp=${STAGING_DATADIR_NATIVE}/classpath/glibj.zip
+
+ javac -bootclasspath $bcp -sourcepath src -d build `find src -name "*.java"`
+
+ fastjar -C build -c -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "9b8963ba2147a64bd5f1574b6fd289cb"
+SRC_URI[sha256sum] = "aae23d20e6f4dc45b4bf0b10fedcbd209c100342a0cafce1aa07d2da6da1f24a"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/llvm/llvm-common.bb b/recipes-core/llvm/llvm-common.bb
new file mode 100644
index 0000000..38ca1ee
--- /dev/null
+++ b/recipes-core/llvm/llvm-common.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "Helper script for OE's llvm support"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
+ "
+
+SRC_URI = "file://llvm-config"
+
+do_install() {
+ install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+ install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/
+}
+
+do_install_virtclass-native() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/llvm-config ${D}${bindir}
+}
+
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/llvm/llvm-common/llvm-config b/recipes-core/llvm/llvm-common/llvm-config
new file mode 100644
index 0000000..a9a416d
--- /dev/null
+++ b/recipes-core/llvm/llvm-common/llvm-config
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Wrapper script for real llvm-config. Simply calls
+
+if [ $WANT_LLVM_RELEASE ]; then
+ exec `dirname $0`/${TARGET_PREFIX}llvm-config$WANT_LLVM_RELEASE ${@}
+else
+ echo "The variable WANT_LLVM_RELEASE is not defined and exported"
+ echo "by your build recipe. Go figure."
+ exit 1
+fi
diff --git a/recipes-core/llvm/llvm.inc b/recipes-core/llvm/llvm.inc
new file mode 100644
index 0000000..a37c790
--- /dev/null
+++ b/recipes-core/llvm/llvm.inc
@@ -0,0 +1,218 @@
+# LLVM does not provide ABI stability between different versions. For this
+# reason OE makes it possible to build and install different llvm versions
+# at the same time.
+#
+# This is true for the normal recipes as well as the native ones.
+#
+# All regular installation directories are prefixed with 'llvm${LLVM_RELEASE}'
+# e.g. "${STAGING_BINDIR}/llvm2.5" or "${STAGING_INCDIR}/llvm2.5"
+#
+# For your program or library that makes use of llvm you do should not need to
+# modify anything as long as it uses the results of various llvm-config
+# invocations. If you need customizations something is wrong and it needs to be
+# fixed (report bug).
+#
+# However the *recipe* for your program/library *must* declare
+# export WANT_LLVM_RELEASE = "<valid version number>"
+# The version number is picked up by a generic wrapper script which just calls
+# the variant of the specified version.
+
+DESCRIPTION = "The Low Level Virtual Machine"
+HOMEPAGE = "http://llvm.org"
+# 3-clause BSD-like
+LICENSE = "University of Illinois/NCSA Open Source License"
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=0ac5f799a2d89477c75b0a378b221855"
+
+DEPENDS = "llvm${LLVM_RELEASE}-native llvm-common"
+DEPENDS_virtclass-native = "llvm-common-native cmake-native perl-native"
+
+
+SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.tgz"
+
+SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch "
+
+S = "${WORKDIR}/llvm-${PV}"
+
+inherit cmake perlnative
+
+# Defines the LLVM supported arches. By now we always build either for ${BUILD}
+# (native) or ${TARGET}. In the future it may make sense to enable all backends
+# for the non-native build. The decision which backends are used is made by
+# the 3rd party program or library that uses llvm anyway.
+LLVM_ARCH = "${@get_llvm_arch(d)}"
+
+# This is used for generating the install directory for the llvm libraries,
+# binaries and headers. It makes side by side installation of those possible.
+LLVM_RELEASE = "${PV}"
+
+# llvm *must* be built out of tree
+OECMAKE_SOURCEPATH = ".."
+OECMAKE_BUILDPATH = "build"
+EXTRA_OECMAKE = "\
+ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm${LLVM_RELEASE}/tblgen \
+ -DLLVM_TARGETS_TO_BUILD=${LLVM_ARCH} \
+ -DCMAKE_LINKER:FILEPATH=${LD} \
+ -DCMAKE_AR:FILEPATH=${AR} \
+ -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \
+ -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \
+ -DCMAKE_RANLIB:FILEPATH=${RANLIB} \
+ -DCMAKE_STRIP:FILEPATH=${STRIP} \
+ -DNM_PATH:FILEPATH=${NM} \
+ -DLLVM_ENABLE_PIC:BOOL=ON \
+ -DLLVM_TARGET_ARCH:STRING=${LLVM_ARCH} \
+ -DLLVM_ENABLE_ASSERTIONS:BOOL=ON \
+ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+"
+# We need to reset this to avoid breakage as we build out of tree
+TOOLCHAIN_OPTIONS = ""
+
+PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}"
+
+PACKAGES_DYNAMIC = "llvm-*"
+
+# the difference to the non-native build is that we do not need
+# to declare the location of the tblgen executable.
+EXTRA_OECMAKE_virtclass-native = "\
+ -DLLVM_TARGETS_TO_BUILD=${LLVM_ARCH} \
+ -DCMAKE_LINKER:FILEPATH=${LD} \
+ -DCMAKE_AR:FILEPATH=${AR} \
+ -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \
+ -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \
+ -DCMAKE_RANLIB:FILEPATH=${RANLIB} \
+ -DCMAKE_STRIP:FILEPATH=${STRIP} \
+ -DNM_PATH:FILEPATH=${NM} \
+"
+
+PACKAGES_virtclass-native = ""
+
+PACKAGES_DYNAMIC_virtclass-native = ""
+
+python populate_packages_prepend () {
+ libllvm_libdir = bb.data.expand('${libdir}/llvm${LLVM_RELEASE}', d)
+
+ do_split_packages(d, libllvm_libdir, '^lib(.*)\.so$', 'libllvm-%s', 'Split package for %s', allow_dirs=True)
+}
+
+FILES_${PN} = ""
+ALLOW_EMPTY_${PN} = "1"
+
+FILES_${PN}-dbg += "${libdir}/llvm${LLVM_RELEASE}/.debug ${bindir}/llvm${LLVM_RELEASE}/.debug"
+
+FILES_${PN}-dev = " \
+ ${includedir} \
+ ${bindir}/* \
+ ${libdir}/llvm${LLVM_RELEASE}/LLVMHello.so \
+ ${libdir}/llvm${LLVM_RELEASE}/BugpointPasses.so \
+ "
+
+do_install() {
+ # Install into a private directory to be able to reorganize the files.
+
+ cd ${OECMAKE_BUILDPATH}
+
+ oe_runmake DESTDIR=${WORKDIR}/llvm-install install
+
+ # Create our custom target directories
+ install -d ${D}${bindir}/llvm${LLVM_RELEASE}
+ install -d ${D}${includedir}/llvm${LLVM_RELEASE}
+ install -d ${D}${libdir}/llvm${LLVM_RELEASE}
+
+ # Move headers into their own directory
+ cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm \
+ ${D}${includedir}/llvm${LLVM_RELEASE}/
+ cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm-c \
+ ${D}${includedir}/llvm${LLVM_RELEASE}/
+
+ find ${WORKDIR}/llvm-install/${prefix}/lib -name "*" -maxdepth 1 -exec \
+ install {} ${D}${libdir}/llvm${LLVM_RELEASE} \;
+
+ # I dont know another way out. Binaries are installed into a special subdir
+ find ${WORKDIR}/llvm-install/${prefix}/bin -name "*" -maxdepth 1 -exec \
+ install {} ${D}${bindir}/llvm${LLVM_RELEASE} \;
+
+ # LLVM does not install this by default.
+ install bin/tblgen ${D}${bindir}/llvm${LLVM_RELEASE}
+
+ # we install it here unmodified for native and none native and overwrite it
+ # later for native case
+ install -d ${D}${bindir}
+ install -m 0755 bin/llvm-config ${D}${bindir}
+
+ # Fix the paths in the config script to make it find the binaries and
+ # library files. Doing so allows 3rd party configure scripts working
+ # unmodified.
+ sed -e's!my.*ABS_RUN_DIR =.*!my $ABS_RUN_DIR = "${STAGING_DIR_TARGET}";!' \
+ -e's!my.*INCLUDEDIR =.*!my $INCLUDEDIR = "${STAGING_INCDIR}/llvm${LLVM_RELEASE}";!' \
+ -e's!my.*LIBDIR.*!my $LIBDIR = "${STAGING_LIBDIR}/llvm${LLVM_RELEASE}";!' \
+ -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \
+ bin/llvm-config > bin/llvm-config${LLVM_RELEASE}
+
+ install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}
+ install -m 0755 bin/llvm-config${LLVM_RELEASE} ${SYSROOT_DESTDIR}${bindir_crossscripts}
+}
+
+do_install_virtclass-native() {
+ # Install into a private directory to be able to reorganize the files.
+
+ cd ${OECMAKE_BUILDPATH}
+
+ oe_runmake DESTDIR=${WORKDIR}/llvm-install install
+
+ # Create our custom target directories
+ install -d ${D}${bindir}/llvm${LLVM_RELEASE}
+ install -d ${D}${includedir}/llvm${LLVM_RELEASE}
+ install -d ${D}${libdir}/llvm${LLVM_RELEASE}
+
+ # Move headers into their own directory
+ cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm \
+ ${D}${includedir}/llvm${LLVM_RELEASE}/
+ cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm-c \
+ ${D}${includedir}/llvm${LLVM_RELEASE}/
+
+ find ${WORKDIR}/llvm-install/${prefix}/lib -name "*" -maxdepth 1 -exec \
+ install {} ${D}${libdir}/llvm${LLVM_RELEASE} \;
+
+ # I dont know another way out. Binaries are installed into a special subdir
+ find ${WORKDIR}/llvm-install/${prefix}/bin -name "*" -maxdepth 1 -exec \
+ install {} ${D}${bindir}/llvm${LLVM_RELEASE} \;
+
+ # LLVM does not install this by default.
+ install bin/tblgen ${D}${bindir}/llvm${LLVM_RELEASE}
+
+ # Fix the paths in the config script to make it find the binaries and
+ # library files. Doing so allows 3rd party configure scripts working
+ # unmodified.
+ sed -e's!my.*ABS_RUN_DIR =.*!my $ABS_RUN_DIR = "${STAGING_DIR_TARGET}";!' \
+ -e's!my.*INCLUDEDIR =.*!my $INCLUDEDIR = "${STAGING_INCDIR}/llvm${LLVM_RELEASE}";!' \
+ -e's!my.*LIBDIR.*!my $LIBDIR = "${STAGING_LIBDIR}/llvm${LLVM_RELEASE}";!' \
+ -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \
+ bin/llvm-config > bin/llvm-config${LLVM_RELEASE}
+
+ install -d ${D}${bindir}
+ install -m 0755 bin/llvm-config${LLVM_RELEASE} ${D}${bindir}
+}
+
+
+# Retrieve the target in a way that is compatible to the arch
+# value in llvm (>= 2.5)
+def get_llvm_arch(d):
+ import bb;
+
+ arch = bb.data.getVar('TARGET_ARCH', d, 1)
+ if arch == "x86_64" or arch == "i486" or arch == "i586" or arch == "i686":
+ arch = "X86"
+ elif arch == "arm":
+ arch = "ARM"
+ elif arch == "mipsel":
+ arch = "Mips"
+ elif arch == "powerpc":
+ arch = "PowerPC"
+ else:
+ oefatal("Your target architecture is not supported by this recipe");
+
+ return arch
+
+
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch b/recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch
new file mode 100644
index 0000000..c3ae494
--- /dev/null
+++ b/recipes-core/llvm/llvm2.9/arm_fenv_uclibc.patch
@@ -0,0 +1,14 @@
+Index: llvm-2.9/include/llvm/Support/FEnv.h
+===================================================================
+--- llvm-2.9.orig/include/llvm/Support/FEnv.h 2010-11-29 20:44:50.000000000 +0100
++++ llvm-2.9/include/llvm/Support/FEnv.h 2011-11-18 18:42:22.580161297 +0100
+@@ -17,6 +17,9 @@
+
+ #include "llvm/Config/config.h"
+ #include <cerrno>
++
++#undef HAVE_FENV_H
++
+ #ifdef HAVE_FENV_H
+ #include <fenv.h>
+ #endif
diff --git a/recipes-core/llvm/llvm2.9_2.9.bb b/recipes-core/llvm/llvm2.9_2.9.bb
new file mode 100644
index 0000000..5e5ca29
--- /dev/null
+++ b/recipes-core/llvm/llvm2.9_2.9.bb
@@ -0,0 +1,25 @@
+require llvm.inc
+
+PARALLEL_MAKE_virtclass-native = ""
+
+EXTRA_OECMAKE = "\
+ -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm${LLVM_RELEASE}/tblgen \
+ -DLLVM_TARGETS_TO_BUILD="X86;${LLVM_ARCH}" \
+ -DCMAKE_LINKER:FILEPATH=${LD} \
+ -DCMAKE_AR:FILEPATH=${AR} \
+ -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \
+ -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \
+ -DCMAKE_RANLIB:FILEPATH=${RANLIB} \
+ -DCMAKE_STRIP:FILEPATH=${STRIP} \
+ -DNM_PATH:FILEPATH=${NM} \
+ -DLLVM_ENABLE_PIC:BOOL=ON \
+ -DLLVM_TARGET_ARCH:STRING=${LLVM_ARCH} \
+ -DLLVM_ENABLE_ASSERTIONS:BOOL=ON \
+ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+"
+
+LLVM_RELEASE = "2.9"
+
+SRC_URI[md5sum] = "793138412d2af2c7c7f54615f8943771"
+SRC_URI[sha256sum] = "661236cfa17428b48cfa9cbb9909f7569c64b8ecd219fd91dbc00e3b557b3779"
diff --git a/recipes-core/openjdk/openjdk-6-common.inc b/recipes-core/openjdk/openjdk-6-common.inc
new file mode 100644
index 0000000..ef1c41d
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6-common.inc
@@ -0,0 +1,518 @@
+DESCRIPTION = "Java runtime based upon the OpenJDK- and Icedtea Project"
+HOMEPAGE = "http://icedtea.classpath.org"
+LICENSE = "GPL with Classpath Exception"
+PRIORITY = "optional"
+SECTION = "libs"
+
+# Name of the icedtea tarball and top-level directory.
+ICEDTEA = "NEEDS TO BE SET"
+
+S = "${WORKDIR}/${ICEDTEA}"
+B = "${S}/build"
+
+INC_PR = "r11"
+
+SRC_URI = "\
+ ${ICEDTEA_URI} \
+ ${OPENJDK_URI} \
+ ${JAXWS_URI} \
+ ${JAF_URI} \
+ ${JAXP_URI} \
+ ${CACAO_URI} \
+ ${OEPATCHES} \
+ ${ICEDTEAPATCHES} \
+ file://jvm.cfg \
+ "
+
+JDKPN = "openjdk-6"
+JDK_DIR = "java-6-openjdk"
+
+PN = "${JDKPN}-jre"
+PROVIDES += "${JDKPN} ${PACKAGES}"
+
+DEPENDS = "giflib libpng jpeg cups \
+ xalan-j xerces-j rhino \
+ freetype libxinerama libxt libxp libxrender libxtst libxi \
+ alsa-lib libffi llvm2.9\
+ ant-native \
+ fastjar-native \
+ icedtea6-native \
+ cacaoh-openjdk-native \
+ zip-native \
+ "
+
+DEPENDS_append_libc-uclibc = " libiconv "
+
+# The OpenJDK build with interpreter optimizations for ARM depends on a binary
+# that generates constants for an assembler source file. There is no other
+# way than to generate this on a pseudo machine. Cross-compiling would not help
+# because structure sizes and/or alignment may differ.
+DEPENDS_append_arm = " qemu-native "
+
+
+# No package should directly depend on this (it should require
+# java2-runtime instead).
+PRIVATE_LIBS = "\
+ libunpack.so libverify.so libjava.so libzip.so libnpt.so \
+ libjava_crw_demo.so libhprof.so libnet.so libnio.so \
+ libmanagement.so libinstrument.so libjsound.so libjsoundalsa.so \
+ libj2pcsc.so libj2pkcs11.so libj2gss.so libmlib_image.so \
+ libawt.so libsplashscreen.so libfreetype.so.6 libfontmanager.so \
+ libjpeg.so liblcms.so librmi.so libjawt.so libjaas_unix.so \
+ libattach.so libjdwp.so libdt_socket.so libhpi.so libjli.so \
+ libmawt.so libjvm.so \
+ libversionCheck.so libcompiledMethodLoad.so libgctest.so \
+ libheapViewer.so libheapTracker.so libminst.so libmtrace.so \
+ libwaiters.so libhprof.so \
+ "
+
+
+inherit java autotools gettext
+
+export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}"
+export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2"
+export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}"
+export CACAO_CONFIGURE_ARGS = "\
+ ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \
+ --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-openjdk-0.99.4"
+
+JAVA_HOME[unexport] = "1"
+
+EXTRA_OECONF = "\
+ --disable-docs \
+ --disable-pulse-java \
+ --disable-plugin \
+ \
+ --with-ecj=${STAGING_BINDIR_NATIVE}/foo \
+ --with-ecj-jar=${STAGING_DATADIR_JAVA_NATIVE}/ecj-bootstrap.jar \
+ --with-java=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/java \
+ --with-javac=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/javac \
+ --with-javah=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/javah \
+ --with-jar=${STAGING_BINDIR_NATIVE}/fastjar \
+ --with-rmic=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/rmic \
+ --with-xalan2-jar=${STAGING_DATADIR_JAVA}/xalan2.jar \
+ --with-xalan2-serializer-jar=${STAGING_DATADIR_JAVA}/serializer.jar \
+ --with-xerces2-jar=${STAGING_DATADIR_JAVA}/xercesImpl.jar \
+ --with-rhino=${STAGING_DATADIR_JAVA}/rhino.jar \
+ --with-openjdk-src-dir=${WORKDIR}/openjdk-src-dir \
+ --with-gcj-home=${WORKDIR}/fake-jdk \
+ --with-parallel-jobs=${JDK_JOBS} \
+ \
+ --with-libgcj-jar=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/jre/lib/rt.jar \
+ \
+ --with-pkgversion=${PV} \
+ --with-cc-for-build=${BUILD_CC} \
+ --enable-zero \
+ --with-additional-vms=shark,cacao \
+ --enable-openjdk-cross-compilation \
+ "
+
+
+# OpenJDK uses slightly different names for certain arches. We need to know
+# this to create some files which are expected by the build.
+def get_jdk_arch(d):
+ import bb
+
+ jdk_arch = bb.data.getVar('TARGET_ARCH', d, 1)
+ if jdk_arch == "x86_64":
+ jdk_arch = "amd64"
+ elif (jdk_arch == "i586" or jdk_arch == "i686"):
+ jdk_arch = "i586"
+
+ return jdk_arch
+
+JDK_ARCH = "${@get_jdk_arch(d)}"
+JDK_HOME = "${libdir_jvm}/${JDK_DIR}"
+
+# OpenJDK supports parallel compilation but uses a plain number for this.
+# In OE we have PARALLEL_MAKE which is the actual option passed to make,
+# e.g. "-j 4".
+def get_jdk_jobs(d):
+ import bb
+
+ pm = bb.data.getVar('PARALLEL_MAKE', d, 1);
+ if not pm:
+ return "1"
+
+ pm = pm.split(" ");
+ if (len(pm) == 2):
+ return pm[1]
+
+ # Whatever found in PARALLEL_MAKE was not suitable.
+ return "1"
+
+JDK_JOBS = "${@get_jdk_jobs(d)}"
+
+# A function that is needed in the Shark builds.
+def get_llvm_configure_arch(d):
+ import bb;
+
+ arch = bb.data.getVar('TARGET_ARCH', d, 1)
+ if arch == "x86_64" or arch == "i486" or arch == "i586" or arch == "i686":
+ arch = "x86"
+ elif arch == "arm":
+ arch = "arm"
+ elif arch == "mipsel":
+ arch = "mips"
+ elif arch == "powerpc":
+ arch = "powerpc"
+ else:
+ oefatal("Your target architecture is not supported by this recipe");
+
+ return arch
+
+# Custom preparation of the sources which:
+# - cleans up the sources
+# - copies the patches into the proper directory
+# - prepares the FakeJDK directory structure
+#DISABLED because of incompatibility with oe stable 2009: do_prepareconfigure () {
+do_configure_prepend() {
+ chmod -R ug+w ${WORKDIR}/openjdk-src-dir
+ (cd ${WORKDIR}/openjdk-src-dir && sh ${S}/fsg.sh)
+
+ # Automatically copy everything that starts with "icedtea" (or "cacao") and ends with
+ # ".patch" into the patches directory.
+ find ${WORKDIR} -maxdepth 1 -name "icedtea*.patch" -exec cp {} ${S}/patches \;
+ find ${WORKDIR} -maxdepth 1 -name "cacao*.patch" -exec cp {} ${S}/patches \;
+
+ # use now the rt.jar from icedtea6-native
+ mkdir -p ${WORKDIR}/fake-jdk/jre/lib
+ ln -sf ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/jre/lib/rt.jar ${WORKDIR}/fake-jdk/jre/lib/rt.jar
+
+ symlinked=false
+ echo "Creating symlinks for fake-jdk"
+ mkdir -p ${WORKDIR}/fake-jdk/include
+ for i in `find ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/include` ;do
+ bn=`basename $i`
+ echo "Symlinking: $bn"
+ ln -sf $i ${WORKDIR}/fake-jdk/include/$bn;
+ symlinked=true
+ done
+
+ # If the symlinks have not been created the built cannot continue. This
+ # can happen if icedtea6-native is not ready at this point. The recipe
+ # should make sure this is not the case but a little sanity checking
+ # in such a complicated build can't be wrong.
+ if [ x$symlinked = xfalse ]
+ then
+ echo"Build b0rken! Have not created any symlinks for fake-jdk!"
+ else
+ echo "fake-jdk setup appears sane."
+ fi
+}
+
+# Note: The following lines only work for OE.dev branch but cause an exception
+# in oe stable's 2009 bitbake. As such the function is prepended to do_configure instead.
+#addtask prepareconfigure after do_patch before do_configure
+# Makes prepareconfigure depend on icedtea6-native having being staged.
+#do_prepareconfigure[depends] += "icedtea6-native:do_populate_sysroot"
+
+
+do_configure_append() {
+ oe_runmake patch-ecj
+}
+
+# Work around broken variable quoting in oe-stable 2009 and provide the variable
+# via the environment which then overrides the erroneous value that was written
+# into '${ICETDEA}/Makefile'.
+# Icedtea's makefile is not compatible to parallelization so we cannot allow
+# passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are
+# parallelizable and we need ${PARALLEL_MAKE} to derive the proper value.
+# The base for this quirk is that GNU Make only considers the last "-j" option.
+EXTRA_OEMAKE = '-j 1 CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"'
+
+EXTRA_OEMAKE += ' \
+ OE_CFLAGS="${TARGET_CFLAGS}" \
+ OE_CPPFLAGS="${TARGET_CPPFLAGS}" \
+ OE_CXXFLAGS="${TARGET_CXXFLAGS}" \
+ OE_LDFLAGS="${TARGET_LDFLAGS}" \
+ ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \
+ '
+
+# Puts an OE specific string into the binary making it possible for the user
+# to know where it comes from (and blame the right people ...).
+DIST_ID = "Built for ${DISTRO}"
+DIST_NAME = "${DISTRO}"
+EXTRA_OEMAKE += 'DIST_NAME="${DIST_NAME}" DIST_ID="${DIST_ID}"'
+
+
+# llvm configure and compiles stuff
+
+export WANT_LLVM_RELEASE = "2.9"
+
+# Provides the target architecture to the configure script.
+export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}"
+
+OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm2.9"
+
+EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"'
+
+
+# Large stack is required at least on x86_64 host, otherwise random segfaults appear:
+QEMU = "qemu-${TARGET_ARCH} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET}"
+
+EXTRA_OEMAKE += 'QEMU="${QEMU}"'
+
+# Name of the directory containing the compiled output
+BUILD_DIR = "build/linux-${JDK_ARCH}"
+
+# The build of OpenJDK is a 3-part process. For better restartability and overrideability they have been split into
+# three functions.
+# 1. compile Hotspot or Cacao (this one is supposed to be implemented according to wanted VM)
+# 2. compile openjdk-ecj (to have libraries as libjvm.so and libjava.so which are needed later)
+# 3. compile openjdk (the final result)
+
+do_compilestepone() {
+ oe_runmake bootstrap-directory-ecj
+
+ # now we need to override the tools.jar to point to the normal jdk's tools.jar
+ rm bootstrap/ecj/lib/tools.jar
+ ln -s ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/lib/tools.jar bootstrap/ecj/lib/tools.jar
+
+ # First build hotspot to get a libjvm.so (to link corba in the icedtea-ecj build)
+ echo "1/3 Building Hotspot"
+ oe_runmake hotspot
+
+ # Remove spurious libarch directory/symlink
+ rm -rf bootstrap/ecj/jre/lib/${JDK_ARCH} || true
+
+ # Provide a symlink to the target arch's libjvm.so (to link against)
+ ln -s `pwd`/openjdk-ecj/${BUILD_DIR}/j2sdk-image/jre/lib/${JDK_ARCH} bootstrap/jdk1.6.0/jre/lib/${JDK_ARCH}
+
+ # fake j2sdk-image
+ rm openjdk-ecj/${BUILD_DIR}/j2sdk-image/include || true
+ cp -ar openjdk-ecj/${BUILD_DIR}/hotspot/import/include openjdk-ecj/${BUILD_DIR}/j2sdk-image/
+ install -d openjdk-ecj/${BUILD_DIR}/j2sdk-image/bin
+}
+addtask compilestepone after do_configure before do_compilesteptwo
+
+# This part can be shared between cacao and hotspot-zero builds.
+do_compilesteptwo() {
+ echo "2/3 Building bootstrap JDK"
+
+ # Now cross-compile bootstrap JDK
+ rm stamps/icedtea-against-ecj.stamp stamps/icedtea-ecj.stamp || true
+ oe_runmake icedtea-against-ecj
+
+ ln -sf ../openjdk-ecj/${BUILD_DIR}/j2sdk-image bootstrap/icedtea
+
+ # Replace all executables with symlinks to their native equivalents.
+ for F in `find ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin -type f`
+ do
+ bf=`basename $F`
+ echo "Creating symlink for:" $bf
+ ln -sf $F bootstrap/icedtea/bin/$bf
+ done
+}
+addtask compilesteptwo after do_compilestepone before do_compile
+
+do_compile() {
+
+ echo "3/3 Building final JDK"
+
+ # Build the final Hotspot + OpenJDK
+ oe_runmake icedtea-against-icedtea \
+}
+
+do_install() {
+ install -d ${D}${libdir_jvm}
+ cp -R ${S}/build/openjdk/${BUILD_DIR}/j2sdk-image ${D}${JDK_HOME}
+
+ chmod u+rw -R ${D}${JDK_HOME}
+
+ # Fix symlink which would point into staging in the binary package.
+ ln -sf ${datadir_java}/rhino.jar ${D}${JDK_HOME}/jre/lib/rhino.jar
+
+ # JRE is a subset of JDK. So to save space and resemble what the BIG distros
+ # do we create symlinks from the JDK binaries to their counterparts in the
+ # JRE folder (which have to exist by that time b/c of dependencies).
+ for F in `find ${D}${JDK_HOME}/jre/bin -type f`
+ do
+ bf=`basename $F`
+ echo "replace:" $bf
+ rm ${D}${JDK_HOME}/bin/$bf
+ ln -s ${JDK_HOME}/jre/bin/$bf ${D}${JDK_HOME}/bin/$bf
+ done
+
+ install -m644 ${WORKDIR}/jvm.cfg ${D}${JDK_HOME}/jre/lib/${JDK_ARCH}/
+}
+
+# Notes about the ideas behind packaging:
+# 1) User should install openjdk-6-jre. This is a provider of 'java2-runtime'.
+# 2) This lets package mgmt install: openjdk-6-java
+# -> openjdk-6-vm-shark|openjdk-6-vm-zero|openjdk-6-vm-cacao -> openjdk-6-common
+#
+# With opkg the zero VM is chosen which is good b/c that is the best known (= compatible)
+# runtime. Installing other runtimes side-by-side is possible. Through jvm.cfg the following
+# order of precedence is enforced: zero, shark, cacao. User can chose a different runtime
+# by adding '-shark' or '-cacao' to the Java command (or by deinstalling an otherwise preferred
+# runtime)
+# 3) All other packages, including -jdk, are optional and not needed for normal Java apps.
+PACKAGES = " \
+ ${JDKPN}-jre \
+ ${JDKPN}-dbg \
+ ${JDKPN}-demo-dbg \
+ ${JDKPN}-demo \
+ ${JDKPN}-source \
+ ${JDKPN}-doc \
+ ${JDKPN}-jdk \
+ ${JDKPN}-java \
+ ${JDKPN}-vm-shark \
+ ${JDKPN}-vm-zero \
+ ${JDKPN}-vm-cacao \
+ ${JDKPN}-common \
+ "
+
+FILES_${JDKPN}-dbg = "\
+ ${JDK_HOME}/bin/.debug \
+ ${JDK_HOME}/lib/.debug \
+ ${JDK_HOME}/jre/bin/.debug \
+ ${JDK_HOME}/jre/lib/.debug \
+ ${JDK_HOME}/jre/lib/${JDK_ARCH}/.debug \
+ ${JDK_HOME}/jre/lib/${JDK_ARCH}/jli/.debug \
+ ${JDK_HOME}/jre/lib/${JDK_ARCH}/native_threads/.debug \
+ ${JDK_HOME}/jre/lib/${JDK_ARCH}/server/.debug \
+ ${JDK_HOME}/jre/lib/${JDK_ARCH}/shark/.debug \
+ ${JDK_HOME}/jre/lib/${JDK_ARCH}/headless/.debug \
+ ${JDK_HOME}/jre/lib/${JDK_ARCH}/xawt/.debug \
+ "
+
+FILES_${JDKPN}-demo = "${JDK_HOME}/demo ${JDK_HOME}/sample"
+RDEPENDS_${JDKPN}-demo = "java2-runtime"
+FILES_${JDKPN}-demo-dbg = "\
+ ${JDK_HOME}/demo/jvmti/gctest/lib/.debug \
+ ${JDK_HOME}/demo/jvmti/heapTracker/lib/.debug \
+ ${JDK_HOME}/demo/jvmti/heapViewer/lib/.debug \
+ ${JDK_HOME}/demo/jvmti/hprof/lib/.debug \
+ ${JDK_HOME}/demo/jvmti/minst/lib/.debug \
+ ${JDK_HOME}/demo/jvmti/mtrace/lib/.debug \
+ ${JDK_HOME}/demo/jvmti/versionCheck/lib/.debug \
+ ${JDK_HOME}/demo/jvmti/waiters/lib/.debug \
+ ${JDK_HOME}/demo/jvmti/compiledMethodLoad/lib/.debug \
+ "
+
+FILES_${JDKPN}-source = "${JDK_HOME}/src.zip"
+
+FILES_${JDKPN}-java = "${JDK_HOME}/jre/bin/java"
+
+FILES_${JDKPN}-vm-zero = "${JDK_HOME}/jre/lib/arm/server/"
+
+FILES_${JDKPN}-vm-shark = "${JDK_HOME}/jre/lib/arm/shark/"
+
+FILES_${JDKPN}-vm-cacao = "${JDK_HOME}/jre/lib/arm/cacao/"
+
+FILES_${JDKPN}-common = "${JDK_HOME}/jre/ASSEMBLY_EXCEPTION \
+ ${JDK_HOME}/jre/THIRD_PARTY_README \
+ ${JDK_HOME}/jre/LICENSE \
+ ${JDK_HOME}/jre/lib \
+ "
+
+FILES_openjdk-6-jre_append = " \
+ ${JDK_HOME}/jre/bin/keytool \
+ ${JDK_HOME}/jre/bin/orbd \
+ ${JDK_HOME}/jre/bin/pack200 \
+ ${JDK_HOME}/jre/bin/rmid \
+ ${JDK_HOME}/jre/bin/rmiregistry \
+ ${JDK_HOME}/jre/bin/servertool \
+ ${JDK_HOME}/jre/bin/tnameserv \
+ ${JDK_HOME}/jre/bin/unpack200 \
+ ${JDK_HOME}/jre/bin/policytool \
+ ${JDK_HOME}/jre/bin/javaws \
+ "
+
+RDEPENDS_${JDKPN}-common = "librhino-java"
+
+RPROVIDES_${JDKPN}-vm-shark = "java2-vm"
+RPROVIDES_${JDKPN}-vm-zero = "java2-vm"
+RPROVIDES_${JDKPN}-vm-cacao = "java2-vm"
+
+RDEPENDS_${JDKPN}-java = "java2-vm"
+
+# For some reason shark and cacao do not automatically depends on -common.
+# So we add that manually.
+RDEPENDS_${JDKPN}-vm-shark = "${JDKPN}-common"
+RDEPENDS_${JDKPN}-vm-cacao = "${JDKPN}-common"
+
+# There is a symlink to a .so but this one is valid.
+INSANE_SKIP_${JDKPN}-vm-shark = "dev-so"
+INSANE_SKIP_${JDKPN}-vm-zero = "dev-so"
+INSANE_SKIP_${JDKPN}-vm-cacao = "dev-so"
+INSANE_SKIP_${JDKPN}-common = "dev-so"
+
+FILES_${JDKPN}-jdk = " \
+ ${JDK_HOME}/bin \
+ ${JDK_HOME}/lib \
+ ${JDK_HOME}/include \
+ "
+RDEPENDS_${JDKPN}-jre = "${JDKPN}-java"
+RPROVIDES_${JDKPN}-jre = "java2-runtime"
+
+RDEPENDS_${JDKPN}-jdk = "${JDKPN}-jre"
+
+FILES_${JDKPN}-doc = "${JDK_HOME}/man"
+
+pkg_postinst_${JDKPN}-vm-shark () {
+ if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then
+ sed -i -e "/\-cacao KNOWN/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ echo "-cacao KNOWN" >> ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ fi
+
+ sed -i -e "/\-shark.*/d" -e "s|\(^\-server*\)|\-shark KNOWN\n\1|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+}
+
+pkg_prerm_${JDKPN}-vm-shark () {
+ sed -i -e "/^\-shark.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then
+ sed -i -e "/\-cacao KNOWN/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ fi
+}
+
+pkg_postinst_${JDKPN}-vm-cacao () {
+ if grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then
+ sed -i -e "/\-cacao.*/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ else
+ sed -i -e "s|^\-cacao.*|\-cacao KNOWN|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ fi
+}
+
+pkg_prerm_${JDKPN}-vm-cacao () {
+ if grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then
+ sed -i -e "/\-cacao.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ echo "-cacao ERROR" >> ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ else
+ sed -i -e "s|^\-cacao.*|\-cacao ERROR|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ fi
+}
+
+pkg_postinst_${JDKPN}-vm-zero () {
+ if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then
+ sed -i -e "/\-cacao KNOWN/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ echo "-cacao KNOWN" >> ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ fi
+
+ sed -i -e "s|^\-server.*|\-server KNOWN|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+}
+
+pkg_prerm_${JDKPN}-vm-zero () {
+ if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then
+ sed -i -e "/\-cacao KNOWN/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+ fi
+
+ sed -i -e "s|^\-server.*|\-server ERROR|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg
+}
+
+pkg_postinst_${JDKPN}-jre () {
+ update-alternatives --install ${bindir}/java java ${JDK_HOME}/jre/bin/java 15
+}
+
+pkg_prerm_${JDKPN}-jre () {
+ update-alternatives --remove java ${JDK_HOME}/jre/bin/java
+}
+
+pkg_postinst_${JDKPN}-jdk () {
+ update-alternatives --install ${bindir}/javac javac ${JDK_HOME}/bin/javac 15
+}
+
+pkg_prerm_${JDKPN}-jdk () {
+ update-alternatives --remove javac ${JDK_HOME}/bin/javac
+}
diff --git a/recipes-core/openjdk/openjdk-6-release-6b18.inc b/recipes-core/openjdk/openjdk-6-release-6b18.inc
new file mode 100644
index 0000000..9619d2d
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6-release-6b18.inc
@@ -0,0 +1,100 @@
+require openjdk-6-common.inc
+
+FILESPATH =. "${FILE_DIRNAME}/openjdk-6:"
+
+EXTRA_OECONF += "\
+ --with-jaxws-drop-zip=${DL_DIR}/jdk6-jaxws-2009_10_27.zip \
+ --with-jaf-drop-zip=${DL_DIR}/jdk6-jaf-2009_10_27.zip \
+ --with-jaxp-drop-zip=${DL_DIR}/jdk6-jaxp-2009_10_13.zip \
+ --with-cacao-src-zip=${DL_DIR}/cacao-0.99.4.tar.gz \
+"
+
+# Force arm mode for now
+ARM_INSTRUCTION_SET_armv4t = "ARM"
+
+ICEDTEA_URI = "http://icedtea.classpath.org/download/source/${ICEDTEA}.tar.gz;name=iced"
+
+OPENJDK_URI = "http://download.java.net/openjdk/jdk6/promoted/b18/openjdk-6-src-b18-16_feb_2010.tar.gz;subdir=openjdk-src-dir;name=openjdk"
+SRC_URI[openjdk.md5sum] = "94db01691ab38f98b7d42b2ebf4d5c0b"
+SRC_URI[openjdk.sha256sum] = "778ea7b323aaa24d3c6e8fe32b8bb0f49040d9e86271859077ada9f9ee3c8ebf"
+
+JAXWS_URI = "http://icedtea.classpath.org/download/source/drops/jdk6-jaxws-2009_10_27.zip;name=jaxws"
+SRC_URI[jaxws.md5sum] = "3ea5728706169498b722b898a1008acf"
+SRC_URI[jaxws.sha256sum] = "155ff3be83c980e197621a2fbf7ee34e8e0f536489351a5865cf0e52206245e2"
+
+JAF_URI = "http://icedtea.classpath.org/download/source/drops/jdk6-jaf-2009_10_27.zip;name=jaf"
+SRC_URI[jaf.md5sum] = "7a50bb540a27cdd0001885630088b758"
+SRC_URI[jaf.sha256sum] = "fdc51476fc6bcc69ea1f099f33e84601a126bfa8b11c8fa11c25dc574345aa9f"
+
+JAXP_URI = "https://icedtea.classpath.org/download/source/drops/jdk6-jaxp-2009_10_13.zip;name=jaxp"
+SRC_URI[jaxp.md5sum] = "a2f7b972124cd776ff71e7754eb9a429"
+SRC_URI[jaxp.sha256sum] = "8714d55de18db48ca9da0ee986202005082f44cf4c215da8683342b70e61792b"
+
+CACAO_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-0.99.4/cacao-0.99.4.tar.gz;name=cacao"
+SRC_URI[cacao.md5sum] = "c5e6525c5212ddbb6026e4a7cde37ca6"
+SRC_URI[cacao.sha256sum] = "c6090c1d2ed3c60acda0076b62563598267be8dab270ce49ee1035002a2510cf"
+
+# Allow overriding this separately
+OEPATCHES = "\
+ file://build-hacks.patch \
+ file://zero-cmpswap-long.patch \
+ file://fix_hotspot_crosscompile.patch \
+ file://mkbc_returncode.patch \
+ file://icedtea-fix-jar-command.patch \
+ file://fix-llvm-libs.patch \
+ file://shark-build-openjdkdir.patch \
+ file://shark-arm-linux-cpu-detection.patch \
+ file://cacao-libtoolize.patch \
+ "
+
+# Allow overriding this separately
+ICEDTEAPATCHES = "\
+ file://icedtea-launcher-stdc++.patch;apply=no \
+ file://icedtea-crosscompile-fix.patch;apply=no \
+ file://icedtea-hostbuildcc.patch;apply=no \
+ file://icedtea-unbreak-float.patch;apply=no \
+ file://icedtea-remove_werror.patch;apply=no \
+ file://cacao-vfp-compat.patch;apply=no \
+ file://cacao-disable-stackbase-check.patch;apply=no \
+ file://icedtea-libnet-renaming.patch;apply=no \
+ file://icedtea-hasgettransfer.patch;apply=no \
+ file://icedtea-llvm_headers.patch;apply=no \
+ "
+
+ICEDTEAPATCHES_append_libc-uclibc = " \
+ file://icedtea-hotspot-isfinte.patch;apply=no \
+ file://icedtea-hotspot-glibc-version.patch;apply=no \
+ file://icedtea-hotspot-loadavg.patch;apply=no \
+ file://icedtea-hotspot-isnanf.patch;apply=no \
+ file://icedtea-jdk-iconv-uclibc.patch;apply=no \
+ file://icedtea-jdk-remove-unused-backtrace.patch;apply=no \
+ file://icedtea-jdk-RTLD_NOLOAD.patch;apply=no \
+ file://icedtea-jdk-unpack-uclibc.patch;apply=no \
+ "
+
+# Allow overriding this separately
+DISTRIBUTION_PATCHES = "\
+ patches/icedtea-launcher-stdc++.patch \
+ patches/icedtea-crosscompile-fix.patch \
+ patches/icedtea-hostbuildcc.patch \
+ patches/icedtea-unbreak-float.patch \
+ patches/icedtea-remove_werror.patch \
+ patches/cacao-vfp-compat.patch \
+ patches/cacao-disable-stackbase-check.patch \
+ patches/icedtea-libnet-renaming.patch \
+ patches/icedtea-hasgettransfer.patch \
+ patches/icedtea-llvm_headers.patch \
+ "
+
+DISTRIBUTION_PATCHES_append_libc-uclibc = "\
+ patches/icedtea-hotspot-isfinte.patch \
+ patches/icedtea-hotspot-isnanf.patch \
+ patches/icedtea-hotspot-glibc-version.patch \
+ patches/icedtea-hotspot-loadavg.patch \
+ patches/icedtea-jdk-iconv-uclibc.patch \
+ patches/icedtea-jdk-remove-unused-backtrace.patch \
+ patches/icedtea-jdk-RTLD_NOLOAD.patch \
+ patches/icedtea-jdk-unpack-uclibc.patch \
+ "
+
+export DISTRIBUTION_PATCHES
diff --git a/recipes-core/openjdk/openjdk-6/build-hacks.patch b/recipes-core/openjdk/openjdk-6/build-hacks.patch
new file mode 100644
index 0000000..02a8300
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/build-hacks.patch
@@ -0,0 +1,31 @@
+Index: icedtea6-1.8/Makefile.am
+===================================================================
+--- icedtea6-1.8.orig/Makefile.am 2010-04-12 23:55:51.754838172 +0200
++++ icedtea6-1.8/Makefile.am 2010-06-16 15:17:10.224708601 +0200
+@@ -477,6 +477,11 @@
+ JAVAC="" \
+ JAVA_HOME="" \
+ JDK_HOME="" \
++ OE_CFLAGS="$(OE_CFLAGS)" \
++ OE_CPPFLAGS="$(OE_CPPFLAGS)" \
++ OE_CXXFLAGS="$(OE_CXXFLAGS)" \
++ OE_LDFLAGS="$(OE_LDFLAGS)" \
++ OE_LAUNCHER_LDFLAGS="$(OE_LAUNCHER_LDFLAGS)" \
+ DISTRIBUTION_ID="$(DIST_ID)" \
+ DERIVATIVE_ID="$(ICEDTEA_NAME) $(PACKAGE_VERSION)$(ICEDTEA_REV)" \
+ DEBUG_CLASSFILES="true" \
+Index: icedtea6-1.8/javac.in
+===================================================================
+--- icedtea6-1.8.orig/javac.in 2010-03-25 15:10:41.714835519 +0100
++++ icedtea6-1.8/javac.in 2010-06-16 15:14:31.205334756 +0200
+@@ -35,7 +35,9 @@
+ elif [ ! -z "@ECJ@" ] ; then
+ @ECJ@ -1.5 -nowarn $bcoption $NEW_ARGS
+ else
++ # Compiling hotspot-tools consumes tons of memory and exceeds any default
++ # limits for jamvm and cacao.
+ CLASSPATH=@ECJ_JAR@${CLASSPATH:+:}$CLASSPATH \
+- @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS
++ @JAVA@ -Xmx1024m org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS
+ fi
+
diff --git a/recipes-core/openjdk/openjdk-6/cacao-disable-stackbase-check.patch b/recipes-core/openjdk/openjdk-6/cacao-disable-stackbase-check.patch
new file mode 100644
index 0000000..d676142
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/cacao-disable-stackbase-check.patch
@@ -0,0 +1,12 @@
+Index: cacao/cacao/src/mm/boehm-gc/os_dep.c
+===================================================================
+--- cacao/cacao/src/mm/boehm-gc/os_dep.c 2009-02-15 16:29:15.000000000 +0100
++++ cacao/cacao/src/mm/boehm-gc/os_dep.c 2009-02-15 16:29:24.000000000 +0100
+@@ -1077,7 +1077,6 @@
+ c = stat_buf[buf_offset++];
+ }
+ close(f);
+- if (result < 0x10000000) ABORT("Absurd stack bottom value");
+ return (ptr_t)result;
+ }
+
diff --git a/recipes-core/openjdk/openjdk-6/cacao-libtoolize.patch b/recipes-core/openjdk/openjdk-6/cacao-libtoolize.patch
new file mode 100644
index 0000000..a153a32
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/cacao-libtoolize.patch
@@ -0,0 +1,18 @@
+Index: icedtea6-1.8.5/Makefile.am
+===================================================================
+--- icedtea6-1.8.5.orig/Makefile.am 2011-02-04 18:29:58.826701224 +0100
++++ icedtea6-1.8.5/Makefile.am 2011-02-04 18:31:53.430016002 +0100
+@@ -1918,10 +1918,13 @@
+ if BUILD_CACAO
+ if !USE_SYSTEM_CACAO
+ cd cacao/cacao && \
++ rm -f libtool && \
++ autoreconf --verbose --install --force --no-recursive && \
+ $(ARCH_PREFIX) ./configure \
+ --host=$(host_alias) \
+ --build=$(build_alias) \
+ --target=$(target_alias) \
++ --with-libtool-sysroot \
+ --prefix=$(abs_top_builddir)/cacao/install \
+ --with-java-runtime-library=openjdk \
+ --with-java-runtime-library-prefix=$(abs_top_builddir)/openjdk \
diff --git a/recipes-core/openjdk/openjdk-6/cacao-vfp-compat.patch b/recipes-core/openjdk/openjdk-6/cacao-vfp-compat.patch
new file mode 100644
index 0000000..09ba984
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/cacao-vfp-compat.patch
@@ -0,0 +1,37 @@
+Index: cacao/cacao/src/vm/jit/arm/codegen.c
+===================================================================
+--- cacao/cacao/src/vm/jit/arm/codegen.c 2008-10-01 16:23:21.439856241 +0200
++++ cacao/cacao/src/vm/jit/arm/codegen.c 2008-10-01 16:41:24.278841537 +0200
+@@ -2353,10 +2353,12 @@
+
+ d = md->returntype.type;
+
+-#if !defined(__SOFTFP__)
++#if !defined(__SOFTFP__) && !defined(__VFP_FP__)
+ /* TODO: this is only a hack, since we use R0/R1 for float
+ return! this depends on gcc; it is independent from
+- our ENABLE_SOFTFLOAT define */
++ our ENABLE_SOFTFLOAT define
++ It is only needed for -mfpu=fpa -mfloat-abi=hard!
++ */
+ if (iptr->opc == ICMD_BUILTIN && d != TYPE_VOID && IS_FLT_DBL_TYPE(d)) {
+ #if 0 && !defined(NDEBUG)
+ dolog("BUILTIN that returns float or double (%s.%s)", m->clazz->name->text, m->name->text);
+@@ -3019,7 +3021,7 @@
+ s1 = (s4) (cd->mcodeptr - cd->mcodebase);
+ M_RECOMPUTE_PV(s1);
+
+-#if !defined(__SOFTFP__)
++#if !defined(__SOFTFP__) && !defined(__VFP_FP__)
+ /* TODO: this is only a hack, since we use R0/R1 for float return! */
+ /* this depends on gcc; it is independent from our ENABLE_SOFTFLOAT define */
+ if (md->returntype.type != TYPE_VOID && IS_FLT_DBL_TYPE(md->returntype.type)) {
+@@ -3030,7 +3032,7 @@
+ /* M_CAST_FLT_TO_INT_TYPED(md->returntype.type, REG_FRESULT, REG_RESULT_TYPED(md->returntype.type)); */
+ if (IS_2_WORD_TYPE(md->returntype.type)) {
+ DCD(0xed2d8102); /* stfd f0, [sp, #-8]! */
+- M_LDRD_UPDATE(REG_RESULT_PACKED, REG_SP, 8);
++ M_LDRD_UPDATE(REG_RESULT_PACKED, REG_SP, 8);
+ } else {
+ DCD(0xed2d0101); /* stfs f0, [sp, #-4]!*/
+ M_LDR_UPDATE(REG_RESULT, REG_SP, 4);
diff --git a/recipes-core/openjdk/openjdk-6/fix-llvm-libs.patch b/recipes-core/openjdk/openjdk-6/fix-llvm-libs.patch
new file mode 100644
index 0000000..7c82daf
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/fix-llvm-libs.patch
@@ -0,0 +1,13 @@
+Index: icedtea6-1.8/configure.ac
+===================================================================
+--- icedtea6-1.8.orig/configure.ac
++++ icedtea6-1.8/configure.ac
+@@ -472,7 +472,7 @@
+ if test "x$LLVM_SHARED_LIB" != x && echo "$flag" | grep -q '^-lLLVM'; then
+ continue
+ fi
+- if echo "$flag" | grep -q '^-l'; then
++ if echo "$flag" | grep -q '^-l\|.so'; then
+ if test "x$LLVM_LIBS" != "x"; then
+ LLVM_LIBS="$LLVM_LIBS "
+ fi
diff --git a/recipes-core/openjdk/openjdk-6/fix_hotspot_crosscompile.patch b/recipes-core/openjdk/openjdk-6/fix_hotspot_crosscompile.patch
new file mode 100644
index 0000000..38fb191
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/fix_hotspot_crosscompile.patch
@@ -0,0 +1,94 @@
+Index: icedtea6-1.8/Makefile.am
+===================================================================
+--- icedtea6-1.8.orig/Makefile.am 2010-06-18 12:31:34.534667003 +0200
++++ icedtea6-1.8/Makefile.am 2010-06-18 12:31:34.714667729 +0200
+@@ -488,6 +488,7 @@
+ DEBUG_BINARIES="true" \
+ ALT_DROPS_DIR="$(abs_top_builddir)/drops" \
+ VERBOSE="$(VERBOSE)" \
++ CC_FOR_BUILD="$(CC_FOR_BUILD)" \
+ ALT_NETX_DIST="$(abs_top_builddir)/netx.build" \
+ ALT_LIVECONNECT_DIST="$(abs_top_builddir)/liveconnect"
+
+Index: icedtea6-1.8/acinclude.m4
+===================================================================
+--- icedtea6-1.8.orig/acinclude.m4 2010-04-10 21:58:40.804836529 +0200
++++ icedtea6-1.8/acinclude.m4 2010-06-18 12:31:34.714667729 +0200
+@@ -900,6 +900,21 @@
+ AC_SUBST(ALT_CACAO_SRC_DIR)
+ ])
+
++AC_DEFUN([AC_CHECK_WITH_CC_FOR_BUILD],
++[
++ AC_MSG_CHECKING(for compiler used for subsidiary programs)
++ AC_ARG_WITH([cc-for-build],
++ [AS_HELP_STRING(--with-cc-for-build,specify the compiler for subsidiary (helper) programs)],
++ [
++ CC_FOR_BUILD="${withval}"
++ ],
++ [
++ CC_FOR_BUILD="\$(CC)"
++ ])
++ AC_MSG_RESULT(${CC_FOR_BUILD})
++ AC_SUBST(CC_FOR_BUILD)
++])
++
+ AC_DEFUN([AC_CHECK_WITH_GCJ],
+ [
+ AC_MSG_CHECKING([whether to compile ecj natively])
+Index: icedtea6-1.8/configure.ac
+===================================================================
+--- icedtea6-1.8.orig/configure.ac 2010-04-12 13:46:18.821086023 +0200
++++ icedtea6-1.8/configure.ac 2010-06-18 12:31:34.724666321 +0200
+@@ -44,6 +44,7 @@
+ IT_CHECK_FOR_MERCURIAL
+ IT_OBTAIN_HG_REVISIONS
+ AC_PATH_TOOL([LSB_RELEASE],[lsb_release])
++AC_CHECK_WITH_CC_FOR_BUILD
+ AC_CHECK_WITH_GCJ
+ AC_CHECK_WITH_HOTSPOT_BUILD
+ AC_PATH_TOOL([LINUX32],[linux32])
+Index: icedtea6-1.8/ports/hotspot/make/linux/makefiles/zeroshark.make
+===================================================================
+--- icedtea6-1.8.orig/ports/hotspot/make/linux/makefiles/zeroshark.make 2010-03-25 15:10:42.061085966 +0100
++++ icedtea6-1.8/ports/hotspot/make/linux/makefiles/zeroshark.make 2010-06-18 12:40:42.834666505 +0200
+@@ -32,6 +32,13 @@
+ Obj_Files += thumb2.o
+
+ CFLAGS += -DHOTSPOT_ASM
++CCFLAGS += -DHOTSPOT_ASM
++
++ifeq ($(CROSS_COMPILATION), true)
++ C_COMPILE_FOR_MKBC = $(CC_FOR_BUILD)
++else
++ C_COMPILE_FOR_MKBC = $(C_COMPILE)
++endif
+
+ %.o: %.S
+ @echo Assembling $<
+@@ -43,20 +50,20 @@
+
+ offsets_arm.s: mkoffsets
+ @echo Generating assembler offsets
+- ./mkoffsets > $@
++ $(QEMU) ./mkoffsets > $@
+
+ bytecodes_arm.s: bytecodes_arm.def mkbc
+ @echo Generatine ARM assembler bytecode sequences
+ $(CC_COMPILE) -E -x c++ - < $< | ./mkbc - $@ $(COMPILE_DONE)
+
+-mkbc: $(GAMMADIR)/tools/mkbc.c
++mkbc: $(GAMMADIR)/tools/mkbc.c
+ @echo Compiling mkbc tool
+- $(CC_COMPILE) -o $@ $< $(COMPILE_DONE)
++ $(C_COMPILE_FOR_MKBC) -o $@ $< $(COMPILE_DONE)
+
+-mkoffsets: asm_helper.cpp
++mkoffsets: asm_helper.cpp
+ @echo Compiling offset generator
+ $(QUIETLY) $(REMOVE_TARGET)
+- $(CC_COMPILE) -DSTATIC_OFFSETS -o $@ $< $(COMPILE_DONE)
++ $(CC_COMPILE) -static -DSTATIC_OFFSETS -o $@ $< $(COMPILE_DONE)
+
+ endif
+
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-crosscompile-fix.patch b/recipes-core/openjdk/openjdk-6/icedtea-crosscompile-fix.patch
new file mode 100644
index 0000000..6ec83bb
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-crosscompile-fix.patch
@@ -0,0 +1,229 @@
+Index: openjdk/jdk/make/sun/awt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/awt/Makefile 2009-01-24 17:54:57.000000000 +0100
++++ openjdk/jdk/make/sun/awt/Makefile 2009-01-24 17:55:07.000000000 +0100
+@@ -509,10 +509,10 @@
+ #
+
+ ifeq ($(PLATFORM), linux)
+-CPPFLAGS += -I$(MOTIF_DIR)/include \
+- -I$(OPENWIN_HOME)/include \
+- -I$(OPENWIN_HOME)/include/X11/extensions \
+- -I$(PLATFORM_SRC)/native/$(PKGDIR)/font
++#CPPFLAGS += -I$(MOTIF_DIR)/include \
++# -I$(OPENWIN_HOME)/include \
++# -I$(OPENWIN_HOME)/include/X11/extensions \
++CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/font
+ endif
+ CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
+ -I$(SHARE_SRC)/native/$(PKGDIR)/../font \
+@@ -536,7 +536,7 @@
+ $(EVENT_MODEL)
+
+ ifeq ($(PLATFORM), linux)
+-LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
++#LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB)
+ endif
+
+ LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \
+Index: openjdk/jdk/make/sun/awt/mawt.gmk
+===================================================================
+--- openjdk.orig/jdk/make/sun/awt/mawt.gmk 2009-01-24 17:54:57.000000000 +0100
++++ openjdk/jdk/make/sun/awt/mawt.gmk 2009-01-24 17:55:07.000000000 +0100
+@@ -194,8 +194,8 @@
+ CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+
+ ifndef HEADLESS
+-CPPFLAGS += -I$(OPENWIN_HOME)/include
+-LDFLAGS += -L$(OPENWIN_LIB)
++#CPPFLAGS += -I$(OPENWIN_HOME)/include
++#LDFLAGS += -L$(OPENWIN_LIB)
+
+ endif # !HEADLESS
+
+@@ -223,8 +223,8 @@
+
+ ifeq ($(PLATFORM), linux)
+ # Checking for the X11/extensions headers at the additional location
+- CPPFLAGS += -I/X11R6/include/X11/extensions \
+- -I/usr/include/X11/extensions
++# CPPFLAGS += -I/X11R6/include/X11/extensions \
++# -I/usr/include/X11/extensions
+ endif
+
+ ifeq ($(PLATFORM), solaris)
+Index: openjdk/jdk/make/sun/xawt/Makefile
+===================================================================
+--- openjdk.orig/jdk/make/sun/xawt/Makefile 2009-01-24 17:54:57.000000000 +0100
++++ openjdk/jdk/make/sun/xawt/Makefile 2009-01-24 17:55:07.000000000 +0100
+@@ -123,11 +123,12 @@
+ -I$(PLATFORM_SRC)/native/sun/awt
+
+ ifeq ($(PLATFORM), linux)
++# Very unsuitable for cross-compilation.
+ # Allows for builds on Debian GNU Linux, X11 is in a different place
+- CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
+- -I/usr/include/X11/extensions \
+- -I$(MOTIF_DIR)/include \
+- -I$(OPENWIN_HOME)/include
++# CPPFLAGS += -I/usr/X11R6/include/X11/extensions \
++# -I/usr/include/X11/extensions \
++# -I$(MOTIF_DIR)/include \
++# -I$(OPENWIN_HOME)/include
+ endif
+
+ ifeq ($(PLATFORM), solaris)
+Index: openjdk/hotspot/make/linux/makefiles/vm.make
+===================================================================
+--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2009-01-24 17:54:57.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/vm.make 2009-01-24 17:55:07.000000000 +0100
+@@ -170,6 +170,7 @@
+ LIBS_VM += $(LLVM_LIBS)
+ endif
+
++LFLAGS_VM += $(OE_LDFLAGS)
+ LINK_VM = $(LINK_LIB.c)
+
+ # rule for building precompiled header
+Index: openjdk/hotspot/make/linux/makefiles/buildtree.make
+===================================================================
+--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make 2009-01-24 17:54:57.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make 2009-01-24 17:55:07.000000000 +0100
+@@ -343,7 +343,7 @@
+ echo "rm -f Queens.class"; \
+ echo "\$${JAVA_HOME}/bin/javac -d . $(GAMMADIR)/make/test/Queens.java"; \
+ echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \
+- echo './$${gamma:-gamma} $(TESTFLAGS) Queens < /dev/null'; \
++ echo 'echo Silently skipping the execution of the gamma program'; \
+ ) > $@
+ $(QUIETLY) chmod +x $@
+
+Index: openjdk/corba/make/common/Defs-linux.gmk
+===================================================================
+--- openjdk.orig/corba/make/common/Defs-linux.gmk 2009-01-24 17:54:57.000000000 +0100
++++ openjdk/corba/make/common/Defs-linux.gmk 2009-01-24 17:55:07.000000000 +0100
+@@ -82,9 +82,9 @@
+ CC_NO_OPT =
+
+ ifeq ($(PRODUCT), java)
+- _OPT = $(CC_HIGHER_OPT)
++ _OPT = $(OE_CFLAGS)
+ else
+- _OPT = $(CC_LOWER_OPT)
++ _OPT = $(OE_CFLAGS)
+ CPPFLAGS_DBG += -DLOGGING
+ endif
+
+@@ -94,7 +94,7 @@
+ # as the default.
+ CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN
+ CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+-CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN
++CFLAGS_REQUIRED_arm += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+ CFLAGS_REQUIRED_hppa +=
+ CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+ CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+@@ -221,7 +221,7 @@
+ #
+ # -L paths for finding and -ljava
+ #
+-LDFLAGS_OPT = -Xlinker -O1
++LDFLAGS_OPT = $(OE_LDFLAGS)
+ LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
+ LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
+
+Index: openjdk/jdk/make/common/Defs-linux.gmk
+===================================================================
+--- openjdk.orig/jdk/make/common/Defs-linux.gmk 2009-01-24 17:54:57.000000000 +0100
++++ openjdk/jdk/make/common/Defs-linux.gmk 2009-01-24 17:55:07.000000000 +0100
+@@ -92,9 +92,9 @@
+ CC_NO_OPT =
+
+ ifeq ($(PRODUCT), java)
+- _OPT = $(CC_HIGHER_OPT)
++ _OPT = $(OE_CFLAGS)
+ else
+- _OPT = $(CC_LOWER_OPT)
++ _OPT = $(OE_CFLAGS)
+ CPPFLAGS_DBG += -DLOGGING
+ endif
+
+@@ -104,7 +104,7 @@
+ # as the default.
+ CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN
+ CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+-CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN
++CFLAGS_REQUIRED_arm += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+ CFLAGS_REQUIRED_hppa +=
+ CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+ CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+@@ -231,7 +231,7 @@
+ #
+ # -L paths for finding and -ljava
+ #
+-LDFLAGS_OPT = -Xlinker -O1
++LDFLAGS_OPT = $(OE_LDFLAGS)
+ LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
+ LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
+
+Index: openjdk/hotspot/make/linux/makefiles/gcc.make
+===================================================================
+--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2009-01-24 17:54:57.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2009-01-24 17:55:07.000000000 +0100
+@@ -119,7 +119,7 @@
+ CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
+
+ # The flags to use for an Optimized g++ build
+-OPT_CFLAGS += -O3
++OPT_CFLAGS += $(OE_CFLAGS)
+
+ # Hotspot uses very unstrict aliasing turn this optimization off
+ OPT_CFLAGS += -fno-strict-aliasing
+@@ -148,7 +148,7 @@
+ endif
+
+ # Enable linker optimization
+-LFLAGS += -Xlinker -O1
++LFLAGS += $(OE_LDFLAGS)
+
+ # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
+ MAPFLAG = -Xlinker --version-script=FILENAME
+Index: openjdk/hotspot/make/linux/makefiles/launcher.make
+===================================================================
+--- openjdk.orig/hotspot/make/linux/makefiles/launcher.make 2009-01-24 17:55:19.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/launcher.make 2009-01-24 17:56:05.000000000 +0100
+@@ -44,7 +44,7 @@
+ LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
+ else
+ LAUNCHER.o = launcher.o
+- LFLAGS_LAUNCHER += -L `pwd`
++ LFLAGS_LAUNCHER += -L `pwd` $(OE_LAUNCHER_LDFLAGS) $(OE_LDFLAGS)
+ LIBS_LAUNCHER += -l$(JVM) $(LIBS) -lstdc++
+ endif
+
+Index: icedtea6-1.8.5/build/openjdk/jdk/make/sun/xawt/Makefile
+===================================================================
+--- openjdk/jdk/make/sun/xawt/Makefile 2011-03-14 14:17:03.926207269 +0100
++++ openjdk/jdk/make/sun/xawt/Makefile 2011-03-14 14:30:11.956186631 +0100
+@@ -245,7 +245,7 @@
+ $(CHMOD) +w $@;\
+ else \
+ $(ECHO) GENERATING $@; \
+- $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
++ $(QEMU) $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
+ fi
+ @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
+ $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+Index: openjdk/hotspot/make/linux/makefiles/jsig.make
+===================================================================
+--- openjdk/hotspot/make/linux/makefiles/jsig.make 2010-02-17 04:11:04.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/jsig.make 2011-11-18 22:56:03.923900991 +0100
+@@ -39,7 +39,7 @@
+ # cause problems with interposing. See CR: 6466665
+ # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
+
+-LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT
++LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(OE_LDFLAGS)
+
+ # DEBUG_BINARIES overrides everything, use full -g debug information
+ ifeq ($(DEBUG_BINARIES), true)
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-fix-jar-command.patch b/recipes-core/openjdk/openjdk-6/icedtea-fix-jar-command.patch
new file mode 100644
index 0000000..59d806d
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-fix-jar-command.patch
@@ -0,0 +1,13 @@
+Index: icedtea6-1.8/Makefile.am
+===================================================================
+--- icedtea6-1.8.orig/Makefile.am 2010-06-17 10:29:13.654666801 +0200
++++ icedtea6-1.8/Makefile.am 2010-06-17 10:30:50.334670771 +0200
+@@ -1750,7 +1745,7 @@
+ 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))
++ (cd rhino/rhino.old ; $(ICEDTEA_BOOT_DIR)/bin/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 \
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-hasgettransfer.patch b/recipes-core/openjdk/openjdk-6/icedtea-hasgettransfer.patch
new file mode 100644
index 0000000..01dcb82
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-hasgettransfer.patch
@@ -0,0 +1,131 @@
+Index: openjdk/jdk/src/share/classes/javax/swing/HasGetTransferHandler.java
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ openjdk/jdk/src/share/classes/javax/swing/HasGetTransferHandler.java 2011-11-18 20:44:00.281649848 +0100
+@@ -0,0 +1,38 @@
++/*
++ * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation. Sun designates this
++ * particular file as subject to the "Classpath" exception as provided
++ * by Sun in the LICENSE file that accompanied this code.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ *
++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
++ * CA 95054 USA or visit www.sun.com if you need additional information or
++ * have any questions.
++ */
++package javax.swing;
++
++/**
++ * An interface to tag things with a {@code getTransferHandler} method.
++ */
++interface HasGetTransferHandler {
++
++ /** Returns the {@code TransferHandler}.
++ *
++ * @return The {@code TransferHandler} or {@code null}
++ */
++ public TransferHandler getTransferHandler();
++}
++
+Index: openjdk/jdk/src/share/classes/javax/swing/TransferHandler.java
+===================================================================
+--- openjdk/jdk/src/share/classes/javax/swing/TransferHandler.java 2011-11-18 18:51:22.000000000 +0100
++++ openjdk/jdk/src/share/classes/javax/swing/TransferHandler.java 2011-11-18 20:44:01.628219313 +0100
+@@ -122,18 +122,6 @@
+ public static final int LINK = DnDConstants.ACTION_LINK;
+
+ /**
+- * An interface to tag things with a {@code getTransferHandler} method.
+- */
+- interface HasGetTransferHandler {
+-
+- /** Returns the {@code TransferHandler}.
+- *
+- * @return The {@code TransferHandler} or {@code null}
+- */
+- public TransferHandler getTransferHandler();
+- }
+-
+- /**
+ * Represents a location where dropped data should be inserted.
+ * This is a base class that only encapsulates a point.
+ * Components supporting drop may provide subclasses of this
+diff --git a/jdk/src/share/classes/javax/swing/JApplet.java b/jdk/src/share/classes/javax/swing/JApplet.java
+index 47f792a..72c2cf9 100644
+--- openjdk/jdk/src/share/classes/javax/swing/JApplet.java
++++ openjdk/jdk/src/share/classes/javax/swing/JApplet.java
+@@ -91,7 +91,7 @@ import javax.accessibility.*;
+ */
+ public class JApplet extends Applet implements Accessible,
+ RootPaneContainer,
+- TransferHandler.HasGetTransferHandler
++ HasGetTransferHandler
+ {
+ /**
+ * @see #getRootPane
+diff --git a/jdk/src/share/classes/javax/swing/JComponent.java b/jdk/src/share/classes/javax/swing/JComponent.java
+index 4293a4f..0c0a1dc 100644
+--- openjdk/jdk/src/share/classes/javax/swing/JComponent.java
++++ openjdk/jdk/src/share/classes/javax/swing/JComponent.java
+@@ -171,7 +171,7 @@ import sun.swing.UIClientPropertyKey;
+ * @author Arnaud Weber
+ */
+ public abstract class JComponent extends Container implements Serializable,
+- TransferHandler.HasGetTransferHandler
++ HasGetTransferHandler
+ {
+ /**
+ * @see #getUIClassID
+diff --git a/jdk/src/share/classes/javax/swing/JDialog.java b/jdk/src/share/classes/javax/swing/JDialog.java
+index a0193d1..aeeb243 100644
+--- openjdk/jdk/src/share/classes/javax/swing/JDialog.java
++++ openjdk/jdk/src/share/classes/javax/swing/JDialog.java
+@@ -97,7 +97,7 @@ import javax.accessibility.*;
+ public class JDialog extends Dialog implements WindowConstants,
+ Accessible,
+ RootPaneContainer,
+- TransferHandler.HasGetTransferHandler
++ HasGetTransferHandler
+ {
+ /**
+ * Key into the AppContext, used to check if should provide decorations
+diff --git a/jdk/src/share/classes/javax/swing/JFrame.java b/jdk/src/share/classes/javax/swing/JFrame.java
+index 9910b43..4cb8f58 100644
+--- openjdk/jdk/src/share/classes/javax/swing/JFrame.java
++++ openjdk/jdk/src/share/classes/javax/swing/JFrame.java
+@@ -109,7 +109,7 @@ import javax.accessibility.*;
+ public class JFrame extends Frame implements WindowConstants,
+ Accessible,
+ RootPaneContainer,
+- TransferHandler.HasGetTransferHandler
++ HasGetTransferHandler
+ {
+ /**
+ * The exit application default window close operation. If a window
+diff --git a/jdk/src/share/classes/javax/swing/JWindow.java b/jdk/src/share/classes/javax/swing/JWindow.java
+index c94803c..85bbb57 100644
+--- openjdk/jdk/src/share/classes/javax/swing/JWindow.java
++++ openjdk/jdk/src/share/classes/javax/swing/JWindow.java
+@@ -91,7 +91,7 @@ import javax.accessibility.*;
+ */
+ public class JWindow extends Window implements Accessible,
+ RootPaneContainer,
+- TransferHandler.HasGetTransferHandler
++ HasGetTransferHandler
+ {
+ /**
+ * The <code>JRootPane</code> instance that manages the
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-hostbuildcc.patch b/recipes-core/openjdk/openjdk-6/icedtea-hostbuildcc.patch
new file mode 100644
index 0000000..5f2c98b
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-hostbuildcc.patch
@@ -0,0 +1,12 @@
+Index: openjdk/hotspot/make/linux/makefiles/rules.make
+===================================================================
+--- openjdk/hotspot/make/linux/makefiles/rules.make 2010-02-02 02:22:33.201668748 +0100
++++ openjdk/hotspot/make/linux/makefiles/rules.make 2010-02-02 02:23:08.480415783 +0100
+@@ -39,6 +39,7 @@
+ # $(CC) is the c compiler (cc/gcc), $(CCC) is the c++ compiler (CC/g++).
+ C_COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
+ CC_COMPILE = $(CCC) $(CPPFLAGS) $(CFLAGS)
++CC_HOST_COMPILE = $(BUILD_CC) $(CPPFLAGS) $(CFLAGS)
+
+ AS.S = $(AS) $(ASFLAGS)
+
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-hotspot-glibc-version.patch b/recipes-core/openjdk/openjdk-6/icedtea-hotspot-glibc-version.patch
new file mode 100644
index 0000000..faa90ea
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-hotspot-glibc-version.patch
@@ -0,0 +1,23 @@
+Index: icedtea6-1.8/build/openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+===================================================================
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:22:13.696298239 +0200
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:24:15.308790737 +0200
+@@ -49,7 +49,6 @@
+ # include <string.h>
+ # include <syscall.h>
+ # include <sys/sysinfo.h>
+-# include <gnu/libc-version.h>
+ # include <sys/ipc.h>
+ # include <sys/shm.h>
+ # include <link.h>
+@@ -544,9 +543,7 @@
+ os::Linux::set_glibc_version(str);
+ } else {
+ // _CS_GNU_LIBC_VERSION is not supported, try gnu_get_libc_version()
+- static char _gnu_libc_version[32];
+- jio_snprintf(_gnu_libc_version, sizeof(_gnu_libc_version),
+- "glibc %s %s", gnu_get_libc_version(), gnu_get_libc_release());
++ static char _gnu_libc_version[32] = "2.9";
+ os::Linux::set_glibc_version(_gnu_libc_version);
+ }
+
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-hotspot-isfinte.patch b/recipes-core/openjdk/openjdk-6/icedtea-hotspot-isfinte.patch
new file mode 100644
index 0000000..7c5da59
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-hotspot-isfinte.patch
@@ -0,0 +1,15 @@
+Index: icedtea6-1.8/build/openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
+===================================================================
+--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-09 21:41:28.576131825 +0200
++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-09 21:41:55.555711815 +0200
+@@ -235,8 +235,8 @@
+
+ // Checking for finiteness
+
+-inline int g_isfinite(jfloat f) { return finite(f); }
+-inline int g_isfinite(jdouble f) { return finite(f); }
++inline int g_isfinite(jfloat f) { return isfinite(f); }
++inline int g_isfinite(jdouble f) { return isfinite(f); }
+
+
+ // Wide characters
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-hotspot-isnanf.patch b/recipes-core/openjdk/openjdk-6/icedtea-hotspot-isnanf.patch
new file mode 100644
index 0000000..494e965
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-hotspot-isnanf.patch
@@ -0,0 +1,21 @@
+Index: icedtea6-1.8/build/openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
+===================================================================
+--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-09 21:47:12.695674808 +0200
++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-09 21:48:08.699007491 +0200
+@@ -220,14 +220,14 @@
+ // checking for nanness
+ #ifdef SOLARIS
+ #ifdef SPARC
+-inline int g_isnan(float f) { return isnanf(f); }
++inline int g_isnan(float f) { return __isnanf(f); }
+ #else
+ // isnanf() broken on Intel Solaris use isnand()
+ inline int g_isnan(float f) { return isnand(f); }
+ #endif
+ inline int g_isnan(double f) { return isnand(f); }
+ #elif LINUX
+-inline int g_isnan(float f) { return isnanf(f); }
++inline int g_isnan(float f) { return __isnanf(f); }
+ inline int g_isnan(double f) { return isnan(f); }
+ #else
+ #error "missing platform-specific definition here"
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-hotspot-loadavg.patch b/recipes-core/openjdk/openjdk-6/icedtea-hotspot-loadavg.patch
new file mode 100644
index 0000000..7da41fd
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-hotspot-loadavg.patch
@@ -0,0 +1,28 @@
+Index: icedtea6-1.8/build/openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+===================================================================
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:16:09.406334411 +0200
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:19:38.952152043 +0200
+@@ -4325,7 +4325,22 @@
+ // Linux doesn't yet have a (official) notion of processor sets,
+ // so just return the system wide load average.
+ int os::loadavg(double loadavg[], int nelem) {
+- return ::getloadavg(loadavg, nelem);
++
++ FILE *LOADAVG;
++ double avg[3] = { 0.0, 0.0, 0.0 };
++ int i, res = -1;;
++
++ if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
++ fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]);
++ res = 0;
++ fclose(LOADAVG);
++ }
++
++ for (i = 0; (i < nelem) && (i < 3); i++) {
++ loadavg[i] = avg[i];
++ }
++
++ return res;
+ }
+
+ void os::pause() {
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-jdk-RTLD_NOLOAD.patch b/recipes-core/openjdk/openjdk-6/icedtea-jdk-RTLD_NOLOAD.patch
new file mode 100644
index 0000000..9c70ba1
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-jdk-RTLD_NOLOAD.patch
@@ -0,0 +1,13 @@
+Index: openjdk/jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c
+===================================================================
+--- openjdk/jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2010-06-13 15:18:05.655136951 +0200
++++ openjdk/jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2010-06-13 15:20:29.601377967 +0200
+@@ -51,7 +51,7 @@
+ {
+ const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL);
+ // look up existing handle only, do not load
+- void *hModule = dlopen(libName, RTLD_NOLOAD);
++ void *hModule = dlopen(libName, RTLD_LAZY);
+ dprintf2("-handle for %s: %u\n", libName, hModule);
+ (*env)->ReleaseStringUTFChars(env, jLibName, libName);
+ return (jlong)hModule;
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-jdk-iconv-uclibc.patch b/recipes-core/openjdk/openjdk-6/icedtea-jdk-iconv-uclibc.patch
new file mode 100644
index 0000000..68f8581
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-jdk-iconv-uclibc.patch
@@ -0,0 +1,39 @@
+Index: openjdk/jdk/make/java/npt/Makefile
+===================================================================
+--- openjdk/jdk/make/java/npt/Makefile 2010-06-13 15:11:02.598512448 +0200
++++ openjdk/jdk/make/java/npt/Makefile 2010-06-13 15:11:28.504759286 +0200
+@@ -65,6 +65,8 @@
+ # We don't want to link against -ljava
+ JAVALIB=
+
++LDLIBS += -liconv
++
+ # Add -export options to explicitly spell exported symbols
+ ifeq ($(PLATFORM), windows)
+ OTHER_LCF += -export:nptInitialize -export:nptTerminate
+Index: icedtea6-1.8/openjdk-ecj/jdk/make/java/instrument/Makefile
+===================================================================
+--- openjdk/jdk/make/java/instrument/Makefile 2010-06-13 15:12:14.688505195 +0200
++++ openjdk/jdk/make/java/instrument/Makefile 2010-06-13 15:12:32.641425670 +0200
+@@ -123,6 +123,8 @@
+ # We don't want to link against -ljava
+ JAVALIB=
+
++LDLIBS += -liconv
++
+ #
+ # Add to ambient vpath so we pick up the library files
+ #
+Index: openjdk/jdk/make/sun/splashscreen/Makefile
+===================================================================
+--- openjdk/jdk/make/sun/splashscreen/Makefile 2010-06-13 15:12:48.951840824 +0200
++++ openjdk/jdk/make/sun/splashscreen/Makefile 2010-06-13 15:13:01.191422891 +0200
+@@ -55,6 +55,8 @@
+
+ JAVALIB=
+
++LDLIBS += -liconv
++
+ #
+ # C Flags
+ #
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-jdk-remove-unused-backtrace.patch b/recipes-core/openjdk/openjdk-6/icedtea-jdk-remove-unused-backtrace.patch
new file mode 100644
index 0000000..5423fde
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-jdk-remove-unused-backtrace.patch
@@ -0,0 +1,41 @@
+Index: openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
+===================================================================
+--- openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c 2010-08-05 16:45:56.607257503 +0200
++++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c 2010-08-05 16:47:19.727254686 +0200
+@@ -27,9 +27,6 @@
+ #include <X11/Xutil.h>
+ #include <X11/Xos.h>
+ #include <X11/Xatom.h>
+-#ifdef __linux__
+-#include <execinfo.h>
+-#endif
+
+ #include <jvm.h>
+ #include <jni.h>
+@@ -689,26 +686,6 @@
+ return ret;
+ }
+
+-#ifdef __linux__
+-void print_stack(void)
+-{
+- void *array[10];
+- size_t size;
+- char **strings;
+- size_t i;
+-
+- size = backtrace (array, 10);
+- strings = backtrace_symbols (array, size);
+-
+- fprintf (stderr, "Obtained %zd stack frames.\n", size);
+-
+- for (i = 0; i < size; i++)
+- fprintf (stderr, "%s\n", strings[i]);
+-
+- free (strings);
+-}
+-#endif
+-
+ Window get_xawt_root_shell(JNIEnv *env) {
+ static jclass classXRootWindow = NULL;
+ static jmethodID methodGetXRootWindow = NULL;
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-jdk-unpack-uclibc.patch b/recipes-core/openjdk/openjdk-6/icedtea-jdk-unpack-uclibc.patch
new file mode 100644
index 0000000..40564f0
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-jdk-unpack-uclibc.patch
@@ -0,0 +1,12 @@
+Index: openjdk/jdk/make/com/sun/java/pack/Makefile
+===================================================================
+--- openjdk/jdk/make/com/sun/java/pack/Makefile 2010-06-13 15:25:21.548426411 +0200
++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2010-06-13 15:25:43.858007543 +0200
+@@ -103,6 +103,7 @@
+ OTHER_LDLIBS += $(LIBCXX) -lc
+ # setup the list of libraries to link in...
+ ifeq ($(PLATFORM), linux)
++ OTHER_LDLIBS += -lpthread
+ ifeq ("$(CC_VER_MAJOR)", "3")
+ OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
+ endif
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-launcher-stdc++.patch b/recipes-core/openjdk/openjdk-6/icedtea-launcher-stdc++.patch
new file mode 100644
index 0000000..ee24afa
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-launcher-stdc++.patch
@@ -0,0 +1,13 @@
+Index: openjdk/hotspot/make/linux/makefiles/launcher.make
+===================================================================
+--- openjdk.orig/hotspot/make/linux/makefiles/launcher.make 2009-01-16 17:30:56.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/launcher.make 2009-01-16 17:31:13.000000000 +0100
+@@ -45,7 +45,7 @@
+ else
+ LAUNCHER.o = launcher.o
+ LFLAGS_LAUNCHER += -L `pwd`
+- LIBS_LAUNCHER += -l$(JVM) $(LIBS)
++ LIBS_LAUNCHER += -l$(JVM) $(LIBS) -lstdc++
+ endif
+
+ LINK_LAUNCHER = $(LINK.c)
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-libnet-renaming.patch b/recipes-core/openjdk/openjdk-6/icedtea-libnet-renaming.patch
new file mode 100644
index 0000000..024969d
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-libnet-renaming.patch
@@ -0,0 +1,148 @@
+Index: openjdk/jdk/make/java/net/Makefile
+===================================================================
+--- openjdk/jdk/make/java/net/Makefile 2010-07-05 12:28:58.476625401 +0200
++++ openjdk/jdk/make/java/net/Makefile 2010-07-05 12:29:11.876625138 +0200
+@@ -25,7 +25,7 @@
+
+ BUILDDIR = ../..
+ PACKAGE = java.net
+-LIBRARY = net
++LIBRARY = javanet
+ PRODUCT = sun
+ include $(BUILDDIR)/common/Defs.gmk
+
+Index: openjdk/jdk/make/java/nio/Makefile
+===================================================================
+--- openjdk/jdk/make/java/nio/Makefile 2010-07-05 12:31:27.046626250 +0200
++++ openjdk/jdk/make/java/nio/Makefile 2010-07-05 12:32:06.647874890 +0200
+@@ -139,11 +139,11 @@
+ endif
+ ifeq ($(PLATFORM), linux)
+ COMPILER_WARNINGS_FATAL=true
+-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
++OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -ljavanet -lpthread -ldl
+ endif
+ ifeq ($(PLATFORM), solaris)
+ OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 -ldl \
+- -L$(LIBDIR)/$(LIBARCH) -ljava -lnet
++ -L$(LIBDIR)/$(LIBARCH) -ljava -ljavanet
+ endif # PLATFORM
+
+ #
+Index: openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
+===================================================================
+--- openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2010-07-05 17:40:56.467876415 +0200
++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2010-07-05 17:41:43.326628410 +0200
+@@ -58,7 +58,7 @@
+ */
+ static {
+ java.security.AccessController.doPrivileged(
+- new sun.security.action.LoadLibraryAction("net"));
++ new sun.security.action.LoadLibraryAction("javanet"));
+ }
+
+ /**
+Index: openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java
+===================================================================
+--- openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2010-07-05 17:41:01.027875484 +0200
++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2010-07-05 17:41:56.826626386 +0200
+@@ -74,7 +74,7 @@
+ */
+ static {
+ java.security.AccessController.doPrivileged(
+- new sun.security.action.LoadLibraryAction("net"));
++ new sun.security.action.LoadLibraryAction("javanet"));
+ }
+
+ /**
+Index: openjdk/jdk/src/share/classes/java/net/DatagramPacket.java
+===================================================================
+--- openjdk/jdk/src/share/classes/java/net/DatagramPacket.java 2010-07-05 17:41:02.017875980 +0200
++++ openjdk/jdk/src/share/classes/java/net/DatagramPacket.java 2010-07-05 17:42:06.057875677 +0200
+@@ -47,7 +47,7 @@
+ */
+ static {
+ java.security.AccessController.doPrivileged(
+- new sun.security.action.LoadLibraryAction("net"));
++ new sun.security.action.LoadLibraryAction("javanet"));
+ init();
+ }
+
+Index: openjdk/jdk/src/share/classes/java/net/InetAddress.java
+===================================================================
+--- openjdk/jdk/src/share/classes/java/net/InetAddress.java 2010-07-05 17:41:02.756626429 +0200
++++ openjdk/jdk/src/share/classes/java/net/InetAddress.java 2010-07-05 17:42:15.997875786 +0200
+@@ -230,7 +230,7 @@
+ static {
+ preferIPv6Address = java.security.AccessController.doPrivileged(
+ new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
+- AccessController.doPrivileged(new LoadLibraryAction("net"));
++ AccessController.doPrivileged(new LoadLibraryAction("javanet"));
+ init();
+ }
+
+Index: openjdk/jdk/src/share/classes/java/net/NetworkInterface.java
+===================================================================
+--- openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2010-07-05 17:41:03.547875282 +0200
++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2010-07-05 17:42:22.647875475 +0200
+@@ -52,7 +52,7 @@
+ private boolean virtual = false;
+
+ static {
+- AccessController.doPrivileged(new LoadLibraryAction("net"));
++ AccessController.doPrivileged(new LoadLibraryAction("javanet"));
+ init();
+ }
+
+Index: openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java
+===================================================================
+--- openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2010-07-05 17:41:04.306628153 +0200
++++ openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2010-07-05 17:42:32.666627264 +0200
+@@ -89,7 +89,7 @@
+ }});
+ if (b != null && b.booleanValue()) {
+ java.security.AccessController.doPrivileged(
+- new sun.security.action.LoadLibraryAction("net"));
++ new sun.security.action.LoadLibraryAction("javanet"));
+ hasSystemProxies = init();
+ }
+ }
+Index: henning/bug/com.buglabs.build.oe/tmp/work/armv7a-angstrom-linux-gnueabi/openjdk-6-jre-6b18-1.8-r3.3/openjdk-src-dir/jdk/src/share/classes/sun/nio/ch/Util.java
+===================================================================
+--- openjdk/jdk/src/share/classes/sun/nio/ch/Util.java 2010-07-05 17:41:05.086626745 +0200
++++ openjdk/jdk/src/share/classes/sun/nio/ch/Util.java 2010-07-05 17:42:39.266626410 +0200
+@@ -354,7 +354,7 @@
+ return;
+ loaded = true;
+ java.security.AccessController
+- .doPrivileged(new sun.security.action.LoadLibraryAction("net"));
++ .doPrivileged(new sun.security.action.LoadLibraryAction("javanet"));
+ java.security.AccessController
+ .doPrivileged(new sun.security.action.LoadLibraryAction("nio"));
+ // IOUtil must be initialized; Its native methods are called from
+Index: openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java
+===================================================================
+--- openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2010-07-05 17:41:05.896626691 +0200
++++ openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2010-07-05 17:42:45.606625991 +0200
+@@ -244,7 +244,7 @@
+
+ static {
+ java.security.AccessController.doPrivileged(
+- new sun.security.action.LoadLibraryAction("net"));
++ new sun.security.action.LoadLibraryAction("javanet"));
+ }
+
+ }
+Index: henning/bug/com.buglabs.build.oe/tmp/work/armv7a-angstrom-linux-gnueabi/openjdk-6-jre-6b18-1.8-r3.3/openjdk-src-dir/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
+===================================================================
+--- openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2010-07-05 17:41:06.786627210 +0200
++++ openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2010-07-05 17:42:51.926627747 +0200
+@@ -160,7 +160,7 @@
+
+ static {
+ java.security.AccessController.doPrivileged(
+- new sun.security.action.LoadLibraryAction("net"));
++ new sun.security.action.LoadLibraryAction("javanet"));
+ init0();
+
+ // start the address listener thread
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-llvm_headers.patch b/recipes-core/openjdk/openjdk-6/icedtea-llvm_headers.patch
new file mode 100644
index 0000000..e47ee50
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-llvm_headers.patch
@@ -0,0 +1,29 @@
+Index: openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp
+===================================================================
+--- openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-11-18 20:38:09.000000000 +0100
++++ openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-11-18 21:03:15.781644337 +0100
+@@ -38,7 +38,11 @@
+ #include <llvm/ModuleProvider.h>
+ #endif
+ #include <llvm/Support/IRBuilder.h>
++#if SHARK_LLVM_VERSION >= 29
++#include <llvm/Support/Threading.h>
++#else
+ #include <llvm/System/Threading.h>
++#endif
+ #include <llvm/Target/TargetSelect.h>
+ #include <llvm/Type.h>
+ #include <llvm/ExecutionEngine/JITMemoryManager.h>
+@@ -47,8 +51,12 @@
+ #include <llvm/ExecutionEngine/JIT.h>
+ #include <llvm/ADT/StringMap.h>
+ #include <llvm/Support/Debug.h>
++#if SHARK_LLVM_VERSION >= 29
++#include <llvm/Support/Host.h>
++#else
+ #include <llvm/System/Host.h>
+ #endif
++#endif
+
+ #include <map>
+
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-remove_werror.patch b/recipes-core/openjdk/openjdk-6/icedtea-remove_werror.patch
new file mode 100644
index 0000000..f2ad035
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-remove_werror.patch
@@ -0,0 +1,14 @@
+Index: openjdk/hotspot/make/linux/makefiles/gcc.make
+===================================================================
+--- openjdk/hotspot/make/linux/makefiles/gcc.make 2010-02-02 16:11:35.758533706 +0100
++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2010-02-02 16:11:42.761456458 +0100
+@@ -98,9 +98,6 @@
+ CFLAGS += -pipe
+ endif
+
+-# Compiler warnings are treated as errors
+-WARNINGS_ARE_ERRORS = -Werror
+-
+ # Except for a few acceptable ones
+ # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
+ # conversions which might affect the values. To avoid that, we need to turn
diff --git a/recipes-core/openjdk/openjdk-6/icedtea-unbreak-float.patch b/recipes-core/openjdk/openjdk-6/icedtea-unbreak-float.patch
new file mode 100644
index 0000000..9f875de
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/icedtea-unbreak-float.patch
@@ -0,0 +1,18 @@
+Index: openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h
+===================================================================
+--- openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:49:39.972718207 +0100
++++ openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:50:04.635639302 +0100
+@@ -27,13 +27,11 @@
+
+ #include "jfdlibm.h"
+
+-#ifdef __NEWVALID /* special setup for Sun test regime */
+ #if defined(i386) || defined(i486) || \
+ defined(intel) || defined(x86) || \
+ defined(i86pc) || defined(_M_IA64) || defined(ia64)
+ #define _LITTLE_ENDIAN
+ #endif
+-#endif
+
+ #ifdef _LITTLE_ENDIAN
+ #define __HI(x) *(1+(int*)&x)
diff --git a/recipes-core/openjdk/openjdk-6/jvm.cfg b/recipes-core/openjdk/openjdk-6/jvm.cfg
new file mode 100644
index 0000000..9e008e9
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/jvm.cfg
@@ -0,0 +1,41 @@
+# Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Sun designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Sun in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+#
+# List of JVMs that can be used as an option to java, javac, etc.
+# Order is important -- first in this list is the default JVM.
+# NOTE that this both this file and its format are UNSUPPORTED and
+# WILL GO AWAY in a future release.
+#
+# You may also select a JVM in an arbitrary location with the
+# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
+# and may not be available in a future release.
+#
+-server ERROR
+-client IGNORE
+-hotspot ERROR
+-classic WARN
+-native ERROR
+-green ERROR
+-zero ALIASED_TO -server
+-cacao ERROR
diff --git a/recipes-core/openjdk/openjdk-6/mkbc_returncode.patch b/recipes-core/openjdk/openjdk-6/mkbc_returncode.patch
new file mode 100644
index 0000000..13280b3
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/mkbc_returncode.patch
@@ -0,0 +1,11 @@
+Index: icedtea6/ports/hotspot/tools/mkbc.c
+===================================================================
+--- icedtea6.orig/ports/hotspot/tools/mkbc.c 2010-04-01 12:25:13.791317722 +0200
++++ icedtea6/ports/hotspot/tools/mkbc.c 2010-04-01 12:27:34.151606177 +0200
+@@ -602,4 +602,6 @@
+ if (ferror(bci_f)) fatal("Error writing bci");
+ if (source_f != stdin) fclose(source_f);
+ if (bci_f != stdout) fclose(bci_f);
++
++ return 0;
+ }
diff --git a/recipes-core/openjdk/openjdk-6/shark-arm-linux-cpu-detection.patch b/recipes-core/openjdk/openjdk-6/shark-arm-linux-cpu-detection.patch
new file mode 100644
index 0000000..df9e147
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/shark-arm-linux-cpu-detection.patch
@@ -0,0 +1,113 @@
+Index: icedtea6-1.8/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+===================================================================
+--- icedtea6-1.8.orig/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp 2010-07-14 16:42:48.412103129 +0200
++++ icedtea6-1.8/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp 2010-07-14 16:50:51.680282178 +0200
+@@ -32,6 +32,96 @@
+
+ #if SHARK_LLVM_VERSION >= 27
+ namespace {
++
++#if defined(__arm__) && defined(__linux__)
++#include <fcntl.h>
++#include <linux/auxvec.h>
++#include <asm/hwcap.h>
++#define VECBUFF_SIZE 32
++
++bool TestARMLinuxHWCAP(int feature) {
++ int fd;
++ unsigned vecs[VECBUFF_SIZE];
++ unsigned *p;
++ int i, n;
++ int rc;
++
++ rc = 0;
++ fd = open("/proc/self/auxv", O_RDONLY);
++ if (fd < 0) return 0;
++ do {
++ n = read(fd, vecs, VECBUFF_SIZE * sizeof(unsigned));
++ p = vecs;
++ i = n/8;
++ while (--i >=0) {
++ unsigned tag = *p++;
++ unsigned value = *p++;
++ if (tag == 0) goto fini;
++ if(tag == AT_HWCAP && (value & feature)) {
++ rc = 1;
++ goto fini;
++ }
++ }
++ } while (n == VECBUFF_SIZE * sizeof(unsigned));
++fini:
++ close(fd);
++ return rc;
++}
++
++char* TestARMLinuxAT(int auxvec) {
++ int fd;
++ unsigned vecs[VECBUFF_SIZE];
++ unsigned *p;
++ int i, n;
++ char* rc;
++
++ rc = 0;
++ fd = open("/proc/self/auxv", O_RDONLY);
++ if (fd < 0) return 0;
++ do {
++ n = read(fd, vecs, VECBUFF_SIZE * sizeof(unsigned));
++ p = vecs;
++ i = n/8;
++ while (--i >=0) {
++ unsigned tag = *p++;
++ unsigned value = *p++;
++ if (tag == 0) goto fini;
++ if(tag == (unsigned) auxvec ) {
++ rc = (char*)value;
++ goto fini;
++ }
++ }
++ } while (n == VECBUFF_SIZE * sizeof(unsigned));
++fini:
++ close(fd);
++ return rc;
++}
++
++bool getARMHostCPUFeatures(StringMap<bool> &Features) {
++ // FIXME LLVM PR6561 // Features["neon"]=TestARMLinuxHWCAP(HWCAP_NEON);
++ Features["thumb2"]=TestARMLinuxHWCAP(HWCAP_THUMBEE);
++ Features["vfp2"]=TestARMLinuxHWCAP(HWCAP_VFP);
++
++ std::string testArchKey(TestARMLinuxAT(AT_PLATFORM));
++
++ StringMap<std::string> archLinuxToLLVMMap;
++ archLinuxToLLVMMap["v4l"]="v4t";
++ archLinuxToLLVMMap["v5l"]="v5t";
++ archLinuxToLLVMMap["v6l"]="v6";
++ // FIXME change this from v6 to v7a when LLVM PR7048 have been fixed
++ archLinuxToLLVMMap["v7l"]="v6";
++
++ llvm::StringMapIterator<std::string> resultIterator(archLinuxToLLVMMap.find(
++ testArchKey));
++ if(resultIterator->first()) {
++ std::string arch(resultIterator->second);
++ Features[arch]=true;
++ }
++
++ return true;
++}
++#endif
++
+ cl::opt<std::string>
+ MCPU("mcpu");
+
+@@ -64,7 +154,11 @@
+ #if SHARK_LLVM_VERSION >= 27
+ // Finetune LLVM for the current host CPU.
+ StringMap<bool> Features;
++#if defined(__arm__) && defined(__linux__)
++ bool gotCpuFeatures = getARMHostCPUFeatures(Features);
++#else
+ bool gotCpuFeatures = llvm::sys::getHostCPUFeatures(Features);
++#endif
+ std::string cpu("-mcpu=" + llvm::sys::getHostCPUName());
+
+ std::vector<const char*> args;
diff --git a/recipes-core/openjdk/openjdk-6/shark-build-openjdkdir.patch b/recipes-core/openjdk/openjdk-6/shark-build-openjdkdir.patch
new file mode 100644
index 0000000..4e89967
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/shark-build-openjdkdir.patch
@@ -0,0 +1,13 @@
+Index: icedtea6-1.8/Makefile.am
+===================================================================
+--- icedtea6-1.8.orig/Makefile.am 2010-06-30 11:30:49.526648376 +0200
++++ icedtea6-1.8/Makefile.am 2010-06-30 11:42:02.606648734 +0200
+@@ -1882,7 +1882,7 @@
+ # configure script arguments, quoted in single quotes
+ CONFIGURE_ARGS = @CONFIGURE_ARGS@
+ ADD_ZERO_CONFIGURE_ARGS = \
+- --with-openjdk=$(abs_top_builddir)/$(BUILD_OUTPUT_DIR)/j2sdk-image \
++ --with-openjdk=$(abs_top_builddir)/bootstrap/jdk1.6.0 \
+ --enable-zero
+ if ADD_SHARK_BUILD
+ ADD_ZERO_CONFIGURE_ARGS += \
diff --git a/recipes-core/openjdk/openjdk-6/zero-cmpswap-long.patch b/recipes-core/openjdk/openjdk-6/zero-cmpswap-long.patch
new file mode 100644
index 0000000..ca21ccf
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6/zero-cmpswap-long.patch
@@ -0,0 +1,20 @@
+Index: icedtea6-1.8/ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
+===================================================================
+--- icedtea6-1.8.orig/ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp 2010-06-17 10:26:16.885292426 +0200
++++ icedtea6-1.8/ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp 2010-06-17 10:29:19.034668305 +0200
+@@ -266,7 +266,15 @@
+ volatile jlong* dest,
+ jlong compare_value) {
+
++#ifdef ARM
++ return arm_compare_and_swap((jint *) dest, (jint) compare_value, (jint) exchange_value);
++#else
++#ifdef M68K
++ return m68k_compare_and_swap((jint *) dest, (jint) compare_value, (jint) exchange_value);
++#else
+ return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
++#endif // M68K
++#endif // ARM
+ }
+
+ inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value,
diff --git a/recipes-core/openjdk/openjdk-6_6b18-1.8.11.bb b/recipes-core/openjdk/openjdk-6_6b18-1.8.11.bb
new file mode 100644
index 0000000..c611d31
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6_6b18-1.8.11.bb
@@ -0,0 +1,11 @@
+require openjdk-6-release-6b18.inc
+
+PR = "${INC_PR}.0"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
+
+ICEDTEA = "icedtea6-1.8.11"
+
+SRC_URI[iced.md5sum] = "e0edfb08a4eedf1b9f1cef26a9bd4ab4"
+SRC_URI[iced.sha256sum] = "6eb418ec0609080a71bda16896124d6e1ac23b2f54af52e05fc22c719e12ca29"
+
diff --git a/recipes-core/rhino/rhino/rhino b/recipes-core/rhino/rhino/rhino
new file mode 100644
index 0000000..e2f87f6
--- /dev/null
+++ b/recipes-core/rhino/rhino/rhino
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ ! $JAVA ]; then
+ JAVA=java
+fi
+
+$JAVA -jar /usr/share/java/js.jar $@
+
diff --git a/recipes-core/rhino/rhino/rhino-jsc b/recipes-core/rhino/rhino/rhino-jsc
new file mode 100644
index 0000000..d5f50e8
--- /dev/null
+++ b/recipes-core/rhino/rhino/rhino-jsc
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ ! $JAVA ]; then
+ JAVA=java
+fi
+
+$JAVA -cp .:/usr/share/java/js.jar org.mozilla.javascript.tools.jsc.Main $@
+
diff --git a/recipes-core/rhino/rhino_1.7r2.bb b/recipes-core/rhino/rhino_1.7r2.bb
new file mode 100644
index 0000000..3a3f553
--- /dev/null
+++ b/recipes-core/rhino/rhino_1.7r2.bb
@@ -0,0 +1,46 @@
+DESCRIPTION = "Lexical analyzer generator for Java"
+LICENSE = "GPL MPL"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=b8ba559ba419681dbf8280b6721df0af"
+
+BBCLASSEXTEND = "native"
+
+inherit java-library
+
+SRC_URI = "\
+ ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip \
+ file://rhino \
+ file://rhino-jsc \
+ "
+
+S = "${WORKDIR}/rhino1_7R2"
+
+PACKAGES = "${JPN} rhino"
+
+FILES_${PN} = "${bindir}/rhino ${bindir}/rhino-jsc"
+RDEPENDS_${PN} = "java2-runtime ${JPN}"
+RDEPENDS_${PN}_virtclass-native = ""
+
+do_compile() {
+ mkdir -p build
+
+ # Compatibility fix for jamvm which has non-genericised
+ # java.lang classes. :(
+ bcp_arg="-bootclasspath ${STAGING_DATADIR_NATIVE}/classpath/glibj.zip"
+
+ javac $bcp_arg -source 1.5 -sourcepath src -d build `find src -name "*.java"`
+
+ mkdir -p build/org/mozilla/javascript/resources
+ cp src/org/mozilla/javascript/resources/*.properties build/org/mozilla/javascript/resources
+
+ fastjar -m ${S}/src/manifest -C build -c -f ${JARFILENAME} .
+}
+
+do_install_append() {
+ install -d ${D}${bindir}
+
+ install -m 0755 ${WORKDIR}/rhino ${D}${bindir}
+ install -m 0755 ${WORKDIR}/rhino-jsc ${D}${bindir}
+}
+
+SRC_URI[md5sum] = "40d0a9abec8169e42920214b37fa8e0e"
+SRC_URI[sha256sum] = "677f7dc1b67a1587bc03974d5f0720474a56b8f29835e1d860739908df8462dc"
diff --git a/recipes-core/servlet-api/jsp2.0_5.5.26.bb b/recipes-core/servlet-api/jsp2.0_5.5.26.bb
new file mode 100644
index 0000000..ca94f08
--- /dev/null
+++ b/recipes-core/servlet-api/jsp2.0_5.5.26.bb
@@ -0,0 +1,45 @@
+DESCRIPTION = "Java Server Page (JSP) API 2.0 (from Tomcat 5.5)"
+LICENSE = "AL2.0"
+AUTHOR = "Apache Software Foundation"
+
+SRC_URI = "http://archive.apache.org/dist/tomcat/tomcat-5/v${PV}/src/apache-tomcat-${PV}-src.tar.gz"
+
+S = "${WORKDIR}/apache-tomcat-${PV}-src/servletapi/jsr152"
+
+inherit java-library
+
+DEPENDS = "servlet2.4"
+RDEPENDS_${PN} = "libservlet2.4-java"
+
+# Value of implementation.revision in build.xml
+IMPL_REVISION = "public_draft"
+
+JARFILENAME = "jsp-api-2.0.${IMPL_REVISION}.jar"
+ALTJARFILENAMES = "jsp-api-2.0.jar jsp-api.jar"
+
+do_unpackpost() {
+ sed -i -e "s|@implementation.version@|${IMPL_REVISION}|" src/etc/manifest
+}
+
+addtask unpackpost after do_unpack before do_patch
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s servlet-api-2.4
+ javac -sourcepath src/share -d build -cp $cp `find src/share/javax -name \*.java`
+
+ # Copy extraneous files according to build.xml's compile task
+ (cd src/share && find . -name "*.properties" -exec cp {} ../../build/{} \;)
+
+ mkdir -p build/javax/servlet/jsp/resources
+ cp src/share/dtd/jsp*.dtd build/javax/servlet/jsp/resources
+ cp src/share/dtd/jsp*.xsd build/javax/servlet/jsp/resources
+ cp src/share/dtd/web-jsp*.dtd build/javax/servlet/jsp/resources
+ cp src/share/dtd/web-jsp*.xsd build/javax/servlet/jsp/resources
+
+ fastjar -C build -c -m src/etc/manifest -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "642b6526354cb18c5b5d77ebef8109ae"
+SRC_URI[sha256sum] = "ddc677d7391c438e6102d0b3e9653eaca661344ef74b0260c1f488340d660395"
diff --git a/recipes-core/servlet-api/servlet2.3_4.1.37.bb b/recipes-core/servlet-api/servlet2.3_4.1.37.bb
new file mode 100644
index 0000000..ecdf95d
--- /dev/null
+++ b/recipes-core/servlet-api/servlet2.3_4.1.37.bb
@@ -0,0 +1,48 @@
+DESCRIPTION = "Servlet API 2.3 (from Tomcat 4.1)"
+AUTHOR = "Apache Software Foundation"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
+
+SRC_URI = "http://archive.apache.org/dist/tomcat/tomcat-4/v${PV}/src/apache-tomcat-${PV}-src.tar.gz"
+
+inherit java-library
+
+S = "${WORKDIR}/apache-tomcat-${PV}-src/servletapi"
+
+DEPENDS = "fastjar-native"
+
+# Value of implementation.revision in build.xml
+IMPL_REVISION = "1"
+
+JARFILENAME = "servlet-2.3.${IMPL_REVISION}.jar"
+ALTJARFILENAMES = "servlet-2.3.jar servlet2.3.jar"
+
+do_unpackpost() {
+ sed -i -e "s|@implementation.version@|${IMPL_REVISION}|" src/etc/manifest
+}
+
+addtask unpackpost after do_unpack before do_patch
+
+do_compile() {
+ mkdir -p build
+
+ javac -sourcepath src/share -d build `find src/share/javax -name \*.java`
+
+ # Copy extraneous files according to build.xml's compile task
+ (cd src/share && find . -name "*.properties" -exec cp {} ../../build/{} \;)
+
+ mkdir -p build/javax/servlet/resources
+ cp src/share/dtd/web-app*.dtd build/javax/servlet/resources
+
+ mkdir -p build/javax/servlet/jsp/resources
+ cp src/share/dtd/web-jsptaglibrary*.dtd build/javax/servlet/jsp/resources
+ cp src/share/dtd/jspxml.* build/javax/servlet/jsp/resources
+
+ fastjar -C build -c -m src/etc/manifest -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "fe50177a25a084ad1abf4a201d08c2a6"
+SRC_URI[sha256sum] = "65e4cc9d3ea4a7f30044bfd6c660c772adb75ac152d775342deb6049a0d19d74"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/servlet-api/servlet2.4_5.5.26.bb b/recipes-core/servlet-api/servlet2.4_5.5.26.bb
new file mode 100644
index 0000000..ee80e5e
--- /dev/null
+++ b/recipes-core/servlet-api/servlet2.4_5.5.26.bb
@@ -0,0 +1,41 @@
+DESCRIPTION = "Servlet API 2.4 (from Tomcat 5.5)"
+LICENSE = "AL2.0"
+AUTHOR = "Apache Software Foundation"
+
+SRC_URI = "http://archive.apache.org/dist/tomcat/tomcat-5/v${PV}/src/apache-tomcat-${PV}-src.tar.gz"
+
+S = "${WORKDIR}/apache-tomcat-${PV}-src/servletapi/jsr154"
+
+inherit java-library
+
+DEPENDS = "fastjar-native"
+
+# Value of implementation.revision in build.xml
+IMPL_REVISION = "1"
+
+JARFILENAME = "servlet-api-2.4.${IMPL_REVISION}.jar"
+ALTJARFILENAMES = "servlet-api-2.4.jar servlet-api.jar servlet2.4.jar"
+
+do_unpackpost() {
+ sed -i -e "s|2.3.@implementation.version@|2.4.${IMPL_REVISION}|" src/etc/manifest
+}
+
+addtask unpackpost after do_unpack before do_patch
+
+do_compile() {
+ mkdir -p build
+
+ javac -sourcepath src/share -d build `find src/share/javax -name \*.java`
+
+ # Copy extraneous files according to build.xml's compile task
+ (cd src/share && find . -name "*.properties" -exec cp {} ../../build/{} \;)
+
+ mkdir -p build/javax/servlet/resources
+ cp src/share/dtd/jsp*.dtd build/javax/servlet/resources
+ cp src/share/dtd/web-jsp*.dtd build/javax/servlet/resources
+
+ fastjar -C build -c -m src/etc/manifest -f ${JARFILENAME} .
+}
+
+SRC_URI[md5sum] = "642b6526354cb18c5b5d77ebef8109ae"
+SRC_URI[sha256sum] = "ddc677d7391c438e6102d0b3e9653eaca661344ef74b0260c1f488340d660395"
diff --git a/recipes-core/xalan-j/xalan-j_2.7.1.bb b/recipes-core/xalan-j/xalan-j_2.7.1.bb
new file mode 100644
index 0000000..95dc8a1
--- /dev/null
+++ b/recipes-core/xalan-j/xalan-j_2.7.1.bb
@@ -0,0 +1,65 @@
+DESCRIPTION = "Java XSLT processor"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = " \
+ file://${WORKDIR}/bsf-2.4.0/LICENSE.txt;md5=b1e01b26bacfc2232046c90a330332b3 \
+ file://${WORKDIR}/xalan-j_2_7_1/LICENSE.txt;md5=f4411652c74c374bb2564394185289ee \
+ "
+AUTHOR = "Apache Software Foundation"
+HOMEPAGE = "http://xml.apache.org/xalan-j"
+
+DEPENDS = "xerces-j regexp jlex cup jaxp1.3 bcel"
+DEPENDS_virtclass-native = " \
+ xerces-j-native regexp-native jlex-native cup-native jaxp1.3-native bcel-native \
+ "
+
+
+SRC_URI = "\
+ http://archive.apache.org/dist/xml/${BPN}/${BPN}_2_7_1-src.tar.gz;name=archive \
+ http://archive.apache.org/dist/jakarta/bsf/source/bsf-src-2.4.0.tar.gz;name=bsf \
+ "
+
+S = "${WORKDIR}/${BPN}_2_7_1"
+
+inherit java-library
+
+JPN = "libxalan2-java"
+
+JARFILENAME = "xalan2-${PV}.jar"
+ALTJARFILENAMES = "xalan2.jar"
+
+do_compile() {
+ mkdir -p build
+
+ oe_makeclasspath cp -s xercesImpl regexp jlex cup bcel jaxp-1.3
+ scp="src:${WORKDIR}/bsf-2.4.0/src"
+
+ javac -J-Xmx512M -sourcepath $scp -cp $cp -d build `find src -name \*.java`
+ (cd src && find org -name "*.properties" -exec cp {} ../build/{} \;)
+
+ # Remove BSF classes
+ rm -rf build-xalan/org/apache/bsf
+
+ mkdir -p build-serializer/org/apache/xml
+ mv build/org/apache/xml/serializer build-serializer/org/apache/xml
+
+ fastjar -C build -c -f ${JARFILENAME} .
+ fastjar -C build-serializer -c -f serializer-${PV}.jar .
+}
+
+do_install_append() {
+ oe_jarinstall serializer-${PV}.jar serializer.jar
+}
+
+
+PACKAGES = "libxalan2-serializer-java ${JPN}"
+
+FILES_libxalan2-serializer-java = "${datadir_java}/serializer*.jar"
+
+SRC_URI[archive.md5sum] = "fc805051f0fe505c7a4b1b5c8db9b9e3"
+SRC_URI[archive.sha256sum] = "fa52aa629bb882335d45d67401d270c3f21b5131aaea005ac0d4590f2ce8b043"
+SRC_URI[bsf.md5sum] = "7e58b2a009c0f70ab36bbef420b25c07"
+SRC_URI[bsf.sha256sum] = "5ab58cf5738c144f4d85a4a442c2f33be2c4c502dca6e29e0c570c2a51ae6ae9"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
diff --git a/recipes-core/xerces-j/xerces-j_2.9.1.bb b/recipes-core/xerces-j/xerces-j_2.9.1.bb
new file mode 100644
index 0000000..79aef01
--- /dev/null
+++ b/recipes-core/xerces-j/xerces-j_2.9.1.bb
@@ -0,0 +1,61 @@
+DESCRIPTION = "Reference implementation of XNI, the Xerces Native Interface, and also a fully conforming XML Schema processor."
+AUTHOR = "Apache Software Foundation"
+LICENSE = "AL2.0"
+LIC_FILES_CHKSUM = " \
+ file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
+ file://LICENSE.DOM-documentation.html;md5=b05e182e1962778d7b207cbf3fe4acef \
+ file://LICENSE.DOM-software.html;md5=3aec153ae803c31acdae63bac18506b9 \
+ file://LICENSE.resolver.txt;md5=86d3f3a95c324c9479bd8986968f4327 \
+ file://LICENSE.serializer.txt;md5=86d3f3a95c324c9479bd8986968f4327 \
+ "
+
+SRC_URI = "http://www.apache.org/dist/xerces/j/Xerces-J-src.${PV}.tar.gz"
+
+S = "${WORKDIR}/xerces-2_9_1"
+
+inherit java-library
+
+JPN = "libxerces2-java"
+
+DEPENDS = "fastjar-native jaxp1.3 xml-commons-resolver1.1"
+DEPENDS_virtclass-native = "fastjar-native jaxp1.3-native xml-commons-resolver1.1-native"
+
+RDEPENDS_${PN} = "libjaxp1.3-java libxml-commons-resolver1.1-java"
+RDEPENDS_${PN}_virtclass-native = ""
+
+do_unpackpost() {
+ find src -exec \
+ sed -i -e "s|@impl.name@|Xerces-J ${PV}|" \
+ -e "s|@impl.version@|${PV}|" {} \;
+}
+
+addtask unpackpost after do_unpack before do_patch
+
+JARFILENAME = "xercesImpl.jar"
+ALTJARFILENAMES = ""
+
+do_compile() {
+ mkdir -p build
+
+ # Prepend the bootclasspath with the earlier XML API to make
+ # compilation succeed.
+ oe_makeclasspath bcp -s jaxp-1.3 resolver
+ bcp=$bcp:${STAGING_DATADIR_NATIVE}/classpath/glibj.zip
+
+ javac -sourcepath src -d build -bootclasspath $bcp `find src -name "*.java"`
+
+ (cd src && find org ! -name "*.java" -exec cp {} ../build/{} \;)
+
+ fastjar -C build -c -m src/manifest.xerces -f ${JARFILENAME} .
+
+ # Like Debian we provide a symlink called xmlParserAPIs.jar pointing to the JAXP
+ # classes.
+ ln -sf ${D}${datadir_java}/xmlParserAPIs.jar jaxp-1.3.jar
+
+}
+
+SRC_URI[md5sum] = "e340cba4a2abf4f0f833488380821153"
+SRC_URI[sha256sum] = "13af0062a72a4a0d541ca5336391eafa4d580258cacf4a5e062ea584ca950592"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
diff --git a/recipes-core/xml-commons/dom4j-1.6.1/debian.patch b/recipes-core/xml-commons/dom4j-1.6.1/debian.patch
new file mode 100644
index 0000000..87fda85
--- /dev/null
+++ b/recipes-core/xml-commons/dom4j-1.6.1/debian.patch
@@ -0,0 +1,1628 @@
+--- dom4j-1.6.1+dfsg.orig/src/java/org/jaxen/dom4j/DocumentNavigator.java
++++ dom4j-1.6.1+dfsg/src/java/org/jaxen/dom4j/DocumentNavigator.java
+@@ -0,0 +1,501 @@
++package org.jaxen.dom4j;
++
++/*
++ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/dom4j/DocumentNavigator.java,v 1.33 2006/07/03 13:17:30 elharo Exp $
++ * $Revision: 1.33 $
++ * $Date: 2006/07/03 13:17:30 $
++ *
++ * ====================================================================
++ *
++ * Copyright 2000-2005 bob mcwhirter & James Strachan.
++ * All rights reserved.
++ *
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions are
++ * met:
++ *
++ * * Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ *
++ * * Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ *
++ * * Neither the name of the Jaxen Project nor the names of its
++ * contributors may be used to endorse or promote products derived
++ * from this software without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
++ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
++ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
++ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
++ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
++ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
++ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
++ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
++ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
++ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
++ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
++ *
++ * ====================================================================
++ * This software consists of voluntary contributions made by many
++ * individuals on behalf of the Jaxen Project and was originally
++ * created by bob mcwhirter <bob@werken.com> and
++ * James Strachan <jstrachan@apache.org>. For more information on the
++ * Jaxen Project, please see <http://www.jaxen.org/>.
++ *
++ * $Id: DocumentNavigator.java,v 1.33 2006/07/03 13:17:30 elharo Exp $
++*/
++
++import java.util.ArrayList;
++import java.util.HashSet;
++import java.util.Iterator;
++import java.util.List;
++
++import org.dom4j.Attribute;
++import org.dom4j.Branch;
++import org.dom4j.CDATA;
++import org.dom4j.Comment;
++import org.dom4j.Document;
++import org.dom4j.DocumentException;
++import org.dom4j.Element;
++import org.dom4j.Namespace;
++import org.dom4j.Node;
++import org.dom4j.ProcessingInstruction;
++import org.dom4j.QName;
++import org.dom4j.Text;
++import org.dom4j.io.SAXReader;
++import org.jaxen.DefaultNavigator;
++import org.jaxen.FunctionCallException;
++import org.jaxen.NamedAccessNavigator;
++import org.jaxen.Navigator;
++import org.jaxen.XPath;
++import org.jaxen.JaxenConstants;
++import org.jaxen.saxpath.SAXPathException;
++import org.jaxen.util.SingleObjectIterator;
++
++/**
++ * Interface for navigating around the DOM4J object model.
++ *
++ * <p>
++ * This class is not intended for direct usage, but is
++ * used by the Jaxen engine during evaluation.
++ * </p>
++ *
++ * @see XPath
++ *
++ * @author <a href="mailto:bob@werken.com">bob mcwhirter</a>
++ * @author Stephen Colebourne
++ */
++public class DocumentNavigator extends DefaultNavigator implements NamedAccessNavigator
++{
++
++ /**
++ *
++ */
++ private static final long serialVersionUID = 5582300797286535936L;
++ private transient SAXReader reader;
++
++ /** Singleton implementation.
++ */
++ private static class Singleton
++ {
++ /** Singleton instance.
++ */
++ private static DocumentNavigator instance = new DocumentNavigator();
++ }
++
++ /** Retrieve the singleton instance of this <code>DocumentNavigator</code>.
++ */
++ public static Navigator getInstance()
++ {
++ return Singleton.instance;
++ }
++
++ public boolean isElement(Object obj)
++ {
++ return obj instanceof Element;
++ }
++
++ public boolean isComment(Object obj)
++ {
++ return obj instanceof Comment;
++ }
++
++ public boolean isText(Object obj)
++ {
++ return ( obj instanceof Text
++ ||
++ obj instanceof CDATA );
++ }
++
++ public boolean isAttribute(Object obj)
++ {
++ return obj instanceof Attribute;
++ }
++
++ public boolean isProcessingInstruction(Object obj)
++ {
++ return obj instanceof ProcessingInstruction;
++ }
++
++ public boolean isDocument(Object obj)
++ {
++ return obj instanceof Document;
++ }
++
++ public boolean isNamespace(Object obj)
++ {
++ return obj instanceof Namespace;
++ }
++
++ public String getElementName(Object obj)
++ {
++ Element elem = (Element) obj;
++
++ return elem.getName();
++ }
++
++ public String getElementNamespaceUri(Object obj)
++ {
++ Element elem = (Element) obj;
++
++ String uri = elem.getNamespaceURI();
++ if ( uri == null)
++ return "";
++ else
++ return uri;
++ }
++
++ public String getElementQName(Object obj)
++ {
++ Element elem = (Element) obj;
++
++ return elem.getQualifiedName();
++ }
++
++ public String getAttributeName(Object obj)
++ {
++ Attribute attr = (Attribute) obj;
++
++ return attr.getName();
++ }
++
++ public String getAttributeNamespaceUri(Object obj)
++ {
++ Attribute attr = (Attribute) obj;
++
++ String uri = attr.getNamespaceURI();
++ if ( uri == null)
++ return "";
++ else
++ return uri;
++ }
++
++ public String getAttributeQName(Object obj)
++ {
++ Attribute attr = (Attribute) obj;
++
++ return attr.getQualifiedName();
++ }
++
++ public Iterator getChildAxisIterator(Object contextNode)
++ {
++ Iterator result = null;
++ if ( contextNode instanceof Branch )
++ {
++ Branch node = (Branch) contextNode;
++ result = node.nodeIterator();
++ }
++ if (result != null) {
++ return result;
++ }
++ return JaxenConstants.EMPTY_ITERATOR;
++ }
++
++ /**
++ * Retrieves an <code>Iterator</code> over the child elements that
++ * match the supplied name.
++ *
++ * @param contextNode the origin context node
++ * @param localName the local name of the children to return, always present
++ * @param namespacePrefix the prefix of the namespace of the children to return
++ * @param namespaceURI the uri of the namespace of the children to return
++ *
++ * @return an Iterator that traverses the named children, or null if none
++ */
++ public Iterator getChildAxisIterator(
++ Object contextNode, String localName, String namespacePrefix, String namespaceURI) {
++
++ if ( contextNode instanceof Element ) {
++ Element node = (Element) contextNode;
++ return node.elementIterator(QName.get(localName, namespacePrefix, namespaceURI));
++ }
++ if ( contextNode instanceof Document ) {
++ Document node = (Document) contextNode;
++ Element el = node.getRootElement();
++ if (el == null || el.getName().equals(localName) == false) {
++ return JaxenConstants.EMPTY_ITERATOR;
++ }
++ if (namespaceURI != null) {
++ if (namespaceURI.equals(el.getNamespaceURI()) == false) {
++ return JaxenConstants.EMPTY_ITERATOR;
++ }
++ }
++ return new SingleObjectIterator(el);
++ }
++
++ return JaxenConstants.EMPTY_ITERATOR;
++ }
++
++ public Iterator getParentAxisIterator(Object contextNode)
++ {
++ if ( contextNode instanceof Document )
++ {
++ return JaxenConstants.EMPTY_ITERATOR;
++ }
++
++ Node node = (Node) contextNode;
++
++ Object parent = node.getParent();
++
++ if ( parent == null )
++ {
++ parent = node.getDocument();
++ }
++
++ return new SingleObjectIterator( parent );
++ }
++
++ public Iterator getAttributeAxisIterator(Object contextNode)
++ {
++ if ( ! ( contextNode instanceof Element ) )
++ {
++ return JaxenConstants.EMPTY_ITERATOR;
++ }
++
++ Element elem = (Element) contextNode;
++
++ return elem.attributeIterator();
++ }
++
++ /**
++ * Retrieves an <code>Iterator</code> over the attribute elements that
++ * match the supplied name.
++ *
++ * @param contextNode the origin context node
++ * @param localName the local name of the attributes to return, always present
++ * @param namespacePrefix the prefix of the namespace of the attributes to return
++ * @param namespaceURI the URI of the namespace of the attributes to return
++ * @return an Iterator that traverses the named attributes, not null
++ */
++ public Iterator getAttributeAxisIterator(
++ Object contextNode, String localName, String namespacePrefix, String namespaceURI) {
++
++ if ( contextNode instanceof Element ) {
++ Element node = (Element) contextNode;
++ Attribute attr = node.attribute(QName.get(localName, namespacePrefix, namespaceURI));
++ if (attr == null) {
++ return JaxenConstants.EMPTY_ITERATOR;
++ }
++ return new SingleObjectIterator(attr);
++ }
++ return JaxenConstants.EMPTY_ITERATOR;
++ }
++
++ public Iterator getNamespaceAxisIterator(Object contextNode)
++ {
++ if ( ! ( contextNode instanceof Element ) )
++ {
++ return JaxenConstants.EMPTY_ITERATOR;
++ }
++
++ Element element = (Element) contextNode;
++ List nsList = new ArrayList();
++ HashSet prefixes = new HashSet();
++ for ( Element context = element; context != null; context = context.getParent() ) {
++ List declaredNS = new ArrayList(context.declaredNamespaces());
++ declaredNS.add(context.getNamespace());
++
++ for ( Iterator iter = context.attributes().iterator(); iter.hasNext(); )
++ {
++ Attribute attr = (Attribute) iter.next();
++ declaredNS.add(attr.getNamespace());
++ }
++
++ for ( Iterator iter = declaredNS.iterator(); iter.hasNext(); )
++ {
++ Namespace namespace = (Namespace) iter.next();
++ if (namespace != Namespace.NO_NAMESPACE)
++ {
++ String prefix = namespace.getPrefix();
++ if ( ! prefixes.contains( prefix ) ) {
++ prefixes.add( prefix );
++ nsList.add( namespace.asXPathResult( element ) );
++ }
++ }
++ }
++ }
++ nsList.add( Namespace.XML_NAMESPACE.asXPathResult( element ) );
++ return nsList.iterator();
++ }
++
++ public Object getDocumentNode(Object contextNode)
++ {
++ if ( contextNode instanceof Document )
++ {
++ return contextNode;
++ }
++ else if ( contextNode instanceof Node )
++ {
++ Node node = (Node) contextNode;
++ return node.getDocument();
++ }
++ return null;
++ }
++
++ /** Returns a parsed form of the given XPath string, which will be suitable
++ * for queries on DOM4J documents.
++ */
++ public XPath parseXPath (String xpath) throws SAXPathException
++ {
++ return new Dom4jXPath(xpath);
++ }
++
++ public Object getParentNode(Object contextNode)
++ {
++ if ( contextNode instanceof Node )
++ {
++ Node node = (Node) contextNode;
++ Object answer = node.getParent();
++ if ( answer == null )
++ {
++ answer = node.getDocument();
++ if (answer == contextNode) {
++ return null;
++ }
++ }
++ return answer;
++ }
++ return null;
++ }
++
++ public String getTextStringValue(Object obj)
++ {
++ return getNodeStringValue( (Node) obj );
++ }
++
++ public String getElementStringValue(Object obj)
++ {
++ return getNodeStringValue( (Node) obj );
++ }
++
++ public String getAttributeStringValue(Object obj)
++ {
++ return getNodeStringValue( (Node) obj );
++ }
++
++ private String getNodeStringValue(Node node)
++ {
++ return node.getStringValue();
++ }
++
++ public String getNamespaceStringValue(Object obj)
++ {
++ Namespace ns = (Namespace) obj;
++
++ return ns.getURI();
++ }
++
++ public String getNamespacePrefix(Object obj)
++ {
++ Namespace ns = (Namespace) obj;
++
++ return ns.getPrefix();
++ }
++
++ public String getCommentStringValue(Object obj)
++ {
++ Comment cmt = (Comment) obj;
++
++ return cmt.getText();
++ }
++
++ public String translateNamespacePrefixToUri(String prefix, Object context)
++ {
++ Element element = null;
++ if ( context instanceof Element )
++ {
++ element = (Element) context;
++ }
++ else if ( context instanceof Node )
++ {
++ Node node = (Node) context;
++ element = node.getParent();
++ }
++ if ( element != null )
++ {
++ Namespace namespace = element.getNamespaceForPrefix( prefix );
++
++ if ( namespace != null )
++ {
++ return namespace.getURI();
++ }
++ }
++ return null;
++ }
++
++ public short getNodeType(Object node)
++ {
++ if ( node instanceof Node )
++ {
++ return ((Node) node).getNodeType();
++ }
++ return 0;
++ }
++
++ public Object getDocument(String uri) throws FunctionCallException
++ {
++ try
++ {
++ return getSAXReader().read( uri );
++ }
++ catch (DocumentException e)
++ {
++ throw new FunctionCallException("Failed to parse document for URI: " + uri, e);
++ }
++ }
++
++ public String getProcessingInstructionTarget(Object obj)
++ {
++ ProcessingInstruction pi = (ProcessingInstruction) obj;
++
++ return pi.getTarget();
++ }
++
++ public String getProcessingInstructionData(Object obj)
++ {
++ ProcessingInstruction pi = (ProcessingInstruction) obj;
++
++ return pi.getText();
++ }
++
++ // Properties
++ //-------------------------------------------------------------------------
++ public SAXReader getSAXReader()
++ {
++ if ( reader == null )
++ {
++ reader = new SAXReader();
++ reader.setMergeAdjacentText( true );
++ }
++ return reader;
++ }
++
++ public void setSAXReader(SAXReader reader)
++ {
++ this.reader = reader;
++ }
++
++}
+--- dom4j-1.6.1+dfsg.orig/src/java/org/jaxen/dom4j/Dom4jXPath.java
++++ dom4j-1.6.1+dfsg/src/java/org/jaxen/dom4j/Dom4jXPath.java
+@@ -0,0 +1,94 @@
++/*
++ * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/dom4j/Dom4jXPath.java,v 1.8 2006/06/03 20:44:53 elharo Exp $
++ * $Revision: 1.8 $
++ * $Date: 2006/06/03 20:44:53 $
++ *
++ * ====================================================================
++ *
++ * Copyright 2000-2002 bob mcwhirter & James Strachan.
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions are
++ * met:
++ *
++ * * Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ *
++ * * Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following discl