diff options
| author | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-12 20:58:34 +0100 |
|---|---|---|
| committer | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-26 23:41:44 +0100 |
| commit | 57e069cde6617f00ca8834a82c6f360af43d5067 (patch) | |
| tree | 48cbe15e96d217c45acfa64b0c13aad8c6424980 /recipes-core/openjdk | |
| download | meta-java-57e069cde6617f00ca8834a82c6f360af43d5067.tar.gz | |
meta-java: initial commit
* taken over mostly stuff from oe classic
* cleaned up recipes
* added license checksums
* bump icedtea6-native to 1.8.11
* use jamvm from git as native
Diffstat (limited to 'recipes-core/openjdk')
31 files changed, 1831 insertions, 0 deletions
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 @@ | |||
| 1 | DESCRIPTION = "Java runtime based upon the OpenJDK- and Icedtea Project" | ||
| 2 | HOMEPAGE = "http://icedtea.classpath.org" | ||
| 3 | LICENSE = "GPL with Classpath Exception" | ||
| 4 | PRIORITY = "optional" | ||
| 5 | SECTION = "libs" | ||
| 6 | |||
| 7 | # Name of the icedtea tarball and top-level directory. | ||
| 8 | ICEDTEA = "NEEDS TO BE SET" | ||
| 9 | |||
| 10 | S = "${WORKDIR}/${ICEDTEA}" | ||
| 11 | B = "${S}/build" | ||
| 12 | |||
| 13 | INC_PR = "r11" | ||
| 14 | |||
| 15 | SRC_URI = "\ | ||
| 16 | ${ICEDTEA_URI} \ | ||
| 17 | ${OPENJDK_URI} \ | ||
| 18 | ${JAXWS_URI} \ | ||
| 19 | ${JAF_URI} \ | ||
| 20 | ${JAXP_URI} \ | ||
| 21 | ${CACAO_URI} \ | ||
| 22 | ${OEPATCHES} \ | ||
| 23 | ${ICEDTEAPATCHES} \ | ||
| 24 | file://jvm.cfg \ | ||
| 25 | " | ||
| 26 | |||
| 27 | JDKPN = "openjdk-6" | ||
| 28 | JDK_DIR = "java-6-openjdk" | ||
| 29 | |||
| 30 | PN = "${JDKPN}-jre" | ||
| 31 | PROVIDES += "${JDKPN} ${PACKAGES}" | ||
| 32 | |||
| 33 | DEPENDS = "giflib libpng jpeg cups \ | ||
| 34 | xalan-j xerces-j rhino \ | ||
| 35 | freetype libxinerama libxt libxp libxrender libxtst libxi \ | ||
| 36 | alsa-lib libffi llvm2.9\ | ||
| 37 | ant-native \ | ||
| 38 | fastjar-native \ | ||
| 39 | icedtea6-native \ | ||
| 40 | cacaoh-openjdk-native \ | ||
| 41 | zip-native \ | ||
| 42 | " | ||
| 43 | |||
| 44 | DEPENDS_append_libc-uclibc = " libiconv " | ||
| 45 | |||
| 46 | # The OpenJDK build with interpreter optimizations for ARM depends on a binary | ||
| 47 | # that generates constants for an assembler source file. There is no other | ||
| 48 | # way than to generate this on a pseudo machine. Cross-compiling would not help | ||
| 49 | # because structure sizes and/or alignment may differ. | ||
| 50 | DEPENDS_append_arm = " qemu-native " | ||
| 51 | |||
| 52 | |||
| 53 | # No package should directly depend on this (it should require | ||
| 54 | # java2-runtime instead). | ||
| 55 | PRIVATE_LIBS = "\ | ||
| 56 | libunpack.so libverify.so libjava.so libzip.so libnpt.so \ | ||
| 57 | libjava_crw_demo.so libhprof.so libnet.so libnio.so \ | ||
| 58 | libmanagement.so libinstrument.so libjsound.so libjsoundalsa.so \ | ||
| 59 | libj2pcsc.so libj2pkcs11.so libj2gss.so libmlib_image.so \ | ||
| 60 | libawt.so libsplashscreen.so libfreetype.so.6 libfontmanager.so \ | ||
| 61 | libjpeg.so liblcms.so librmi.so libjawt.so libjaas_unix.so \ | ||
| 62 | libattach.so libjdwp.so libdt_socket.so libhpi.so libjli.so \ | ||
| 63 | libmawt.so libjvm.so \ | ||
| 64 | libversionCheck.so libcompiledMethodLoad.so libgctest.so \ | ||
| 65 | libheapViewer.so libheapTracker.so libminst.so libmtrace.so \ | ||
| 66 | libwaiters.so libhprof.so \ | ||
| 67 | " | ||
| 68 | |||
| 69 | |||
| 70 | inherit java autotools gettext | ||
| 71 | |||
| 72 | export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}" | ||
| 73 | export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2" | ||
| 74 | export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}" | ||
| 75 | export CACAO_CONFIGURE_ARGS = "\ | ||
| 76 | ${@['','--enable-softfloat'][bb.data.getVar('TARGET_FPU',d,1) == 'soft']} \ | ||
| 77 | --with-cacaoh=${STAGING_BINDIR_NATIVE}/cacaoh-openjdk-0.99.4" | ||
| 78 | |||
| 79 | JAVA_HOME[unexport] = "1" | ||
| 80 | |||
| 81 | EXTRA_OECONF = "\ | ||
| 82 | --disable-docs \ | ||
| 83 | --disable-pulse-java \ | ||
| 84 | --disable-plugin \ | ||
| 85 | \ | ||
| 86 | --with-ecj=${STAGING_BINDIR_NATIVE}/foo \ | ||
| 87 | --with-ecj-jar=${STAGING_DATADIR_JAVA_NATIVE}/ecj-bootstrap.jar \ | ||
| 88 | --with-java=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/java \ | ||
| 89 | --with-javac=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/javac \ | ||
| 90 | --with-javah=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/javah \ | ||
| 91 | --with-jar=${STAGING_BINDIR_NATIVE}/fastjar \ | ||
| 92 | --with-rmic=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin/rmic \ | ||
| 93 | --with-xalan2-jar=${STAGING_DATADIR_JAVA}/xalan2.jar \ | ||
| 94 | --with-xalan2-serializer-jar=${STAGING_DATADIR_JAVA}/serializer.jar \ | ||
| 95 | --with-xerces2-jar=${STAGING_DATADIR_JAVA}/xercesImpl.jar \ | ||
| 96 | --with-rhino=${STAGING_DATADIR_JAVA}/rhino.jar \ | ||
| 97 | --with-openjdk-src-dir=${WORKDIR}/openjdk-src-dir \ | ||
| 98 | --with-gcj-home=${WORKDIR}/fake-jdk \ | ||
| 99 | --with-parallel-jobs=${JDK_JOBS} \ | ||
| 100 | \ | ||
| 101 | --with-libgcj-jar=${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/jre/lib/rt.jar \ | ||
| 102 | \ | ||
| 103 | --with-pkgversion=${PV} \ | ||
| 104 | --with-cc-for-build=${BUILD_CC} \ | ||
| 105 | --enable-zero \ | ||
| 106 | --with-additional-vms=shark,cacao \ | ||
| 107 | --enable-openjdk-cross-compilation \ | ||
| 108 | " | ||
| 109 | |||
| 110 | |||
| 111 | # OpenJDK uses slightly different names for certain arches. We need to know | ||
| 112 | # this to create some files which are expected by the build. | ||
| 113 | def get_jdk_arch(d): | ||
| 114 | import bb | ||
| 115 | |||
| 116 | jdk_arch = bb.data.getVar('TARGET_ARCH', d, 1) | ||
| 117 | if jdk_arch == "x86_64": | ||
| 118 | jdk_arch = "amd64" | ||
| 119 | elif (jdk_arch == "i586" or jdk_arch == "i686"): | ||
| 120 | jdk_arch = "i586" | ||
| 121 | |||
| 122 | return jdk_arch | ||
| 123 | |||
| 124 | JDK_ARCH = "${@get_jdk_arch(d)}" | ||
| 125 | JDK_HOME = "${libdir_jvm}/${JDK_DIR}" | ||
| 126 | |||
| 127 | # OpenJDK supports parallel compilation but uses a plain number for this. | ||
| 128 | # In OE we have PARALLEL_MAKE which is the actual option passed to make, | ||
| 129 | # e.g. "-j 4". | ||
| 130 | def get_jdk_jobs(d): | ||
| 131 | import bb | ||
| 132 | |||
| 133 | pm = bb.data.getVar('PARALLEL_MAKE', d, 1); | ||
| 134 | if not pm: | ||
| 135 | return "1" | ||
| 136 | |||
| 137 | pm = pm.split(" "); | ||
| 138 | if (len(pm) == 2): | ||
| 139 | return pm[1] | ||
| 140 | |||
| 141 | # Whatever found in PARALLEL_MAKE was not suitable. | ||
| 142 | return "1" | ||
| 143 | |||
| 144 | JDK_JOBS = "${@get_jdk_jobs(d)}" | ||
| 145 | |||
| 146 | # A function that is needed in the Shark builds. | ||
| 147 | def get_llvm_configure_arch(d): | ||
| 148 | import bb; | ||
| 149 | |||
| 150 | arch = bb.data.getVar('TARGET_ARCH', d, 1) | ||
| 151 | if arch == "x86_64" or arch == "i486" or arch == "i586" or arch == "i686": | ||
| 152 | arch = "x86" | ||
| 153 | elif arch == "arm": | ||
| 154 | arch = "arm" | ||
| 155 | elif arch == "mipsel": | ||
| 156 | arch = "mips" | ||
| 157 | elif arch == "powerpc": | ||
| 158 | arch = "powerpc" | ||
| 159 | else: | ||
| 160 | oefatal("Your target architecture is not supported by this recipe"); | ||
| 161 | |||
| 162 | return arch | ||
| 163 | |||
| 164 | # Custom preparation of the sources which: | ||
| 165 | # - cleans up the sources | ||
| 166 | # - copies the patches into the proper directory | ||
| 167 | # - prepares the FakeJDK directory structure | ||
| 168 | #DISABLED because of incompatibility with oe stable 2009: do_prepareconfigure () { | ||
| 169 | do_configure_prepend() { | ||
| 170 | chmod -R ug+w ${WORKDIR}/openjdk-src-dir | ||
| 171 | (cd ${WORKDIR}/openjdk-src-dir && sh ${S}/fsg.sh) | ||
| 172 | |||
| 173 | # Automatically copy everything that starts with "icedtea" (or "cacao") and ends with | ||
| 174 | # ".patch" into the patches directory. | ||
| 175 | find ${WORKDIR} -maxdepth 1 -name "icedtea*.patch" -exec cp {} ${S}/patches \; | ||
| 176 | find ${WORKDIR} -maxdepth 1 -name "cacao*.patch" -exec cp {} ${S}/patches \; | ||
| 177 | |||
| 178 | # use now the rt.jar from icedtea6-native | ||
| 179 | mkdir -p ${WORKDIR}/fake-jdk/jre/lib | ||
| 180 | ln -sf ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/jre/lib/rt.jar ${WORKDIR}/fake-jdk/jre/lib/rt.jar | ||
| 181 | |||
| 182 | symlinked=false | ||
| 183 | echo "Creating symlinks for fake-jdk" | ||
| 184 | mkdir -p ${WORKDIR}/fake-jdk/include | ||
| 185 | for i in `find ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/include` ;do | ||
| 186 | bn=`basename $i` | ||
| 187 | echo "Symlinking: $bn" | ||
| 188 | ln -sf $i ${WORKDIR}/fake-jdk/include/$bn; | ||
| 189 | symlinked=true | ||
| 190 | done | ||
| 191 | |||
| 192 | # If the symlinks have not been created the built cannot continue. This | ||
| 193 | # can happen if icedtea6-native is not ready at this point. The recipe | ||
| 194 | # should make sure this is not the case but a little sanity checking | ||
| 195 | # in such a complicated build can't be wrong. | ||
| 196 | if [ x$symlinked = xfalse ] | ||
| 197 | then | ||
| 198 | echo"Build b0rken! Have not created any symlinks for fake-jdk!" | ||
| 199 | else | ||
| 200 | echo "fake-jdk setup appears sane." | ||
| 201 | fi | ||
| 202 | } | ||
| 203 | |||
| 204 | # Note: The following lines only work for OE.dev branch but cause an exception | ||
| 205 | # in oe stable's 2009 bitbake. As such the function is prepended to do_configure instead. | ||
| 206 | #addtask prepareconfigure after do_patch before do_configure | ||
| 207 | # Makes prepareconfigure depend on icedtea6-native having being staged. | ||
| 208 | #do_prepareconfigure[depends] += "icedtea6-native:do_populate_sysroot" | ||
| 209 | |||
| 210 | |||
| 211 | do_configure_append() { | ||
| 212 | oe_runmake patch-ecj | ||
| 213 | } | ||
| 214 | |||
| 215 | # Work around broken variable quoting in oe-stable 2009 and provide the variable | ||
| 216 | # via the environment which then overrides the erroneous value that was written | ||
| 217 | # into '${ICETDEA}/Makefile'. | ||
| 218 | # Icedtea's makefile is not compatible to parallelization so we cannot allow | ||
| 219 | # passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are | ||
| 220 | # parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. | ||
| 221 | # The base for this quirk is that GNU Make only considers the last "-j" option. | ||
| 222 | EXTRA_OEMAKE = '-j 1 CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"' | ||
| 223 | |||
| 224 | EXTRA_OEMAKE += ' \ | ||
| 225 | OE_CFLAGS="${TARGET_CFLAGS}" \ | ||
| 226 | OE_CPPFLAGS="${TARGET_CPPFLAGS}" \ | ||
| 227 | OE_CXXFLAGS="${TARGET_CXXFLAGS}" \ | ||
| 228 | OE_LDFLAGS="${TARGET_LDFLAGS}" \ | ||
| 229 | ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \ | ||
| 230 | ' | ||
| 231 | |||
| 232 | # Puts an OE specific string into the binary making it possible for the user | ||
| 233 | # to know where it comes from (and blame the right people ...). | ||
| 234 | DIST_ID = "Built for ${DISTRO}" | ||
| 235 | DIST_NAME = "${DISTRO}" | ||
| 236 | EXTRA_OEMAKE += 'DIST_NAME="${DIST_NAME}" DIST_ID="${DIST_ID}"' | ||
| 237 | |||
| 238 | |||
| 239 | # llvm configure and compiles stuff | ||
| 240 | |||
| 241 | export WANT_LLVM_RELEASE = "2.9" | ||
| 242 | |||
| 243 | # Provides the target architecture to the configure script. | ||
| 244 | export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}" | ||
| 245 | |||
| 246 | OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm2.9" | ||
| 247 | |||
| 248 | EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"' | ||
| 249 | |||
| 250 | |||
| 251 | # Large stack is required at least on x86_64 host, otherwise random segfaults appear: | ||
| 252 | QEMU = "qemu-${TARGET_ARCH} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET}" | ||
| 253 | |||
| 254 | EXTRA_OEMAKE += 'QEMU="${QEMU}"' | ||
| 255 | |||
| 256 | # Name of the directory containing the compiled output | ||
| 257 | BUILD_DIR = "build/linux-${JDK_ARCH}" | ||
| 258 | |||
| 259 | # The build of OpenJDK is a 3-part process. For better restartability and overrideability they have been split into | ||
| 260 | # three functions. | ||
| 261 | # 1. compile Hotspot or Cacao (this one is supposed to be implemented according to wanted VM) | ||
| 262 | # 2. compile openjdk-ecj (to have libraries as libjvm.so and libjava.so which are needed later) | ||
| 263 | # 3. compile openjdk (the final result) | ||
| 264 | |||
| 265 | do_compilestepone() { | ||
| 266 | oe_runmake bootstrap-directory-ecj | ||
| 267 | |||
| 268 | # now we need to override the tools.jar to point to the normal jdk's tools.jar | ||
| 269 | rm bootstrap/ecj/lib/tools.jar | ||
| 270 | ln -s ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/lib/tools.jar bootstrap/ecj/lib/tools.jar | ||
| 271 | |||
| 272 | # First build hotspot to get a libjvm.so (to link corba in the icedtea-ecj build) | ||
| 273 | echo "1/3 Building Hotspot" | ||
| 274 | oe_runmake hotspot | ||
| 275 | |||
| 276 | # Remove spurious libarch directory/symlink | ||
| 277 | rm -rf bootstrap/ecj/jre/lib/${JDK_ARCH} || true | ||
| 278 | |||
| 279 | # Provide a symlink to the target arch's libjvm.so (to link against) | ||
| 280 | ln -s `pwd`/openjdk-ecj/${BUILD_DIR}/j2sdk-image/jre/lib/${JDK_ARCH} bootstrap/jdk1.6.0/jre/lib/${JDK_ARCH} | ||
| 281 | |||
| 282 | # fake j2sdk-image | ||
| 283 | rm openjdk-ecj/${BUILD_DIR}/j2sdk-image/include || true | ||
| 284 | cp -ar openjdk-ecj/${BUILD_DIR}/hotspot/import/include openjdk-ecj/${BUILD_DIR}/j2sdk-image/ | ||
| 285 | install -d openjdk-ecj/${BUILD_DIR}/j2sdk-image/bin | ||
| 286 | } | ||
| 287 | addtask compilestepone after do_configure before do_compilesteptwo | ||
| 288 | |||
| 289 | # This part can be shared between cacao and hotspot-zero builds. | ||
| 290 | do_compilesteptwo() { | ||
| 291 | echo "2/3 Building bootstrap JDK" | ||
| 292 | |||
| 293 | # Now cross-compile bootstrap JDK | ||
| 294 | rm stamps/icedtea-against-ecj.stamp stamps/icedtea-ecj.stamp || true | ||
| 295 | oe_runmake icedtea-against-ecj | ||
| 296 | |||
| 297 | ln -sf ../openjdk-ecj/${BUILD_DIR}/j2sdk-image bootstrap/icedtea | ||
| 298 | |||
| 299 | # Replace all executables with symlinks to their native equivalents. | ||
| 300 | for F in `find ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/bin -type f` | ||
| 301 | do | ||
| 302 | bf=`basename $F` | ||
| 303 | echo "Creating symlink for:" $bf | ||
| 304 | ln -sf $F bootstrap/icedtea/bin/$bf | ||
| 305 | done | ||
| 306 | } | ||
| 307 | addtask compilesteptwo after do_compilestepone before do_compile | ||
| 308 | |||
| 309 | do_compile() { | ||
| 310 | |||
| 311 | echo "3/3 Building final JDK" | ||
| 312 | |||
| 313 | # Build the final Hotspot + OpenJDK | ||
| 314 | oe_runmake icedtea-against-icedtea \ | ||
| 315 | } | ||
| 316 | |||
| 317 | do_install() { | ||
| 318 | install -d ${D}${libdir_jvm} | ||
| 319 | cp -R ${S}/build/openjdk/${BUILD_DIR}/j2sdk-image ${D}${JDK_HOME} | ||
| 320 | |||
| 321 | chmod u+rw -R ${D}${JDK_HOME} | ||
| 322 | |||
| 323 | # Fix symlink which would point into staging in the binary package. | ||
| 324 | ln -sf ${datadir_java}/rhino.jar ${D}${JDK_HOME}/jre/lib/rhino.jar | ||
| 325 | |||
| 326 | # JRE is a subset of JDK. So to save space and resemble what the BIG distros | ||
| 327 | # do we create symlinks from the JDK binaries to their counterparts in the | ||
| 328 | # JRE folder (which have to exist by that time b/c of dependencies). | ||
| 329 | for F in `find ${D}${JDK_HOME}/jre/bin -type f` | ||
| 330 | do | ||
| 331 | bf=`basename $F` | ||
| 332 | echo "replace:" $bf | ||
| 333 | rm ${D}${JDK_HOME}/bin/$bf | ||
| 334 | ln -s ${JDK_HOME}/jre/bin/$bf ${D}${JDK_HOME}/bin/$bf | ||
| 335 | done | ||
| 336 | |||
| 337 | install -m644 ${WORKDIR}/jvm.cfg ${D}${JDK_HOME}/jre/lib/${JDK_ARCH}/ | ||
| 338 | } | ||
| 339 | |||
| 340 | # Notes about the ideas behind packaging: | ||
| 341 | # 1) User should install openjdk-6-jre. This is a provider of 'java2-runtime'. | ||
| 342 | # 2) This lets package mgmt install: openjdk-6-java | ||
| 343 | # -> openjdk-6-vm-shark|openjdk-6-vm-zero|openjdk-6-vm-cacao -> openjdk-6-common | ||
| 344 | # | ||
| 345 | # With opkg the zero VM is chosen which is good b/c that is the best known (= compatible) | ||
| 346 | # runtime. Installing other runtimes side-by-side is possible. Through jvm.cfg the following | ||
| 347 | # order of precedence is enforced: zero, shark, cacao. User can chose a different runtime | ||
| 348 | # by adding '-shark' or '-cacao' to the Java command (or by deinstalling an otherwise preferred | ||
| 349 | # runtime) | ||
| 350 | # 3) All other packages, including -jdk, are optional and not needed for normal Java apps. | ||
| 351 | PACKAGES = " \ | ||
| 352 | ${JDKPN}-jre \ | ||
| 353 | ${JDKPN}-dbg \ | ||
| 354 | ${JDKPN}-demo-dbg \ | ||
| 355 | ${JDKPN}-demo \ | ||
| 356 | ${JDKPN}-source \ | ||
| 357 | ${JDKPN}-doc \ | ||
| 358 | ${JDKPN}-jdk \ | ||
| 359 | ${JDKPN}-java \ | ||
| 360 | ${JDKPN}-vm-shark \ | ||
| 361 | ${JDKPN}-vm-zero \ | ||
| 362 | ${JDKPN}-vm-cacao \ | ||
| 363 | ${JDKPN}-common \ | ||
| 364 | " | ||
| 365 | |||
| 366 | FILES_${JDKPN}-dbg = "\ | ||
| 367 | ${JDK_HOME}/bin/.debug \ | ||
| 368 | ${JDK_HOME}/lib/.debug \ | ||
| 369 | ${JDK_HOME}/jre/bin/.debug \ | ||
| 370 | ${JDK_HOME}/jre/lib/.debug \ | ||
| 371 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/.debug \ | ||
| 372 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/jli/.debug \ | ||
| 373 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/native_threads/.debug \ | ||
| 374 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/server/.debug \ | ||
| 375 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/shark/.debug \ | ||
| 376 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/headless/.debug \ | ||
| 377 | ${JDK_HOME}/jre/lib/${JDK_ARCH}/xawt/.debug \ | ||
| 378 | " | ||
| 379 | |||
| 380 | FILES_${JDKPN}-demo = "${JDK_HOME}/demo ${JDK_HOME}/sample" | ||
| 381 | RDEPENDS_${JDKPN}-demo = "java2-runtime" | ||
| 382 | FILES_${JDKPN}-demo-dbg = "\ | ||
| 383 | ${JDK_HOME}/demo/jvmti/gctest/lib/.debug \ | ||
| 384 | ${JDK_HOME}/demo/jvmti/heapTracker/lib/.debug \ | ||
| 385 | ${JDK_HOME}/demo/jvmti/heapViewer/lib/.debug \ | ||
| 386 | ${JDK_HOME}/demo/jvmti/hprof/lib/.debug \ | ||
| 387 | ${JDK_HOME}/demo/jvmti/minst/lib/.debug \ | ||
| 388 | ${JDK_HOME}/demo/jvmti/mtrace/lib/.debug \ | ||
| 389 | ${JDK_HOME}/demo/jvmti/versionCheck/lib/.debug \ | ||
| 390 | ${JDK_HOME}/demo/jvmti/waiters/lib/.debug \ | ||
| 391 | ${JDK_HOME}/demo/jvmti/compiledMethodLoad/lib/.debug \ | ||
| 392 | " | ||
| 393 | |||
| 394 | FILES_${JDKPN}-source = "${JDK_HOME}/src.zip" | ||
| 395 | |||
| 396 | FILES_${JDKPN}-java = "${JDK_HOME}/jre/bin/java" | ||
| 397 | |||
| 398 | FILES_${JDKPN}-vm-zero = "${JDK_HOME}/jre/lib/arm/server/" | ||
| 399 | |||
| 400 | FILES_${JDKPN}-vm-shark = "${JDK_HOME}/jre/lib/arm/shark/" | ||
| 401 | |||
| 402 | FILES_${JDKPN}-vm-cacao = "${JDK_HOME}/jre/lib/arm/cacao/" | ||
| 403 | |||
| 404 | FILES_${JDKPN}-common = "${JDK_HOME}/jre/ASSEMBLY_EXCEPTION \ | ||
| 405 | ${JDK_HOME}/jre/THIRD_PARTY_README \ | ||
| 406 | ${JDK_HOME}/jre/LICENSE \ | ||
| 407 | ${JDK_HOME}/jre/lib \ | ||
| 408 | " | ||
| 409 | |||
| 410 | FILES_openjdk-6-jre_append = " \ | ||
| 411 | ${JDK_HOME}/jre/bin/keytool \ | ||
| 412 | ${JDK_HOME}/jre/bin/orbd \ | ||
| 413 | ${JDK_HOME}/jre/bin/pack200 \ | ||
| 414 | ${JDK_HOME}/jre/bin/rmid \ | ||
| 415 | ${JDK_HOME}/jre/bin/rmiregistry \ | ||
| 416 | ${JDK_HOME}/jre/bin/servertool \ | ||
| 417 | ${JDK_HOME}/jre/bin/tnameserv \ | ||
| 418 | ${JDK_HOME}/jre/bin/unpack200 \ | ||
| 419 | ${JDK_HOME}/jre/bin/policytool \ | ||
| 420 | ${JDK_HOME}/jre/bin/javaws \ | ||
| 421 | " | ||
| 422 | |||
| 423 | RDEPENDS_${JDKPN}-common = "librhino-java" | ||
| 424 | |||
| 425 | RPROVIDES_${JDKPN}-vm-shark = "java2-vm" | ||
| 426 | RPROVIDES_${JDKPN}-vm-zero = "java2-vm" | ||
| 427 | RPROVIDES_${JDKPN}-vm-cacao = "java2-vm" | ||
| 428 | |||
| 429 | RDEPENDS_${JDKPN}-java = "java2-vm" | ||
| 430 | |||
| 431 | # For some reason shark and cacao do not automatically depends on -common. | ||
| 432 | # So we add that manually. | ||
| 433 | RDEPENDS_${JDKPN}-vm-shark = "${JDKPN}-common" | ||
| 434 | RDEPENDS_${JDKPN}-vm-cacao = "${JDKPN}-common" | ||
| 435 | |||
| 436 | # There is a symlink to a .so but this one is valid. | ||
| 437 | INSANE_SKIP_${JDKPN}-vm-shark = "dev-so" | ||
| 438 | INSANE_SKIP_${JDKPN}-vm-zero = "dev-so" | ||
| 439 | INSANE_SKIP_${JDKPN}-vm-cacao = "dev-so" | ||
| 440 | INSANE_SKIP_${JDKPN}-common = "dev-so" | ||
| 441 | |||
| 442 | FILES_${JDKPN}-jdk = " \ | ||
| 443 | ${JDK_HOME}/bin \ | ||
| 444 | ${JDK_HOME}/lib \ | ||
| 445 | ${JDK_HOME}/include \ | ||
| 446 | " | ||
| 447 | RDEPENDS_${JDKPN}-jre = "${JDKPN}-java" | ||
| 448 | RPROVIDES_${JDKPN}-jre = "java2-runtime" | ||
| 449 | |||
| 450 | RDEPENDS_${JDKPN}-jdk = "${JDKPN}-jre" | ||
| 451 | |||
| 452 | FILES_${JDKPN}-doc = "${JDK_HOME}/man" | ||
| 453 | |||
| 454 | pkg_postinst_${JDKPN}-vm-shark () { | ||
| 455 | if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 456 | sed -i -e "/\-cacao KNOWN/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 457 | echo "-cacao KNOWN" >> ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 458 | fi | ||
| 459 | |||
| 460 | sed -i -e "/\-shark.*/d" -e "s|\(^\-server*\)|\-shark KNOWN\n\1|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 461 | } | ||
| 462 | |||
| 463 | pkg_prerm_${JDKPN}-vm-shark () { | ||
| 464 | sed -i -e "/^\-shark.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 465 | if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 466 | sed -i -e "/\-cacao KNOWN/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 467 | fi | ||
| 468 | } | ||
| 469 | |||
| 470 | pkg_postinst_${JDKPN}-vm-cacao () { | ||
| 471 | if grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 472 | sed -i -e "/\-cacao.*/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 473 | else | ||
| 474 | sed -i -e "s|^\-cacao.*|\-cacao KNOWN|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 475 | fi | ||
| 476 | } | ||
| 477 | |||
| 478 | pkg_prerm_${JDKPN}-vm-cacao () { | ||
| 479 | if grep -q "\-server ERROR" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 480 | sed -i -e "/\-cacao.*/d" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 481 | echo "-cacao ERROR" >> ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 482 | else | ||
| 483 | sed -i -e "s|^\-cacao.*|\-cacao ERROR|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 484 | fi | ||
| 485 | } | ||
| 486 | |||
| 487 | pkg_postinst_${JDKPN}-vm-zero () { | ||
| 488 | if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 489 | sed -i -e "/\-cacao KNOWN/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 490 | echo "-cacao KNOWN" >> ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 491 | fi | ||
| 492 | |||
| 493 | sed -i -e "s|^\-server.*|\-server KNOWN|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 494 | } | ||
| 495 | |||
| 496 | pkg_prerm_${JDKPN}-vm-zero () { | ||
| 497 | if grep -q "\-cacao KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg && ! grep -q "\-shark KNOWN" ${JDK_HOME}/jre/lib/arm/jvm.cfg; then | ||
| 498 | sed -i -e "/\-cacao KNOWN/d" -e "s|\(^\-server*\)|\-cacao KNOWN\n\1|" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 499 | fi | ||
| 500 | |||
| 501 | sed -i -e "s|^\-server.*|\-server ERROR|" -e "/^$/d" ${JDK_HOME}/jre/lib/arm/jvm.cfg | ||
| 502 | } | ||
| 503 | |||
| 504 | pkg_postinst_${JDKPN}-jre () { | ||
| 505 | update-alternatives --install ${bindir}/java java ${JDK_HOME}/jre/bin/java 15 | ||
| 506 | } | ||
| 507 | |||
| 508 | pkg_prerm_${JDKPN}-jre () { | ||
| 509 | update-alternatives --remove java ${JDK_HOME}/jre/bin/java | ||
| 510 | } | ||
| 511 | |||
| 512 | pkg_postinst_${JDKPN}-jdk () { | ||
| 513 | update-alternatives --install ${bindir}/javac javac ${JDK_HOME}/bin/javac 15 | ||
| 514 | } | ||
| 515 | |||
| 516 | pkg_prerm_${JDKPN}-jdk () { | ||
| 517 | update-alternatives --remove javac ${JDK_HOME}/bin/javac | ||
| 518 | } | ||
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 @@ | |||
| 1 | require openjdk-6-common.inc | ||
| 2 | |||
| 3 | FILESPATH =. "${FILE_DIRNAME}/openjdk-6:" | ||
| 4 | |||
| 5 | EXTRA_OECONF += "\ | ||
| 6 | --with-jaxws-drop-zip=${DL_DIR}/jdk6-jaxws-2009_10_27.zip \ | ||
| 7 | --with-jaf-drop-zip=${DL_DIR}/jdk6-jaf-2009_10_27.zip \ | ||
| 8 | --with-jaxp-drop-zip=${DL_DIR}/jdk6-jaxp-2009_10_13.zip \ | ||
| 9 | --with-cacao-src-zip=${DL_DIR}/cacao-0.99.4.tar.gz \ | ||
| 10 | " | ||
| 11 | |||
| 12 | # Force arm mode for now | ||
| 13 | ARM_INSTRUCTION_SET_armv4t = "ARM" | ||
| 14 | |||
| 15 | ICEDTEA_URI = "http://icedtea.classpath.org/download/source/${ICEDTEA}.tar.gz;name=iced" | ||
| 16 | |||
| 17 | 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" | ||
| 18 | SRC_URI[openjdk.md5sum] = "94db01691ab38f98b7d42b2ebf4d5c0b" | ||
| 19 | SRC_URI[openjdk.sha256sum] = "778ea7b323aaa24d3c6e8fe32b8bb0f49040d9e86271859077ada9f9ee3c8ebf" | ||
| 20 | |||
| 21 | JAXWS_URI = "http://icedtea.classpath.org/download/source/drops/jdk6-jaxws-2009_10_27.zip;name=jaxws" | ||
| 22 | SRC_URI[jaxws.md5sum] = "3ea5728706169498b722b898a1008acf" | ||
| 23 | SRC_URI[jaxws.sha256sum] = "155ff3be83c980e197621a2fbf7ee34e8e0f536489351a5865cf0e52206245e2" | ||
| 24 | |||
| 25 | JAF_URI = "http://icedtea.classpath.org/download/source/drops/jdk6-jaf-2009_10_27.zip;name=jaf" | ||
| 26 | SRC_URI[jaf.md5sum] = "7a50bb540a27cdd0001885630088b758" | ||
| 27 | SRC_URI[jaf.sha256sum] = "fdc51476fc6bcc69ea1f099f33e84601a126bfa8b11c8fa11c25dc574345aa9f" | ||
| 28 | |||
| 29 | JAXP_URI = "https://icedtea.classpath.org/download/source/drops/jdk6-jaxp-2009_10_13.zip;name=jaxp" | ||
| 30 | SRC_URI[jaxp.md5sum] = "a2f7b972124cd776ff71e7754eb9a429" | ||
| 31 | SRC_URI[jaxp.sha256sum] = "8714d55de18db48ca9da0ee986202005082f44cf4c215da8683342b70e61792b" | ||
| 32 | |||
| 33 | CACAO_URI = "http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-0.99.4/cacao-0.99.4.tar.gz;name=cacao" | ||
| 34 | SRC_URI[cacao.md5sum] = "c5e6525c5212ddbb6026e4a7cde37ca6" | ||
| 35 | SRC_URI[cacao.sha256sum] = "c6090c1d2ed3c60acda0076b62563598267be8dab270ce49ee1035002a2510cf" | ||
| 36 | |||
| 37 | # Allow overriding this separately | ||
| 38 | OEPATCHES = "\ | ||
| 39 | file://build-hacks.patch \ | ||
| 40 | file://zero-cmpswap-long.patch \ | ||
| 41 | file://fix_hotspot_crosscompile.patch \ | ||
| 42 | file://mkbc_returncode.patch \ | ||
| 43 | file://icedtea-fix-jar-command.patch \ | ||
| 44 | file://fix-llvm-libs.patch \ | ||
| 45 | file://shark-build-openjdkdir.patch \ | ||
| 46 | file://shark-arm-linux-cpu-detection.patch \ | ||
| 47 | file://cacao-libtoolize.patch \ | ||
| 48 | " | ||
| 49 | |||
| 50 | # Allow overriding this separately | ||
| 51 | ICEDTEAPATCHES = "\ | ||
| 52 | file://icedtea-launcher-stdc++.patch;apply=no \ | ||
| 53 | file://icedtea-crosscompile-fix.patch;apply=no \ | ||
| 54 | file://icedtea-hostbuildcc.patch;apply=no \ | ||
| 55 | file://icedtea-unbreak-float.patch;apply=no \ | ||
| 56 | file://icedtea-remove_werror.patch;apply=no \ | ||
| 57 | file://cacao-vfp-compat.patch;apply=no \ | ||
| 58 | file://cacao-disable-stackbase-check.patch;apply=no \ | ||
| 59 | file://icedtea-libnet-renaming.patch;apply=no \ | ||
| 60 | file://icedtea-hasgettransfer.patch;apply=no \ | ||
| 61 | file://icedtea-llvm_headers.patch;apply=no \ | ||
| 62 | " | ||
| 63 | |||
| 64 | ICEDTEAPATCHES_append_libc-uclibc = " \ | ||
| 65 | file://icedtea-hotspot-isfinte.patch;apply=no \ | ||
| 66 | file://icedtea-hotspot-glibc-version.patch;apply=no \ | ||
| 67 | file://icedtea-hotspot-loadavg.patch;apply=no \ | ||
| 68 | file://icedtea-hotspot-isnanf.patch;apply=no \ | ||
| 69 | file://icedtea-jdk-iconv-uclibc.patch;apply=no \ | ||
| 70 | file://icedtea-jdk-remove-unused-backtrace.patch;apply=no \ | ||
| 71 | file://icedtea-jdk-RTLD_NOLOAD.patch;apply=no \ | ||
| 72 | file://icedtea-jdk-unpack-uclibc.patch;apply=no \ | ||
| 73 | " | ||
| 74 | |||
| 75 | # Allow overriding this separately | ||
| 76 | DISTRIBUTION_PATCHES = "\ | ||
| 77 | patches/icedtea-launcher-stdc++.patch \ | ||
| 78 | patches/icedtea-crosscompile-fix.patch \ | ||
| 79 | patches/icedtea-hostbuildcc.patch \ | ||
| 80 | patches/icedtea-unbreak-float.patch \ | ||
| 81 | patches/icedtea-remove_werror.patch \ | ||
| 82 | patches/cacao-vfp-compat.patch \ | ||
| 83 | patches/cacao-disable-stackbase-check.patch \ | ||
| 84 | patches/icedtea-libnet-renaming.patch \ | ||
| 85 | patches/icedtea-hasgettransfer.patch \ | ||
| 86 | patches/icedtea-llvm_headers.patch \ | ||
| 87 | " | ||
| 88 | |||
| 89 | DISTRIBUTION_PATCHES_append_libc-uclibc = "\ | ||
| 90 | patches/icedtea-hotspot-isfinte.patch \ | ||
| 91 | patches/icedtea-hotspot-isnanf.patch \ | ||
| 92 | patches/icedtea-hotspot-glibc-version.patch \ | ||
| 93 | patches/icedtea-hotspot-loadavg.patch \ | ||
| 94 | patches/icedtea-jdk-iconv-uclibc.patch \ | ||
| 95 | patches/icedtea-jdk-remove-unused-backtrace.patch \ | ||
| 96 | patches/icedtea-jdk-RTLD_NOLOAD.patch \ | ||
| 97 | patches/icedtea-jdk-unpack-uclibc.patch \ | ||
| 98 | " | ||
| 99 | |||
| 100 | 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 @@ | |||
| 1 | Index: icedtea6-1.8/Makefile.am | ||
| 2 | =================================================================== | ||
| 3 | --- icedtea6-1.8.orig/Makefile.am 2010-04-12 23:55:51.754838172 +0200 | ||
| 4 | +++ icedtea6-1.8/Makefile.am 2010-06-16 15:17:10.224708601 +0200 | ||
| 5 | @@ -477,6 +477,11 @@ | ||
| 6 | JAVAC="" \ | ||
| 7 | JAVA_HOME="" \ | ||
| 8 | JDK_HOME="" \ | ||
| 9 | + OE_CFLAGS="$(OE_CFLAGS)" \ | ||
| 10 | + OE_CPPFLAGS="$(OE_CPPFLAGS)" \ | ||
| 11 | + OE_CXXFLAGS="$(OE_CXXFLAGS)" \ | ||
| 12 | + OE_LDFLAGS="$(OE_LDFLAGS)" \ | ||
| 13 | + OE_LAUNCHER_LDFLAGS="$(OE_LAUNCHER_LDFLAGS)" \ | ||
| 14 | DISTRIBUTION_ID="$(DIST_ID)" \ | ||
| 15 | DERIVATIVE_ID="$(ICEDTEA_NAME) $(PACKAGE_VERSION)$(ICEDTEA_REV)" \ | ||
| 16 | DEBUG_CLASSFILES="true" \ | ||
| 17 | Index: icedtea6-1.8/javac.in | ||
| 18 | =================================================================== | ||
| 19 | --- icedtea6-1.8.orig/javac.in 2010-03-25 15:10:41.714835519 +0100 | ||
| 20 | +++ icedtea6-1.8/javac.in 2010-06-16 15:14:31.205334756 +0200 | ||
| 21 | @@ -35,7 +35,9 @@ | ||
| 22 | elif [ ! -z "@ECJ@" ] ; then | ||
| 23 | @ECJ@ -1.5 -nowarn $bcoption $NEW_ARGS | ||
| 24 | else | ||
| 25 | + # Compiling hotspot-tools consumes tons of memory and exceeds any default | ||
| 26 | + # limits for jamvm and cacao. | ||
| 27 | CLASSPATH=@ECJ_JAR@${CLASSPATH:+:}$CLASSPATH \ | ||
| 28 | - @JAVA@ org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS | ||
| 29 | + @JAVA@ -Xmx1024m org.eclipse.jdt.internal.compiler.batch.Main -1.5 -nowarn $bcoption $NEW_ARGS | ||
| 30 | fi | ||
| 31 | |||
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 @@ | |||
| 1 | Index: cacao/cacao/src/mm/boehm-gc/os_dep.c | ||
| 2 | =================================================================== | ||
| 3 | --- cacao/cacao/src/mm/boehm-gc/os_dep.c 2009-02-15 16:29:15.000000000 +0100 | ||
| 4 | +++ cacao/cacao/src/mm/boehm-gc/os_dep.c 2009-02-15 16:29:24.000000000 +0100 | ||
| 5 | @@ -1077,7 +1077,6 @@ | ||
| 6 | c = stat_buf[buf_offset++]; | ||
| 7 | } | ||
| 8 | close(f); | ||
| 9 | - if (result < 0x10000000) ABORT("Absurd stack bottom value"); | ||
| 10 | return (ptr_t)result; | ||
| 11 | } | ||
| 12 | |||
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 @@ | |||
| 1 | Index: icedtea6-1.8.5/Makefile.am | ||
| 2 | =================================================================== | ||
| 3 | --- icedtea6-1.8.5.orig/Makefile.am 2011-02-04 18:29:58.826701224 +0100 | ||
| 4 | +++ icedtea6-1.8.5/Makefile.am 2011-02-04 18:31:53.430016002 +0100 | ||
| 5 | @@ -1918,10 +1918,13 @@ | ||
| 6 | if BUILD_CACAO | ||
| 7 | if !USE_SYSTEM_CACAO | ||
| 8 | cd cacao/cacao && \ | ||
| 9 | + rm -f libtool && \ | ||
| 10 | + autoreconf --verbose --install --force --no-recursive && \ | ||
| 11 | $(ARCH_PREFIX) ./configure \ | ||
| 12 | --host=$(host_alias) \ | ||
| 13 | --build=$(build_alias) \ | ||
| 14 | --target=$(target_alias) \ | ||
| 15 | + --with-libtool-sysroot \ | ||
| 16 | --prefix=$(abs_top_builddir)/cacao/install \ | ||
| 17 | --with-java-runtime-library=openjdk \ | ||
| 18 | --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 @@ | |||
| 1 | Index: cacao/cacao/src/vm/jit/arm/codegen.c | ||
| 2 | =================================================================== | ||
| 3 | --- cacao/cacao/src/vm/jit/arm/codegen.c 2008-10-01 16:23:21.439856241 +0200 | ||
| 4 | +++ cacao/cacao/src/vm/jit/arm/codegen.c 2008-10-01 16:41:24.278841537 +0200 | ||
| 5 | @@ -2353,10 +2353,12 @@ | ||
| 6 | |||
| 7 | d = md->returntype.type; | ||
| 8 | |||
| 9 | -#if !defined(__SOFTFP__) | ||
| 10 | +#if !defined(__SOFTFP__) && !defined(__VFP_FP__) | ||
| 11 | /* TODO: this is only a hack, since we use R0/R1 for float | ||
| 12 | return! this depends on gcc; it is independent from | ||
| 13 | - our ENABLE_SOFTFLOAT define */ | ||
| 14 | + our ENABLE_SOFTFLOAT define | ||
| 15 | + It is only needed for -mfpu=fpa -mfloat-abi=hard! | ||
| 16 | + */ | ||
| 17 | if (iptr->opc == ICMD_BUILTIN && d != TYPE_VOID && IS_FLT_DBL_TYPE(d)) { | ||
| 18 | #if 0 && !defined(NDEBUG) | ||
| 19 | dolog("BUILTIN that returns float or double (%s.%s)", m->clazz->name->text, m->name->text); | ||
| 20 | @@ -3019,7 +3021,7 @@ | ||
| 21 | s1 = (s4) (cd->mcodeptr - cd->mcodebase); | ||
| 22 | M_RECOMPUTE_PV(s1); | ||
| 23 | |||
| 24 | -#if !defined(__SOFTFP__) | ||
| 25 | +#if !defined(__SOFTFP__) && !defined(__VFP_FP__) | ||
| 26 | /* TODO: this is only a hack, since we use R0/R1 for float return! */ | ||
| 27 | /* this depends on gcc; it is independent from our ENABLE_SOFTFLOAT define */ | ||
| 28 | if (md->returntype.type != TYPE_VOID && IS_FLT_DBL_TYPE(md->returntype.type)) { | ||
| 29 | @@ -3030,7 +3032,7 @@ | ||
| 30 | /* M_CAST_FLT_TO_INT_TYPED(md->returntype.type, REG_FRESULT, REG_RESULT_TYPED(md->returntype.type)); */ | ||
| 31 | if (IS_2_WORD_TYPE(md->returntype.type)) { | ||
| 32 | DCD(0xed2d8102); /* stfd f0, [sp, #-8]! */ | ||
| 33 | - M_LDRD_UPDATE(REG_RESULT_PACKED, REG_SP, 8); | ||
| 34 | + M_LDRD_UPDATE(REG_RESULT_PACKED, REG_SP, 8); | ||
| 35 | } else { | ||
| 36 | DCD(0xed2d0101); /* stfs f0, [sp, #-4]!*/ | ||
| 37 | 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 @@ | |||
| 1 | Index: icedtea6-1.8/configure.ac | ||
| 2 | =================================================================== | ||
| 3 | --- icedtea6-1.8.orig/configure.ac | ||
| 4 | +++ icedtea6-1.8/configure.ac | ||
| 5 | @@ -472,7 +472,7 @@ | ||
| 6 | if test "x$LLVM_SHARED_LIB" != x && echo "$flag" | grep -q '^-lLLVM'; then | ||
| 7 | continue | ||
| 8 | fi | ||
| 9 | - if echo "$flag" | grep -q '^-l'; then | ||
| 10 | + if echo "$flag" | grep -q '^-l\|.so'; then | ||
| 11 | if test "x$LLVM_LIBS" != "x"; then | ||
| 12 | LLVM_LIBS="$LLVM_LIBS " | ||
| 13 | 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 @@ | |||
| 1 | Index: icedtea6-1.8/Makefile.am | ||
| 2 | =================================================================== | ||
| 3 | --- icedtea6-1.8.orig/Makefile.am 2010-06-18 12:31:34.534667003 +0200 | ||
| 4 | +++ icedtea6-1.8/Makefile.am 2010-06-18 12:31:34.714667729 +0200 | ||
| 5 | @@ -488,6 +488,7 @@ | ||
| 6 | DEBUG_BINARIES="true" \ | ||
| 7 | ALT_DROPS_DIR="$(abs_top_builddir)/drops" \ | ||
| 8 | VERBOSE="$(VERBOSE)" \ | ||
| 9 | + CC_FOR_BUILD="$(CC_FOR_BUILD)" \ | ||
| 10 | ALT_NETX_DIST="$(abs_top_builddir)/netx.build" \ | ||
| 11 | ALT_LIVECONNECT_DIST="$(abs_top_builddir)/liveconnect" | ||
| 12 | |||
| 13 | Index: icedtea6-1.8/acinclude.m4 | ||
| 14 | =================================================================== | ||
| 15 | --- icedtea6-1.8.orig/acinclude.m4 2010-04-10 21:58:40.804836529 +0200 | ||
| 16 | +++ icedtea6-1.8/acinclude.m4 2010-06-18 12:31:34.714667729 +0200 | ||
| 17 | @@ -900,6 +900,21 @@ | ||
| 18 | AC_SUBST(ALT_CACAO_SRC_DIR) | ||
| 19 | ]) | ||
| 20 | |||
| 21 | +AC_DEFUN([AC_CHECK_WITH_CC_FOR_BUILD], | ||
| 22 | +[ | ||
| 23 | + AC_MSG_CHECKING(for compiler used for subsidiary programs) | ||
| 24 | + AC_ARG_WITH([cc-for-build], | ||
| 25 | + [AS_HELP_STRING(--with-cc-for-build,specify the compiler for subsidiary (helper) programs)], | ||
| 26 | + [ | ||
| 27 | + CC_FOR_BUILD="${withval}" | ||
| 28 | + ], | ||
| 29 | + [ | ||
| 30 | + CC_FOR_BUILD="\$(CC)" | ||
| 31 | + ]) | ||
| 32 | + AC_MSG_RESULT(${CC_FOR_BUILD}) | ||
| 33 | + AC_SUBST(CC_FOR_BUILD) | ||
| 34 | +]) | ||
| 35 | + | ||
| 36 | AC_DEFUN([AC_CHECK_WITH_GCJ], | ||
| 37 | [ | ||
| 38 | AC_MSG_CHECKING([whether to compile ecj natively]) | ||
| 39 | Index: icedtea6-1.8/configure.ac | ||
| 40 | =================================================================== | ||
| 41 | --- icedtea6-1.8.orig/configure.ac 2010-04-12 13:46:18.821086023 +0200 | ||
| 42 | +++ icedtea6-1.8/configure.ac 2010-06-18 12:31:34.724666321 +0200 | ||
| 43 | @@ -44,6 +44,7 @@ | ||
| 44 | IT_CHECK_FOR_MERCURIAL | ||
| 45 | IT_OBTAIN_HG_REVISIONS | ||
| 46 | AC_PATH_TOOL([LSB_RELEASE],[lsb_release]) | ||
| 47 | +AC_CHECK_WITH_CC_FOR_BUILD | ||
| 48 | AC_CHECK_WITH_GCJ | ||
| 49 | AC_CHECK_WITH_HOTSPOT_BUILD | ||
| 50 | AC_PATH_TOOL([LINUX32],[linux32]) | ||
| 51 | Index: icedtea6-1.8/ports/hotspot/make/linux/makefiles/zeroshark.make | ||
| 52 | =================================================================== | ||
| 53 | --- icedtea6-1.8.orig/ports/hotspot/make/linux/makefiles/zeroshark.make 2010-03-25 15:10:42.061085966 +0100 | ||
| 54 | +++ icedtea6-1.8/ports/hotspot/make/linux/makefiles/zeroshark.make 2010-06-18 12:40:42.834666505 +0200 | ||
| 55 | @@ -32,6 +32,13 @@ | ||
| 56 | Obj_Files += thumb2.o | ||
| 57 | |||
| 58 | CFLAGS += -DHOTSPOT_ASM | ||
| 59 | +CCFLAGS += -DHOTSPOT_ASM | ||
| 60 | + | ||
| 61 | +ifeq ($(CROSS_COMPILATION), true) | ||
| 62 | + C_COMPILE_FOR_MKBC = $(CC_FOR_BUILD) | ||
| 63 | +else | ||
| 64 | + C_COMPILE_FOR_MKBC = $(C_COMPILE) | ||
| 65 | +endif | ||
| 66 | |||
| 67 | %.o: %.S | ||
| 68 | @echo Assembling $< | ||
| 69 | @@ -43,20 +50,20 @@ | ||
| 70 | |||
| 71 | offsets_arm.s: mkoffsets | ||
| 72 | @echo Generating assembler offsets | ||
| 73 | - ./mkoffsets > $@ | ||
| 74 | + $(QEMU) ./mkoffsets > $@ | ||
| 75 | |||
| 76 | bytecodes_arm.s: bytecodes_arm.def mkbc | ||
| 77 | @echo Generatine ARM assembler bytecode sequences | ||
| 78 | $(CC_COMPILE) -E -x c++ - < $< | ./mkbc - $@ $(COMPILE_DONE) | ||
| 79 | |||
| 80 | -mkbc: $(GAMMADIR)/tools/mkbc.c | ||
| 81 | +mkbc: $(GAMMADIR)/tools/mkbc.c | ||
| 82 | @echo Compiling mkbc tool | ||
| 83 | - $(CC_COMPILE) -o $@ $< $(COMPILE_DONE) | ||
| 84 | + $(C_COMPILE_FOR_MKBC) -o $@ $< $(COMPILE_DONE) | ||
| 85 | |||
| 86 | -mkoffsets: asm_helper.cpp | ||
| 87 | +mkoffsets: asm_helper.cpp | ||
| 88 | @echo Compiling offset generator | ||
| 89 | $(QUIETLY) $(REMOVE_TARGET) | ||
| 90 | - $(CC_COMPILE) -DSTATIC_OFFSETS -o $@ $< $(COMPILE_DONE) | ||
| 91 | + $(CC_COMPILE) -static -DSTATIC_OFFSETS -o $@ $< $(COMPILE_DONE) | ||
| 92 | |||
| 93 | endif | ||
| 94 | |||
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 @@ | |||
| 1 | Index: openjdk/jdk/make/sun/awt/Makefile | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk.orig/jdk/make/sun/awt/Makefile 2009-01-24 17:54:57.000000000 +0100 | ||
| 4 | +++ openjdk/jdk/make/sun/awt/Makefile 2009-01-24 17:55:07.000000000 +0100 | ||
| 5 | @@ -509,10 +509,10 @@ | ||
| 6 | # | ||
| 7 | |||
| 8 | ifeq ($(PLATFORM), linux) | ||
| 9 | -CPPFLAGS += -I$(MOTIF_DIR)/include \ | ||
| 10 | - -I$(OPENWIN_HOME)/include \ | ||
| 11 | - -I$(OPENWIN_HOME)/include/X11/extensions \ | ||
| 12 | - -I$(PLATFORM_SRC)/native/$(PKGDIR)/font | ||
| 13 | +#CPPFLAGS += -I$(MOTIF_DIR)/include \ | ||
| 14 | +# -I$(OPENWIN_HOME)/include \ | ||
| 15 | +# -I$(OPENWIN_HOME)/include/X11/extensions \ | ||
| 16 | +CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/font | ||
| 17 | endif | ||
| 18 | CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \ | ||
| 19 | -I$(SHARE_SRC)/native/$(PKGDIR)/../font \ | ||
| 20 | @@ -536,7 +536,7 @@ | ||
| 21 | $(EVENT_MODEL) | ||
| 22 | |||
| 23 | ifeq ($(PLATFORM), linux) | ||
| 24 | -LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB) | ||
| 25 | +#LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB) | ||
| 26 | endif | ||
| 27 | |||
| 28 | LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \ | ||
| 29 | Index: openjdk/jdk/make/sun/awt/mawt.gmk | ||
| 30 | =================================================================== | ||
| 31 | --- openjdk.orig/jdk/make/sun/awt/mawt.gmk 2009-01-24 17:54:57.000000000 +0100 | ||
| 32 | +++ openjdk/jdk/make/sun/awt/mawt.gmk 2009-01-24 17:55:07.000000000 +0100 | ||
| 33 | @@ -194,8 +194,8 @@ | ||
| 34 | CPPFLAGS += -I$(CUPS_HEADERS_PATH) | ||
| 35 | |||
| 36 | ifndef HEADLESS | ||
| 37 | -CPPFLAGS += -I$(OPENWIN_HOME)/include | ||
| 38 | -LDFLAGS += -L$(OPENWIN_LIB) | ||
| 39 | +#CPPFLAGS += -I$(OPENWIN_HOME)/include | ||
| 40 | +#LDFLAGS += -L$(OPENWIN_LIB) | ||
| 41 | |||
| 42 | endif # !HEADLESS | ||
| 43 | |||
| 44 | @@ -223,8 +223,8 @@ | ||
| 45 | |||
| 46 | ifeq ($(PLATFORM), linux) | ||
| 47 | # Checking for the X11/extensions headers at the additional location | ||
| 48 | - CPPFLAGS += -I/X11R6/include/X11/extensions \ | ||
| 49 | - -I/usr/include/X11/extensions | ||
| 50 | +# CPPFLAGS += -I/X11R6/include/X11/extensions \ | ||
| 51 | +# -I/usr/include/X11/extensions | ||
| 52 | endif | ||
| 53 | |||
| 54 | ifeq ($(PLATFORM), solaris) | ||
| 55 | Index: openjdk/jdk/make/sun/xawt/Makefile | ||
| 56 | =================================================================== | ||
| 57 | --- openjdk.orig/jdk/make/sun/xawt/Makefile 2009-01-24 17:54:57.000000000 +0100 | ||
| 58 | +++ openjdk/jdk/make/sun/xawt/Makefile 2009-01-24 17:55:07.000000000 +0100 | ||
| 59 | @@ -123,11 +123,12 @@ | ||
| 60 | -I$(PLATFORM_SRC)/native/sun/awt | ||
| 61 | |||
| 62 | ifeq ($(PLATFORM), linux) | ||
| 63 | +# Very unsuitable for cross-compilation. | ||
| 64 | # Allows for builds on Debian GNU Linux, X11 is in a different place | ||
| 65 | - CPPFLAGS += -I/usr/X11R6/include/X11/extensions \ | ||
| 66 | - -I/usr/include/X11/extensions \ | ||
| 67 | - -I$(MOTIF_DIR)/include \ | ||
| 68 | - -I$(OPENWIN_HOME)/include | ||
| 69 | +# CPPFLAGS += -I/usr/X11R6/include/X11/extensions \ | ||
| 70 | +# -I/usr/include/X11/extensions \ | ||
| 71 | +# -I$(MOTIF_DIR)/include \ | ||
| 72 | +# -I$(OPENWIN_HOME)/include | ||
| 73 | endif | ||
| 74 | |||
| 75 | ifeq ($(PLATFORM), solaris) | ||
| 76 | Index: openjdk/hotspot/make/linux/makefiles/vm.make | ||
| 77 | =================================================================== | ||
| 78 | --- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2009-01-24 17:54:57.000000000 +0100 | ||
| 79 | +++ openjdk/hotspot/make/linux/makefiles/vm.make 2009-01-24 17:55:07.000000000 +0100 | ||
| 80 | @@ -170,6 +170,7 @@ | ||
| 81 | LIBS_VM += $(LLVM_LIBS) | ||
| 82 | endif | ||
| 83 | |||
| 84 | +LFLAGS_VM += $(OE_LDFLAGS) | ||
| 85 | LINK_VM = $(LINK_LIB.c) | ||
| 86 | |||
| 87 | # rule for building precompiled header | ||
| 88 | Index: openjdk/hotspot/make/linux/makefiles/buildtree.make | ||
| 89 | =================================================================== | ||
| 90 | --- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make 2009-01-24 17:54:57.000000000 +0100 | ||
| 91 | +++ openjdk/hotspot/make/linux/makefiles/buildtree.make 2009-01-24 17:55:07.000000000 +0100 | ||
| 92 | @@ -343,7 +343,7 @@ | ||
| 93 | echo "rm -f Queens.class"; \ | ||
| 94 | echo "\$${JAVA_HOME}/bin/javac -d . $(GAMMADIR)/make/test/Queens.java"; \ | ||
| 95 | echo '[ -f gamma_g ] && { gamma=gamma_g; }'; \ | ||
| 96 | - echo './$${gamma:-gamma} $(TESTFLAGS) Queens < /dev/null'; \ | ||
| 97 | + echo 'echo Silently skipping the execution of the gamma program'; \ | ||
| 98 | ) > $@ | ||
| 99 | $(QUIETLY) chmod +x $@ | ||
| 100 | |||
| 101 | Index: openjdk/corba/make/common/Defs-linux.gmk | ||
| 102 | =================================================================== | ||
| 103 | --- openjdk.orig/corba/make/common/Defs-linux.gmk 2009-01-24 17:54:57.000000000 +0100 | ||
| 104 | +++ openjdk/corba/make/common/Defs-linux.gmk 2009-01-24 17:55:07.000000000 +0100 | ||
| 105 | @@ -82,9 +82,9 @@ | ||
| 106 | CC_NO_OPT = | ||
| 107 | |||
| 108 | ifeq ($(PRODUCT), java) | ||
| 109 | - _OPT = $(CC_HIGHER_OPT) | ||
| 110 | + _OPT = $(OE_CFLAGS) | ||
| 111 | else | ||
| 112 | - _OPT = $(CC_LOWER_OPT) | ||
| 113 | + _OPT = $(OE_CFLAGS) | ||
| 114 | CPPFLAGS_DBG += -DLOGGING | ||
| 115 | endif | ||
| 116 | |||
| 117 | @@ -94,7 +94,7 @@ | ||
| 118 | # as the default. | ||
| 119 | CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN | ||
| 120 | CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN | ||
| 121 | -CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN | ||
| 122 | +CFLAGS_REQUIRED_arm += -fno-omit-frame-pointer -D_LITTLE_ENDIAN | ||
| 123 | CFLAGS_REQUIRED_hppa += | ||
| 124 | CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN | ||
| 125 | CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN | ||
| 126 | @@ -221,7 +221,7 @@ | ||
| 127 | # | ||
| 128 | # -L paths for finding and -ljava | ||
| 129 | # | ||
| 130 | -LDFLAGS_OPT = -Xlinker -O1 | ||
| 131 | +LDFLAGS_OPT = $(OE_LDFLAGS) | ||
| 132 | LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH) | ||
| 133 | LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX) | ||
| 134 | |||
| 135 | Index: openjdk/jdk/make/common/Defs-linux.gmk | ||
| 136 | =================================================================== | ||
| 137 | --- openjdk.orig/jdk/make/common/Defs-linux.gmk 2009-01-24 17:54:57.000000000 +0100 | ||
| 138 | +++ openjdk/jdk/make/common/Defs-linux.gmk 2009-01-24 17:55:07.000000000 +0100 | ||
| 139 | @@ -92,9 +92,9 @@ | ||
| 140 | CC_NO_OPT = | ||
| 141 | |||
| 142 | ifeq ($(PRODUCT), java) | ||
| 143 | - _OPT = $(CC_HIGHER_OPT) | ||
| 144 | + _OPT = $(OE_CFLAGS) | ||
| 145 | else | ||
| 146 | - _OPT = $(CC_LOWER_OPT) | ||
| 147 | + _OPT = $(OE_CFLAGS) | ||
| 148 | CPPFLAGS_DBG += -DLOGGING | ||
| 149 | endif | ||
| 150 | |||
| 151 | @@ -104,7 +104,7 @@ | ||
| 152 | # as the default. | ||
| 153 | CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN | ||
| 154 | CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN | ||
| 155 | -CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN | ||
| 156 | +CFLAGS_REQUIRED_arm += -fno-omit-frame-pointer -D_LITTLE_ENDIAN | ||
| 157 | CFLAGS_REQUIRED_hppa += | ||
| 158 | CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN | ||
| 159 | CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN | ||
| 160 | @@ -231,7 +231,7 @@ | ||
| 161 | # | ||
| 162 | # -L paths for finding and -ljava | ||
| 163 | # | ||
| 164 | -LDFLAGS_OPT = -Xlinker -O1 | ||
| 165 | +LDFLAGS_OPT = $(OE_LDFLAGS) | ||
| 166 | LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH) | ||
| 167 | LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX) | ||
| 168 | |||
| 169 | Index: openjdk/hotspot/make/linux/makefiles/gcc.make | ||
| 170 | =================================================================== | ||
| 171 | --- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2009-01-24 17:54:57.000000000 +0100 | ||
| 172 | +++ openjdk/hotspot/make/linux/makefiles/gcc.make 2009-01-24 17:55:07.000000000 +0100 | ||
| 173 | @@ -119,7 +119,7 @@ | ||
| 174 | CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) | ||
| 175 | |||
| 176 | # The flags to use for an Optimized g++ build | ||
| 177 | -OPT_CFLAGS += -O3 | ||
| 178 | +OPT_CFLAGS += $(OE_CFLAGS) | ||
| 179 | |||
| 180 | # Hotspot uses very unstrict aliasing turn this optimization off | ||
| 181 | OPT_CFLAGS += -fno-strict-aliasing | ||
| 182 | @@ -148,7 +148,7 @@ | ||
| 183 | endif | ||
| 184 | |||
| 185 | # Enable linker optimization | ||
| 186 | -LFLAGS += -Xlinker -O1 | ||
| 187 | +LFLAGS += $(OE_LDFLAGS) | ||
| 188 | |||
| 189 | # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. | ||
| 190 | MAPFLAG = -Xlinker --version-script=FILENAME | ||
| 191 | Index: openjdk/hotspot/make/linux/makefiles/launcher.make | ||
| 192 | =================================================================== | ||
| 193 | --- openjdk.orig/hotspot/make/linux/makefiles/launcher.make 2009-01-24 17:55:19.000000000 +0100 | ||
| 194 | +++ openjdk/hotspot/make/linux/makefiles/launcher.make 2009-01-24 17:56:05.000000000 +0100 | ||
| 195 | @@ -44,7 +44,7 @@ | ||
| 196 | LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) | ||
| 197 | else | ||
| 198 | LAUNCHER.o = launcher.o | ||
| 199 | - LFLAGS_LAUNCHER += -L `pwd` | ||
| 200 | + LFLAGS_LAUNCHER += -L `pwd` $(OE_LAUNCHER_LDFLAGS) $(OE_LDFLAGS) | ||
| 201 | LIBS_LAUNCHER += -l$(JVM) $(LIBS) -lstdc++ | ||
| 202 | endif | ||
| 203 | |||
| 204 | Index: icedtea6-1.8.5/build/openjdk/jdk/make/sun/xawt/Makefile | ||
| 205 | =================================================================== | ||
| 206 | --- openjdk/jdk/make/sun/xawt/Makefile 2011-03-14 14:17:03.926207269 +0100 | ||
| 207 | +++ openjdk/jdk/make/sun/xawt/Makefile 2011-03-14 14:30:11.956186631 +0100 | ||
| 208 | @@ -245,7 +245,7 @@ | ||
| 209 | $(CHMOD) +w $@;\ | ||
| 210 | else \ | ||
| 211 | $(ECHO) GENERATING $@; \ | ||
| 212 | - $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \ | ||
| 213 | + $(QEMU) $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \ | ||
| 214 | fi | ||
| 215 | @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \ | ||
| 216 | $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \ | ||
| 217 | Index: openjdk/hotspot/make/linux/makefiles/jsig.make | ||
| 218 | =================================================================== | ||
| 219 | --- openjdk/hotspot/make/linux/makefiles/jsig.make 2010-02-17 04:11:04.000000000 +0100 | ||
| 220 | +++ openjdk/hotspot/make/linux/makefiles/jsig.make 2011-11-18 22:56:03.923900991 +0100 | ||
| 221 | @@ -39,7 +39,7 @@ | ||
| 222 | # cause problems with interposing. See CR: 6466665 | ||
| 223 | # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) | ||
| 224 | |||
| 225 | -LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT | ||
| 226 | +LFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(OE_LDFLAGS) | ||
| 227 | |||
| 228 | # DEBUG_BINARIES overrides everything, use full -g debug information | ||
| 229 | 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 @@ | |||
| 1 | Index: icedtea6-1.8/Makefile.am | ||
| 2 | =================================================================== | ||
| 3 | --- icedtea6-1.8.orig/Makefile.am 2010-06-17 10:29:13.654666801 +0200 | ||
| 4 | +++ icedtea6-1.8/Makefile.am 2010-06-17 10:30:50.334670771 +0200 | ||
| 5 | @@ -1750,7 +1745,7 @@ | ||
| 6 | stamps/rewrite-rhino.stamp: stamps/rewriter.stamp $(RHINO_JAR) | ||
| 7 | if WITH_RHINO | ||
| 8 | mkdir -p rhino/rhino.{old,new} | ||
| 9 | - (cd rhino/rhino.old ; jar xf $(RHINO_JAR)) | ||
| 10 | + (cd rhino/rhino.old ; $(ICEDTEA_BOOT_DIR)/bin/jar xf $(RHINO_JAR)) | ||
| 11 | $(ICEDTEA_BOOT_DIR)/bin/java -cp $(abs_top_builddir)/rewriter \ | ||
| 12 | com.redhat.rewriter.ClassRewriter \ | ||
| 13 | $(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 @@ | |||
| 1 | Index: openjdk/jdk/src/share/classes/javax/swing/HasGetTransferHandler.java | ||
| 2 | =================================================================== | ||
| 3 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
| 4 | +++ openjdk/jdk/src/share/classes/javax/swing/HasGetTransferHandler.java 2011-11-18 20:44:00.281649848 +0100 | ||
| 5 | @@ -0,0 +1,38 @@ | ||
| 6 | +/* | ||
| 7 | + * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. | ||
| 8 | + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 9 | + * | ||
| 10 | + * This code is free software; you can redistribute it and/or modify it | ||
| 11 | + * under the terms of the GNU General Public License version 2 only, as | ||
| 12 | + * published by the Free Software Foundation. Sun designates this | ||
| 13 | + * particular file as subject to the "Classpath" exception as provided | ||
| 14 | + * by Sun in the LICENSE file that accompanied this code. | ||
| 15 | + * | ||
| 16 | + * This code is distributed in the hope that it will be useful, but WITHOUT | ||
| 17 | + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 18 | + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 19 | + * version 2 for more details (a copy is included in the LICENSE file that | ||
| 20 | + * accompanied this code). | ||
| 21 | + * | ||
| 22 | + * You should have received a copy of the GNU General Public License version | ||
| 23 | + * 2 along with this work; if not, write to the Free Software Foundation, | ||
| 24 | + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 25 | + * | ||
| 26 | + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | ||
| 27 | + * CA 95054 USA or visit www.sun.com if you need additional information or | ||
| 28 | + * have any questions. | ||
| 29 | + */ | ||
| 30 | +package javax.swing; | ||
| 31 | + | ||
| 32 | +/** | ||
| 33 | + * An interface to tag things with a {@code getTransferHandler} method. | ||
| 34 | + */ | ||
| 35 | +interface HasGetTransferHandler { | ||
| 36 | + | ||
| 37 | + /** Returns the {@code TransferHandler}. | ||
| 38 | + * | ||
| 39 | + * @return The {@code TransferHandler} or {@code null} | ||
| 40 | + */ | ||
| 41 | + public TransferHandler getTransferHandler(); | ||
| 42 | +} | ||
| 43 | + | ||
| 44 | Index: openjdk/jdk/src/share/classes/javax/swing/TransferHandler.java | ||
| 45 | =================================================================== | ||
| 46 | --- openjdk/jdk/src/share/classes/javax/swing/TransferHandler.java 2011-11-18 18:51:22.000000000 +0100 | ||
| 47 | +++ openjdk/jdk/src/share/classes/javax/swing/TransferHandler.java 2011-11-18 20:44:01.628219313 +0100 | ||
| 48 | @@ -122,18 +122,6 @@ | ||
| 49 | public static final int LINK = DnDConstants.ACTION_LINK; | ||
| 50 | |||
| 51 | /** | ||
| 52 | - * An interface to tag things with a {@code getTransferHandler} method. | ||
| 53 | - */ | ||
| 54 | - interface HasGetTransferHandler { | ||
| 55 | - | ||
| 56 | - /** Returns the {@code TransferHandler}. | ||
| 57 | - * | ||
| 58 | - * @return The {@code TransferHandler} or {@code null} | ||
| 59 | - */ | ||
| 60 | - public TransferHandler getTransferHandler(); | ||
| 61 | - } | ||
| 62 | - | ||
| 63 | - /** | ||
| 64 | * Represents a location where dropped data should be inserted. | ||
| 65 | * This is a base class that only encapsulates a point. | ||
| 66 | * Components supporting drop may provide subclasses of this | ||
| 67 | diff --git a/jdk/src/share/classes/javax/swing/JApplet.java b/jdk/src/share/classes/javax/swing/JApplet.java | ||
| 68 | index 47f792a..72c2cf9 100644 | ||
| 69 | --- openjdk/jdk/src/share/classes/javax/swing/JApplet.java | ||
| 70 | +++ openjdk/jdk/src/share/classes/javax/swing/JApplet.java | ||
| 71 | @@ -91,7 +91,7 @@ import javax.accessibility.*; | ||
| 72 | */ | ||
| 73 | public class JApplet extends Applet implements Accessible, | ||
| 74 | RootPaneContainer, | ||
| 75 | - TransferHandler.HasGetTransferHandler | ||
| 76 | + HasGetTransferHandler | ||
| 77 | { | ||
| 78 | /** | ||
| 79 | * @see #getRootPane | ||
| 80 | diff --git a/jdk/src/share/classes/javax/swing/JComponent.java b/jdk/src/share/classes/javax/swing/JComponent.java | ||
| 81 | index 4293a4f..0c0a1dc 100644 | ||
| 82 | --- openjdk/jdk/src/share/classes/javax/swing/JComponent.java | ||
| 83 | +++ openjdk/jdk/src/share/classes/javax/swing/JComponent.java | ||
| 84 | @@ -171,7 +171,7 @@ import sun.swing.UIClientPropertyKey; | ||
| 85 | * @author Arnaud Weber | ||
| 86 | */ | ||
| 87 | public abstract class JComponent extends Container implements Serializable, | ||
| 88 | - TransferHandler.HasGetTransferHandler | ||
| 89 | + HasGetTransferHandler | ||
| 90 | { | ||
| 91 | /** | ||
| 92 | * @see #getUIClassID | ||
| 93 | diff --git a/jdk/src/share/classes/javax/swing/JDialog.java b/jdk/src/share/classes/javax/swing/JDialog.java | ||
| 94 | index a0193d1..aeeb243 100644 | ||
| 95 | --- openjdk/jdk/src/share/classes/javax/swing/JDialog.java | ||
| 96 | +++ openjdk/jdk/src/share/classes/javax/swing/JDialog.java | ||
| 97 | @@ -97,7 +97,7 @@ import javax.accessibility.*; | ||
| 98 | public class JDialog extends Dialog implements WindowConstants, | ||
| 99 | Accessible, | ||
| 100 | RootPaneContainer, | ||
| 101 | - TransferHandler.HasGetTransferHandler | ||
| 102 | + HasGetTransferHandler | ||
| 103 | { | ||
| 104 | /** | ||
| 105 | * Key into the AppContext, used to check if should provide decorations | ||
| 106 | diff --git a/jdk/src/share/classes/javax/swing/JFrame.java b/jdk/src/share/classes/javax/swing/JFrame.java | ||
| 107 | index 9910b43..4cb8f58 100644 | ||
| 108 | --- openjdk/jdk/src/share/classes/javax/swing/JFrame.java | ||
| 109 | +++ openjdk/jdk/src/share/classes/javax/swing/JFrame.java | ||
| 110 | @@ -109,7 +109,7 @@ import javax.accessibility.*; | ||
| 111 | public class JFrame extends Frame implements WindowConstants, | ||
| 112 | Accessible, | ||
| 113 | RootPaneContainer, | ||
| 114 | - TransferHandler.HasGetTransferHandler | ||
| 115 | + HasGetTransferHandler | ||
| 116 | { | ||
| 117 | /** | ||
| 118 | * The exit application default window close operation. If a window | ||
| 119 | diff --git a/jdk/src/share/classes/javax/swing/JWindow.java b/jdk/src/share/classes/javax/swing/JWindow.java | ||
| 120 | index c94803c..85bbb57 100644 | ||
| 121 | --- openjdk/jdk/src/share/classes/javax/swing/JWindow.java | ||
| 122 | +++ openjdk/jdk/src/share/classes/javax/swing/JWindow.java | ||
| 123 | @@ -91,7 +91,7 @@ import javax.accessibility.*; | ||
| 124 | */ | ||
| 125 | public class JWindow extends Window implements Accessible, | ||
| 126 | RootPaneContainer, | ||
| 127 | - TransferHandler.HasGetTransferHandler | ||
| 128 | + HasGetTransferHandler | ||
| 129 | { | ||
| 130 | /** | ||
| 131 | * 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 @@ | |||
| 1 | Index: openjdk/hotspot/make/linux/makefiles/rules.make | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/hotspot/make/linux/makefiles/rules.make 2010-02-02 02:22:33.201668748 +0100 | ||
| 4 | +++ openjdk/hotspot/make/linux/makefiles/rules.make 2010-02-02 02:23:08.480415783 +0100 | ||
| 5 | @@ -39,6 +39,7 @@ | ||
| 6 | # $(CC) is the c compiler (cc/gcc), $(CCC) is the c++ compiler (CC/g++). | ||
| 7 | C_COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) | ||
| 8 | CC_COMPILE = $(CCC) $(CPPFLAGS) $(CFLAGS) | ||
| 9 | +CC_HOST_COMPILE = $(BUILD_CC) $(CPPFLAGS) $(CFLAGS) | ||
| 10 | |||
| 11 | AS.S = $(AS) $(ASFLAGS) | ||
| 12 | |||
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 @@ | |||
| 1 | Index: icedtea6-1.8/build/openjdk/hotspot/src/os/linux/vm/os_linux.cpp | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:22:13.696298239 +0200 | ||
| 4 | +++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:24:15.308790737 +0200 | ||
| 5 | @@ -49,7 +49,6 @@ | ||
| 6 | # include <string.h> | ||
| 7 | # include <syscall.h> | ||
| 8 | # include <sys/sysinfo.h> | ||
| 9 | -# include <gnu/libc-version.h> | ||
| 10 | # include <sys/ipc.h> | ||
| 11 | # include <sys/shm.h> | ||
| 12 | # include <link.h> | ||
| 13 | @@ -544,9 +543,7 @@ | ||
| 14 | os::Linux::set_glibc_version(str); | ||
| 15 | } else { | ||
| 16 | // _CS_GNU_LIBC_VERSION is not supported, try gnu_get_libc_version() | ||
| 17 | - static char _gnu_libc_version[32]; | ||
| 18 | - jio_snprintf(_gnu_libc_version, sizeof(_gnu_libc_version), | ||
| 19 | - "glibc %s %s", gnu_get_libc_version(), gnu_get_libc_release()); | ||
| 20 | + static char _gnu_libc_version[32] = "2.9"; | ||
| 21 | os::Linux::set_glibc_version(_gnu_libc_version); | ||
| 22 | } | ||
| 23 | |||
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 @@ | |||
| 1 | Index: icedtea6-1.8/build/openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-09 21:41:28.576131825 +0200 | ||
| 4 | +++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-09 21:41:55.555711815 +0200 | ||
| 5 | @@ -235,8 +235,8 @@ | ||
| 6 | |||
| 7 | // Checking for finiteness | ||
| 8 | |||
| 9 | -inline int g_isfinite(jfloat f) { return finite(f); } | ||
| 10 | -inline int g_isfinite(jdouble f) { return finite(f); } | ||
| 11 | +inline int g_isfinite(jfloat f) { return isfinite(f); } | ||
| 12 | +inline int g_isfinite(jdouble f) { return isfinite(f); } | ||
| 13 | |||
| 14 | |||
| 15 | // 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 @@ | |||
| 1 | Index: icedtea6-1.8/build/openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-09 21:47:12.695674808 +0200 | ||
| 4 | +++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2010-06-09 21:48:08.699007491 +0200 | ||
| 5 | @@ -220,14 +220,14 @@ | ||
| 6 | // checking for nanness | ||
| 7 | #ifdef SOLARIS | ||
| 8 | #ifdef SPARC | ||
| 9 | -inline int g_isnan(float f) { return isnanf(f); } | ||
| 10 | +inline int g_isnan(float f) { return __isnanf(f); } | ||
| 11 | #else | ||
| 12 | // isnanf() broken on Intel Solaris use isnand() | ||
| 13 | inline int g_isnan(float f) { return isnand(f); } | ||
| 14 | #endif | ||
| 15 | inline int g_isnan(double f) { return isnand(f); } | ||
| 16 | #elif LINUX | ||
| 17 | -inline int g_isnan(float f) { return isnanf(f); } | ||
| 18 | +inline int g_isnan(float f) { return __isnanf(f); } | ||
| 19 | inline int g_isnan(double f) { return isnan(f); } | ||
| 20 | #else | ||
| 21 | #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 @@ | |||
| 1 | Index: icedtea6-1.8/build/openjdk/hotspot/src/os/linux/vm/os_linux.cpp | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:16:09.406334411 +0200 | ||
| 4 | +++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:19:38.952152043 +0200 | ||
| 5 | @@ -4325,7 +4325,22 @@ | ||
| 6 | // Linux doesn't yet have a (official) notion of processor sets, | ||
| 7 | // so just return the system wide load average. | ||
| 8 | int os::loadavg(double loadavg[], int nelem) { | ||
| 9 | - return ::getloadavg(loadavg, nelem); | ||
| 10 | + | ||
| 11 | + FILE *LOADAVG; | ||
| 12 | + double avg[3] = { 0.0, 0.0, 0.0 }; | ||
| 13 | + int i, res = -1;; | ||
| 14 | + | ||
| 15 | + if ((LOADAVG = fopen("/proc/loadavg", "r"))) { | ||
| 16 | + fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]); | ||
| 17 | + res = 0; | ||
| 18 | + fclose(LOADAVG); | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + for (i = 0; (i < nelem) && (i < 3); i++) { | ||
| 22 | + loadavg[i] = avg[i]; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + return res; | ||
| 26 | } | ||
| 27 | |||
| 28 | 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 @@ | |||
| 1 | Index: openjdk/jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2010-06-13 15:18:05.655136951 +0200 | ||
| 4 | +++ openjdk/jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2010-06-13 15:20:29.601377967 +0200 | ||
| 5 | @@ -51,7 +51,7 @@ | ||
| 6 | { | ||
| 7 | const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL); | ||
| 8 | // look up existing handle only, do not load | ||
| 9 | - void *hModule = dlopen(libName, RTLD_NOLOAD); | ||
| 10 | + void *hModule = dlopen(libName, RTLD_LAZY); | ||
| 11 | dprintf2("-handle for %s: %u\n", libName, hModule); | ||
| 12 | (*env)->ReleaseStringUTFChars(env, jLibName, libName); | ||
| 13 | 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 @@ | |||
| 1 | Index: openjdk/jdk/make/java/npt/Makefile | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/jdk/make/java/npt/Makefile 2010-06-13 15:11:02.598512448 +0200 | ||
| 4 | +++ openjdk/jdk/make/java/npt/Makefile 2010-06-13 15:11:28.504759286 +0200 | ||
| 5 | @@ -65,6 +65,8 @@ | ||
| 6 | # We don't want to link against -ljava | ||
| 7 | JAVALIB= | ||
| 8 | |||
| 9 | +LDLIBS += -liconv | ||
| 10 | + | ||
| 11 | # Add -export options to explicitly spell exported symbols | ||
| 12 | ifeq ($(PLATFORM), windows) | ||
| 13 | OTHER_LCF += -export:nptInitialize -export:nptTerminate | ||
| 14 | Index: icedtea6-1.8/openjdk-ecj/jdk/make/java/instrument/Makefile | ||
| 15 | =================================================================== | ||
| 16 | --- openjdk/jdk/make/java/instrument/Makefile 2010-06-13 15:12:14.688505195 +0200 | ||
| 17 | +++ openjdk/jdk/make/java/instrument/Makefile 2010-06-13 15:12:32.641425670 +0200 | ||
| 18 | @@ -123,6 +123,8 @@ | ||
| 19 | # We don't want to link against -ljava | ||
| 20 | JAVALIB= | ||
| 21 | |||
| 22 | +LDLIBS += -liconv | ||
| 23 | + | ||
| 24 | # | ||
| 25 | # Add to ambient vpath so we pick up the library files | ||
| 26 | # | ||
| 27 | Index: openjdk/jdk/make/sun/splashscreen/Makefile | ||
| 28 | =================================================================== | ||
| 29 | --- openjdk/jdk/make/sun/splashscreen/Makefile 2010-06-13 15:12:48.951840824 +0200 | ||
| 30 | +++ openjdk/jdk/make/sun/splashscreen/Makefile 2010-06-13 15:13:01.191422891 +0200 | ||
| 31 | @@ -55,6 +55,8 @@ | ||
| 32 | |||
| 33 | JAVALIB= | ||
| 34 | |||
| 35 | +LDLIBS += -liconv | ||
| 36 | + | ||
| 37 | # | ||
| 38 | # C Flags | ||
| 39 | # | ||
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 @@ | |||
| 1 | Index: openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c 2010-08-05 16:45:56.607257503 +0200 | ||
| 4 | +++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c 2010-08-05 16:47:19.727254686 +0200 | ||
| 5 | @@ -27,9 +27,6 @@ | ||
| 6 | #include <X11/Xutil.h> | ||
| 7 | #include <X11/Xos.h> | ||
| 8 | #include <X11/Xatom.h> | ||
| 9 | -#ifdef __linux__ | ||
| 10 | -#include <execinfo.h> | ||
| 11 | -#endif | ||
| 12 | |||
| 13 | #include <jvm.h> | ||
| 14 | #include <jni.h> | ||
| 15 | @@ -689,26 +686,6 @@ | ||
| 16 | return ret; | ||
| 17 | } | ||
| 18 | |||
| 19 | -#ifdef __linux__ | ||
| 20 | -void print_stack(void) | ||
| 21 | -{ | ||
| 22 | - void *array[10]; | ||
| 23 | - size_t size; | ||
| 24 | - char **strings; | ||
| 25 | - size_t i; | ||
| 26 | - | ||
| 27 | - size = backtrace (array, 10); | ||
| 28 | - strings = backtrace_symbols (array, size); | ||
| 29 | - | ||
| 30 | - fprintf (stderr, "Obtained %zd stack frames.\n", size); | ||
| 31 | - | ||
| 32 | - for (i = 0; i < size; i++) | ||
| 33 | - fprintf (stderr, "%s\n", strings[i]); | ||
| 34 | - | ||
| 35 | - free (strings); | ||
| 36 | -} | ||
| 37 | -#endif | ||
| 38 | - | ||
| 39 | Window get_xawt_root_shell(JNIEnv *env) { | ||
| 40 | static jclass classXRootWindow = NULL; | ||
| 41 | 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 @@ | |||
| 1 | Index: openjdk/jdk/make/com/sun/java/pack/Makefile | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/jdk/make/com/sun/java/pack/Makefile 2010-06-13 15:25:21.548426411 +0200 | ||
| 4 | +++ openjdk/jdk/make/com/sun/java/pack/Makefile 2010-06-13 15:25:43.858007543 +0200 | ||
| 5 | @@ -103,6 +103,7 @@ | ||
| 6 | OTHER_LDLIBS += $(LIBCXX) -lc | ||
| 7 | # setup the list of libraries to link in... | ||
| 8 | ifeq ($(PLATFORM), linux) | ||
| 9 | + OTHER_LDLIBS += -lpthread | ||
| 10 | ifeq ("$(CC_VER_MAJOR)", "3") | ||
| 11 | OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic | ||
| 12 | 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 @@ | |||
| 1 | Index: openjdk/hotspot/make/linux/makefiles/launcher.make | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk.orig/hotspot/make/linux/makefiles/launcher.make 2009-01-16 17:30:56.000000000 +0100 | ||
| 4 | +++ openjdk/hotspot/make/linux/makefiles/launcher.make 2009-01-16 17:31:13.000000000 +0100 | ||
| 5 | @@ -45,7 +45,7 @@ | ||
| 6 | else | ||
| 7 | LAUNCHER.o = launcher.o | ||
| 8 | LFLAGS_LAUNCHER += -L `pwd` | ||
| 9 | - LIBS_LAUNCHER += -l$(JVM) $(LIBS) | ||
| 10 | + LIBS_LAUNCHER += -l$(JVM) $(LIBS) -lstdc++ | ||
| 11 | endif | ||
| 12 | |||
| 13 | 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 @@ | |||
| 1 | Index: openjdk/jdk/make/java/net/Makefile | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/jdk/make/java/net/Makefile 2010-07-05 12:28:58.476625401 +0200 | ||
| 4 | +++ openjdk/jdk/make/java/net/Makefile 2010-07-05 12:29:11.876625138 +0200 | ||
| 5 | @@ -25,7 +25,7 @@ | ||
| 6 | |||
| 7 | BUILDDIR = ../.. | ||
| 8 | PACKAGE = java.net | ||
| 9 | -LIBRARY = net | ||
| 10 | +LIBRARY = javanet | ||
| 11 | PRODUCT = sun | ||
| 12 | include $(BUILDDIR)/common/Defs.gmk | ||
| 13 | |||
| 14 | Index: openjdk/jdk/make/java/nio/Makefile | ||
| 15 | =================================================================== | ||
| 16 | --- openjdk/jdk/make/java/nio/Makefile 2010-07-05 12:31:27.046626250 +0200 | ||
| 17 | +++ openjdk/jdk/make/java/nio/Makefile 2010-07-05 12:32:06.647874890 +0200 | ||
| 18 | @@ -139,11 +139,11 @@ | ||
| 19 | endif | ||
| 20 | ifeq ($(PLATFORM), linux) | ||
| 21 | COMPILER_WARNINGS_FATAL=true | ||
| 22 | -OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl | ||
| 23 | +OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -ljavanet -lpthread -ldl | ||
| 24 | endif | ||
| 25 | ifeq ($(PLATFORM), solaris) | ||
| 26 | OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 -ldl \ | ||
| 27 | - -L$(LIBDIR)/$(LIBARCH) -ljava -lnet | ||
| 28 | + -L$(LIBDIR)/$(LIBARCH) -ljava -ljavanet | ||
| 29 | endif # PLATFORM | ||
| 30 | |||
| 31 | # | ||
| 32 | Index: openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java | ||
| 33 | =================================================================== | ||
| 34 | --- openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2010-07-05 17:40:56.467876415 +0200 | ||
| 35 | +++ openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2010-07-05 17:41:43.326628410 +0200 | ||
| 36 | @@ -58,7 +58,7 @@ | ||
| 37 | */ | ||
| 38 | static { | ||
| 39 | java.security.AccessController.doPrivileged( | ||
| 40 | - new sun.security.action.LoadLibraryAction("net")); | ||
| 41 | + new sun.security.action.LoadLibraryAction("javanet")); | ||
| 42 | } | ||
| 43 | |||
| 44 | /** | ||
| 45 | Index: openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java | ||
| 46 | =================================================================== | ||
| 47 | --- openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2010-07-05 17:41:01.027875484 +0200 | ||
| 48 | +++ openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2010-07-05 17:41:56.826626386 +0200 | ||
| 49 | @@ -74,7 +74,7 @@ | ||
| 50 | */ | ||
| 51 | static { | ||
| 52 | java.security.AccessController.doPrivileged( | ||
| 53 | - new sun.security.action.LoadLibraryAction("net")); | ||
| 54 | + new sun.security.action.LoadLibraryAction("javanet")); | ||
| 55 | } | ||
| 56 | |||
| 57 | /** | ||
| 58 | Index: openjdk/jdk/src/share/classes/java/net/DatagramPacket.java | ||
| 59 | =================================================================== | ||
| 60 | --- openjdk/jdk/src/share/classes/java/net/DatagramPacket.java 2010-07-05 17:41:02.017875980 +0200 | ||
| 61 | +++ openjdk/jdk/src/share/classes/java/net/DatagramPacket.java 2010-07-05 17:42:06.057875677 +0200 | ||
| 62 | @@ -47,7 +47,7 @@ | ||
| 63 | */ | ||
| 64 | static { | ||
| 65 | java.security.AccessController.doPrivileged( | ||
| 66 | - new sun.security.action.LoadLibraryAction("net")); | ||
| 67 | + new sun.security.action.LoadLibraryAction("javanet")); | ||
| 68 | init(); | ||
| 69 | } | ||
| 70 | |||
| 71 | Index: openjdk/jdk/src/share/classes/java/net/InetAddress.java | ||
| 72 | =================================================================== | ||
| 73 | --- openjdk/jdk/src/share/classes/java/net/InetAddress.java 2010-07-05 17:41:02.756626429 +0200 | ||
| 74 | +++ openjdk/jdk/src/share/classes/java/net/InetAddress.java 2010-07-05 17:42:15.997875786 +0200 | ||
| 75 | @@ -230,7 +230,7 @@ | ||
| 76 | static { | ||
| 77 | preferIPv6Address = java.security.AccessController.doPrivileged( | ||
| 78 | new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue(); | ||
| 79 | - AccessController.doPrivileged(new LoadLibraryAction("net")); | ||
| 80 | + AccessController.doPrivileged(new LoadLibraryAction("javanet")); | ||
| 81 | init(); | ||
| 82 | } | ||
| 83 | |||
| 84 | Index: openjdk/jdk/src/share/classes/java/net/NetworkInterface.java | ||
| 85 | =================================================================== | ||
| 86 | --- openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2010-07-05 17:41:03.547875282 +0200 | ||
| 87 | +++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2010-07-05 17:42:22.647875475 +0200 | ||
| 88 | @@ -52,7 +52,7 @@ | ||
| 89 | private boolean virtual = false; | ||
| 90 | |||
| 91 | static { | ||
| 92 | - AccessController.doPrivileged(new LoadLibraryAction("net")); | ||
| 93 | + AccessController.doPrivileged(new LoadLibraryAction("javanet")); | ||
| 94 | init(); | ||
| 95 | } | ||
| 96 | |||
| 97 | Index: openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java | ||
| 98 | =================================================================== | ||
| 99 | --- openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2010-07-05 17:41:04.306628153 +0200 | ||
| 100 | +++ openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2010-07-05 17:42:32.666627264 +0200 | ||
| 101 | @@ -89,7 +89,7 @@ | ||
| 102 | }}); | ||
| 103 | if (b != null && b.booleanValue()) { | ||
| 104 | java.security.AccessController.doPrivileged( | ||
| 105 | - new sun.security.action.LoadLibraryAction("net")); | ||
| 106 | + new sun.security.action.LoadLibraryAction("javanet")); | ||
| 107 | hasSystemProxies = init(); | ||
| 108 | } | ||
| 109 | } | ||
| 110 | 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 | ||
| 111 | =================================================================== | ||
| 112 | --- openjdk/jdk/src/share/classes/sun/nio/ch/Util.java 2010-07-05 17:41:05.086626745 +0200 | ||
| 113 | +++ openjdk/jdk/src/share/classes/sun/nio/ch/Util.java 2010-07-05 17:42:39.266626410 +0200 | ||
| 114 | @@ -354,7 +354,7 @@ | ||
| 115 | return; | ||
| 116 | loaded = true; | ||
| 117 | java.security.AccessController | ||
| 118 | - .doPrivileged(new sun.security.action.LoadLibraryAction("net")); | ||
| 119 | + .doPrivileged(new sun.security.action.LoadLibraryAction("javanet")); | ||
| 120 | java.security.AccessController | ||
| 121 | .doPrivileged(new sun.security.action.LoadLibraryAction("nio")); | ||
| 122 | // IOUtil must be initialized; Its native methods are called from | ||
| 123 | Index: openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java | ||
| 124 | =================================================================== | ||
| 125 | --- openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2010-07-05 17:41:05.896626691 +0200 | ||
| 126 | +++ openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2010-07-05 17:42:45.606625991 +0200 | ||
| 127 | @@ -244,7 +244,7 @@ | ||
| 128 | |||
| 129 | static { | ||
| 130 | java.security.AccessController.doPrivileged( | ||
| 131 | - new sun.security.action.LoadLibraryAction("net")); | ||
| 132 | + new sun.security.action.LoadLibraryAction("javanet")); | ||
| 133 | } | ||
| 134 | |||
| 135 | } | ||
| 136 | 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 | ||
| 137 | =================================================================== | ||
| 138 | --- openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2010-07-05 17:41:06.786627210 +0200 | ||
| 139 | +++ openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2010-07-05 17:42:51.926627747 +0200 | ||
| 140 | @@ -160,7 +160,7 @@ | ||
| 141 | |||
| 142 | static { | ||
| 143 | java.security.AccessController.doPrivileged( | ||
| 144 | - new sun.security.action.LoadLibraryAction("net")); | ||
| 145 | + new sun.security.action.LoadLibraryAction("javanet")); | ||
| 146 | init0(); | ||
| 147 | |||
| 148 | // 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 @@ | |||
| 1 | Index: openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-11-18 20:38:09.000000000 +0100 | ||
| 4 | +++ openjdk/hotspot/src/share/vm/shark/llvmHeaders.hpp 2011-11-18 21:03:15.781644337 +0100 | ||
| 5 | @@ -38,7 +38,11 @@ | ||
| 6 | #include <llvm/ModuleProvider.h> | ||
| 7 | #endif | ||
| 8 | #include <llvm/Support/IRBuilder.h> | ||
| 9 | +#if SHARK_LLVM_VERSION >= 29 | ||
| 10 | +#include <llvm/Support/Threading.h> | ||
| 11 | +#else | ||
| 12 | #include <llvm/System/Threading.h> | ||
| 13 | +#endif | ||
| 14 | #include <llvm/Target/TargetSelect.h> | ||
| 15 | #include <llvm/Type.h> | ||
| 16 | #include <llvm/ExecutionEngine/JITMemoryManager.h> | ||
| 17 | @@ -47,8 +51,12 @@ | ||
| 18 | #include <llvm/ExecutionEngine/JIT.h> | ||
| 19 | #include <llvm/ADT/StringMap.h> | ||
| 20 | #include <llvm/Support/Debug.h> | ||
| 21 | +#if SHARK_LLVM_VERSION >= 29 | ||
| 22 | +#include <llvm/Support/Host.h> | ||
| 23 | +#else | ||
| 24 | #include <llvm/System/Host.h> | ||
| 25 | #endif | ||
| 26 | +#endif | ||
| 27 | |||
| 28 | #include <map> | ||
| 29 | |||
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 @@ | |||
| 1 | Index: openjdk/hotspot/make/linux/makefiles/gcc.make | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/hotspot/make/linux/makefiles/gcc.make 2010-02-02 16:11:35.758533706 +0100 | ||
| 4 | +++ openjdk/hotspot/make/linux/makefiles/gcc.make 2010-02-02 16:11:42.761456458 +0100 | ||
| 5 | @@ -98,9 +98,6 @@ | ||
| 6 | CFLAGS += -pipe | ||
| 7 | endif | ||
| 8 | |||
| 9 | -# Compiler warnings are treated as errors | ||
| 10 | -WARNINGS_ARE_ERRORS = -Werror | ||
| 11 | - | ||
| 12 | # Except for a few acceptable ones | ||
| 13 | # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit | ||
| 14 | # 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 @@ | |||
| 1 | Index: openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h | ||
| 2 | =================================================================== | ||
| 3 | --- openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:49:39.972718207 +0100 | ||
| 4 | +++ openjdk/jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2010-02-02 13:50:04.635639302 +0100 | ||
| 5 | @@ -27,13 +27,11 @@ | ||
| 6 | |||
| 7 | #include "jfdlibm.h" | ||
| 8 | |||
| 9 | -#ifdef __NEWVALID /* special setup for Sun test regime */ | ||
| 10 | #if defined(i386) || defined(i486) || \ | ||
| 11 | defined(intel) || defined(x86) || \ | ||
| 12 | defined(i86pc) || defined(_M_IA64) || defined(ia64) | ||
| 13 | #define _LITTLE_ENDIAN | ||
| 14 | #endif | ||
| 15 | -#endif | ||
| 16 | |||
| 17 | #ifdef _LITTLE_ENDIAN | ||
| 18 | #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 @@ | |||
| 1 | # Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. | ||
| 2 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
| 3 | # | ||
| 4 | # This code is free software; you can redistribute it and/or modify it | ||
| 5 | # under the terms of the GNU General Public License version 2 only, as | ||
| 6 | # published by the Free Software Foundation. Sun designates this | ||
| 7 | # particular file as subject to the "Classpath" exception as provided | ||
| 8 | # by Sun in the LICENSE file that accompanied this code. | ||
| 9 | # | ||
| 10 | # This code is distributed in the hope that it will be useful, but WITHOUT | ||
| 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
| 13 | # version 2 for more details (a copy is included in the LICENSE file that | ||
| 14 | # accompanied this code). | ||
| 15 | # | ||
| 16 | # You should have received a copy of the GNU General Public License version | ||
| 17 | # 2 along with this work; if not, write to the Free Software Foundation, | ||
| 18 | # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
| 19 | # | ||
| 20 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | ||
| 21 | # CA 95054 USA or visit www.sun.com if you need additional information or | ||
| 22 | # have any questions. | ||
| 23 | # | ||
| 24 | # | ||
| 25 | # List of JVMs that can be used as an option to java, javac, etc. | ||
| 26 | # Order is important -- first in this list is the default JVM. | ||
| 27 | # NOTE that this both this file and its format are UNSUPPORTED and | ||
| 28 | # WILL GO AWAY in a future release. | ||
| 29 | # | ||
| 30 | # You may also select a JVM in an arbitrary location with the | ||
| 31 | # "-XXaltjvm=<jvm_dir>" option, but that too is unsupported | ||
| 32 | # and may not be available in a future release. | ||
| 33 | # | ||
| 34 | -server ERROR | ||
| 35 | -client IGNORE | ||
| 36 | -hotspot ERROR | ||
| 37 | -classic WARN | ||
| 38 | -native ERROR | ||
| 39 | -green ERROR | ||
| 40 | -zero ALIASED_TO -server | ||
| 41 | -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 @@ | |||
| 1 | Index: icedtea6/ports/hotspot/tools/mkbc.c | ||
| 2 | =================================================================== | ||
| 3 | --- icedtea6.orig/ports/hotspot/tools/mkbc.c 2010-04-01 12:25:13.791317722 +0200 | ||
| 4 | +++ icedtea6/ports/hotspot/tools/mkbc.c 2010-04-01 12:27:34.151606177 +0200 | ||
| 5 | @@ -602,4 +602,6 @@ | ||
| 6 | if (ferror(bci_f)) fatal("Error writing bci"); | ||
| 7 | if (source_f != stdin) fclose(source_f); | ||
| 8 | if (bci_f != stdout) fclose(bci_f); | ||
| 9 | + | ||
| 10 | + return 0; | ||
| 11 | } | ||
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 @@ | |||
| 1 | Index: icedtea6-1.8/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp | ||
| 2 | =================================================================== | ||
| 3 | --- icedtea6-1.8.orig/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp 2010-07-14 16:42:48.412103129 +0200 | ||
| 4 | +++ icedtea6-1.8/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp 2010-07-14 16:50:51.680282178 +0200 | ||
| 5 | @@ -32,6 +32,96 @@ | ||
| 6 | |||
| 7 | #if SHARK_LLVM_VERSION >= 27 | ||
| 8 | namespace { | ||
| 9 | + | ||
| 10 | +#if defined(__arm__) && defined(__linux__) | ||
| 11 | +#include <fcntl.h> | ||
| 12 | +#include <linux/auxvec.h> | ||
| 13 | +#include <asm/hwcap.h> | ||
| 14 | +#define VECBUFF_SIZE 32 | ||
| 15 | + | ||
| 16 | +bool TestARMLinuxHWCAP(int feature) { | ||
| 17 | + int fd; | ||
| 18 | + unsigned vecs[VECBUFF_SIZE]; | ||
| 19 | + unsigned *p; | ||
| 20 | + int i, n; | ||
| 21 | + int rc; | ||
| 22 | + | ||
| 23 | + rc = 0; | ||
| 24 | + fd = open("/proc/self/auxv", O_RDONLY); | ||
| 25 | + if (fd < 0) return 0; | ||
| 26 | + do { | ||
| 27 | + n = read(fd, vecs, VECBUFF_SIZE * sizeof(unsigned)); | ||
| 28 | + p = vecs; | ||
| 29 | + i = n/8; | ||
| 30 | + while (--i >=0) { | ||
| 31 | + unsigned tag = *p++; | ||
| 32 | + unsigned value = *p++; | ||
| 33 | + if (tag == 0) goto fini; | ||
| 34 | + if(tag == AT_HWCAP && (value & feature)) { | ||
| 35 | + rc = 1; | ||
| 36 | + goto fini; | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | + } while (n == VECBUFF_SIZE * sizeof(unsigned)); | ||
| 40 | +fini: | ||
| 41 | + close(fd); | ||
| 42 | + return rc; | ||
| 43 | +} | ||
| 44 | + | ||
| 45 | +char* TestARMLinuxAT(int auxvec) { | ||
| 46 | + int fd; | ||
| 47 | + unsigned vecs[VECBUFF_SIZE]; | ||
| 48 | + unsigned *p; | ||
| 49 | + int i, n; | ||
| 50 | + char* rc; | ||
| 51 | + | ||
| 52 | + rc = 0; | ||
| 53 | + fd = open("/proc/self/auxv", O_RDONLY); | ||
| 54 | + if (fd < 0) return 0; | ||
| 55 | + do { | ||
| 56 | + n = read(fd, vecs, VECBUFF_SIZE * sizeof(unsigned)); | ||
| 57 | + p = vecs; | ||
| 58 | + i = n/8; | ||
| 59 | + while (--i >=0) { | ||
| 60 | + unsigned tag = *p++; | ||
| 61 | + unsigned value = *p++; | ||
| 62 | + if (tag == 0) goto fini; | ||
| 63 | + if(tag == (unsigned) auxvec ) { | ||
| 64 | + rc = (char*)value; | ||
| 65 | + goto fini; | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + } while (n == VECBUFF_SIZE * sizeof(unsigned)); | ||
| 69 | +fini: | ||
| 70 | + close(fd); | ||
| 71 | + return rc; | ||
| 72 | +} | ||
| 73 | + | ||
| 74 | +bool getARMHostCPUFeatures(StringMap<bool> &Features) { | ||
| 75 | + // FIXME LLVM PR6561 // Features["neon"]=TestARMLinuxHWCAP(HWCAP_NEON); | ||
| 76 | + Features["thumb2"]=TestARMLinuxHWCAP(HWCAP_THUMBEE); | ||
| 77 | + Features["vfp2"]=TestARMLinuxHWCAP(HWCAP_VFP); | ||
| 78 | + | ||
| 79 | + std::string testArchKey(TestARMLinuxAT(AT_PLATFORM)); | ||
| 80 | + | ||
| 81 | + StringMap<std::string> archLinuxToLLVMMap; | ||
| 82 | + archLinuxToLLVMMap["v4l"]="v4t"; | ||
| 83 | + archLinuxToLLVMMap["v5l"]="v5t"; | ||
| 84 | + archLinuxToLLVMMap["v6l"]="v6"; | ||
| 85 | + // FIXME change this from v6 to v7a when LLVM PR7048 have been fixed | ||
| 86 | + archLinuxToLLVMMap["v7l"]="v6"; | ||
| 87 | + | ||
| 88 | + llvm::StringMapIterator<std::string> resultIterator(archLinuxToLLVMMap.find( | ||
| 89 | + testArchKey)); | ||
| 90 | + if(resultIterator->first()) { | ||
| 91 | + std::string arch(resultIterator->second); | ||
| 92 | + Features[arch]=true; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + return true; | ||
| 96 | +} | ||
| 97 | +#endif | ||
| 98 | + | ||
| 99 | cl::opt<std::string> | ||
| 100 | MCPU("mcpu"); | ||
| 101 | |||
| 102 | @@ -64,7 +154,11 @@ | ||
| 103 | #if SHARK_LLVM_VERSION >= 27 | ||
| 104 | // Finetune LLVM for the current host CPU. | ||
| 105 | StringMap<bool> Features; | ||
| 106 | +#if defined(__arm__) && defined(__linux__) | ||
| 107 | + bool gotCpuFeatures = getARMHostCPUFeatures(Features); | ||
| 108 | +#else | ||
| 109 | bool gotCpuFeatures = llvm::sys::getHostCPUFeatures(Features); | ||
| 110 | +#endif | ||
| 111 | std::string cpu("-mcpu=" + llvm::sys::getHostCPUName()); | ||
| 112 | |||
| 113 | 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 @@ | |||
| 1 | Index: icedtea6-1.8/Makefile.am | ||
| 2 | =================================================================== | ||
| 3 | --- icedtea6-1.8.orig/Makefile.am 2010-06-30 11:30:49.526648376 +0200 | ||
| 4 | +++ icedtea6-1.8/Makefile.am 2010-06-30 11:42:02.606648734 +0200 | ||
| 5 | @@ -1882,7 +1882,7 @@ | ||
| 6 | # configure script arguments, quoted in single quotes | ||
| 7 | CONFIGURE_ARGS = @CONFIGURE_ARGS@ | ||
| 8 | ADD_ZERO_CONFIGURE_ARGS = \ | ||
| 9 | - --with-openjdk=$(abs_top_builddir)/$(BUILD_OUTPUT_DIR)/j2sdk-image \ | ||
| 10 | + --with-openjdk=$(abs_top_builddir)/bootstrap/jdk1.6.0 \ | ||
| 11 | --enable-zero | ||
| 12 | if ADD_SHARK_BUILD | ||
| 13 | 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 @@ | |||
| 1 | Index: icedtea6-1.8/ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp | ||
| 2 | =================================================================== | ||
| 3 | --- 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 | ||
| 4 | +++ icedtea6-1.8/ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp 2010-06-17 10:29:19.034668305 +0200 | ||
| 5 | @@ -266,7 +266,15 @@ | ||
| 6 | volatile jlong* dest, | ||
| 7 | jlong compare_value) { | ||
| 8 | |||
| 9 | +#ifdef ARM | ||
| 10 | + return arm_compare_and_swap((jint *) dest, (jint) compare_value, (jint) exchange_value); | ||
| 11 | +#else | ||
| 12 | +#ifdef M68K | ||
| 13 | + return m68k_compare_and_swap((jint *) dest, (jint) compare_value, (jint) exchange_value); | ||
| 14 | +#else | ||
| 15 | return __sync_val_compare_and_swap(dest, compare_value, exchange_value); | ||
| 16 | +#endif // M68K | ||
| 17 | +#endif // ARM | ||
| 18 | } | ||
| 19 | |||
| 20 | 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 @@ | |||
| 1 | require openjdk-6-release-6b18.inc | ||
| 2 | |||
| 3 | PR = "${INC_PR}.0" | ||
| 4 | |||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" | ||
| 6 | |||
| 7 | ICEDTEA = "icedtea6-1.8.11" | ||
| 8 | |||
| 9 | SRC_URI[iced.md5sum] = "e0edfb08a4eedf1b9f1cef26a9bd4ab4" | ||
| 10 | SRC_URI[iced.sha256sum] = "6eb418ec0609080a71bda16896124d6e1ac23b2f54af52e05fc22c719e12ca29" | ||
| 11 | |||
