diff options
Diffstat (limited to 'recipes-core/openjdk/openjdk-6-common.inc')
| -rw-r--r-- | recipes-core/openjdk/openjdk-6-common.inc | 80 |
1 files changed, 2 insertions, 78 deletions
diff --git a/recipes-core/openjdk/openjdk-6-common.inc b/recipes-core/openjdk/openjdk-6-common.inc index f186e91..49808d7 100644 --- a/recipes-core/openjdk/openjdk-6-common.inc +++ b/recipes-core/openjdk/openjdk-6-common.inc | |||
| @@ -1,15 +1,7 @@ | |||
| 1 | DESCRIPTION = "Java runtime based upon the OpenJDK- and Icedtea Project" | 1 | require openjdk-common.inc |
| 2 | HOMEPAGE = "http://icedtea.classpath.org" | ||
| 3 | LICENSE = "GPL-2.0-with-classpath-exception" | ||
| 4 | PRIORITY = "optional" | ||
| 5 | SECTION = "libs" | ||
| 6 | 2 | ||
| 7 | ICEDTEA_VERSION = "${@bb.parse.BBHandler.vars_from_file(d.getVar('FILE'),d)[1].split("-")[1] or '1.0'}" | ||
| 8 | ICEDTEA = "icedtea6-${ICEDTEA_VERSION}" | 3 | ICEDTEA = "icedtea6-${ICEDTEA_VERSION}" |
| 9 | 4 | ||
| 10 | S = "${WORKDIR}/${ICEDTEA}" | ||
| 11 | B = "${S}/build" | ||
| 12 | |||
| 13 | INC_PR = "r21" | 5 | INC_PR = "r21" |
| 14 | 6 | ||
| 15 | SRC_URI = "\ | 7 | SRC_URI = "\ |
| @@ -41,15 +33,6 @@ DEPENDS = "giflib libpng jpeg cups \ | |||
| 41 | zip-native \ | 33 | zip-native \ |
| 42 | " | 34 | " |
| 43 | 35 | ||
| 44 | DEPENDS_append_libc-uclibc = " virtual/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 = " qemu-native " | ||
| 51 | |||
| 52 | |||
| 53 | # No package should directly depend on this (it should require | 36 | # No package should directly depend on this (it should require |
| 54 | # java2-runtime instead). | 37 | # java2-runtime instead). |
| 55 | PRIVATE_LIBS = "\ | 38 | PRIVATE_LIBS = "\ |
| @@ -67,8 +50,6 @@ PRIVATE_LIBS = "\ | |||
| 67 | " | 50 | " |
| 68 | 51 | ||
| 69 | 52 | ||
| 70 | inherit java autotools gettext qemu | ||
| 71 | |||
| 72 | export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}" | 53 | export ALT_CUPS_HEADERS_PATH = "${STAGING_INCDIR}" |
| 73 | export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2" | 54 | export ALT_FREETYPE_HEADERS_PATH = "${STAGING_INCDIR}/freetype2" |
| 74 | export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}" | 55 | export ALT_FREETYPE_LIB_PATH = "${STAGING_LIBDIR}" |
| @@ -101,26 +82,6 @@ EXTRA_OECONF = "\ | |||
| 101 | " | 82 | " |
| 102 | 83 | ||
| 103 | 84 | ||
| 104 | # OpenJDK uses slightly different names for certain arches. We need to know | ||
| 105 | # this to create some files which are expected by the build. | ||
| 106 | def get_jdk_arch(d): | ||
| 107 | import bb | ||
| 108 | |||
| 109 | jdk_arch = bb.data.getVar('TARGET_ARCH', d, 1) | ||
| 110 | if jdk_arch == "x86_64": | ||
| 111 | jdk_arch = "amd64" | ||
| 112 | elif jdk_arch == "powerpc": | ||
| 113 | jdk_arch = "ppc" | ||
| 114 | elif jdk_arch == "powerpc64": | ||
| 115 | jdk_arch = "ppc64" | ||
| 116 | elif (jdk_arch == "i486" or jdk_arch == "i586" or jdk_arch == "i686"): | ||
| 117 | jdk_arch = "i386" | ||
| 118 | |||
| 119 | return jdk_arch | ||
| 120 | |||
| 121 | JDK_ARCH = "${@get_jdk_arch(d)}" | ||
| 122 | JDK_HOME = "${libdir_jvm}/${JDK_DIR}" | ||
| 123 | |||
| 124 | # OpenJDK supports parallel compilation but uses a plain number for this. | 85 | # OpenJDK supports parallel compilation but uses a plain number for this. |
| 125 | # In OE we have PARALLEL_MAKE which is the actual option passed to make, | 86 | # In OE we have PARALLEL_MAKE which is the actual option passed to make, |
| 126 | # e.g. "-j 4". | 87 | # e.g. "-j 4". |
| @@ -140,24 +101,6 @@ def get_jdk_jobs(d): | |||
| 140 | 101 | ||
| 141 | JDK_JOBS = "${@get_jdk_jobs(d)}" | 102 | JDK_JOBS = "${@get_jdk_jobs(d)}" |
| 142 | 103 | ||
| 143 | # A function that is needed in the Shark builds. | ||
| 144 | def get_llvm_configure_arch(d): | ||
| 145 | import bb; | ||
| 146 | |||
| 147 | arch = bb.data.getVar('TARGET_ARCH', d, 1) | ||
| 148 | if arch == "x86_64" or arch == "i486" or arch == "i586" or arch == "i686": | ||
| 149 | arch = "x86" | ||
| 150 | elif arch == "arm": | ||
| 151 | arch = "arm" | ||
| 152 | elif arch == "mipsel" or arch == "mips": | ||
| 153 | arch = "mips" | ||
| 154 | elif arch == "powerpc" or arch == "powerpc64": | ||
| 155 | arch = "powerpc" | ||
| 156 | else: | ||
| 157 | bb.warn("%s does not support %s yet" % (bb.data.getVar('PN', d, 1), arch) ); | ||
| 158 | |||
| 159 | return arch | ||
| 160 | |||
| 161 | # Custom preparation of the sources which: | 104 | # Custom preparation of the sources which: |
| 162 | # - cleans up the sources | 105 | # - cleans up the sources |
| 163 | # - copies the patches into the proper directory | 106 | # - copies the patches into the proper directory |
| @@ -216,7 +159,7 @@ do_configure_append() { | |||
| 216 | # passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are | 159 | # passing a valid ${PARALLEL_MAKE} to it. OTOH OpenJDK's makefiles are |
| 217 | # parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. | 160 | # parallelizable and we need ${PARALLEL_MAKE} to derive the proper value. |
| 218 | # The base for this quirk is that GNU Make only considers the last "-j" option. | 161 | # The base for this quirk is that GNU Make only considers the last "-j" option. |
| 219 | EXTRA_OEMAKE = '-j 1 CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"' | 162 | EXTRA_OEMAKE += '-j 1 CC="${CC}" CCC="${CXX}" CPP="${CPP}" CXX="${CXX}" CC_FOR_BUILD="${BUILD_CC}"' |
| 220 | 163 | ||
| 221 | EXTRA_OEMAKE += ' \ | 164 | EXTRA_OEMAKE += ' \ |
| 222 | OE_CFLAGS="${TARGET_CFLAGS}" \ | 165 | OE_CFLAGS="${TARGET_CFLAGS}" \ |
| @@ -226,30 +169,11 @@ EXTRA_OEMAKE += ' \ | |||
| 226 | ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \ | 169 | ZIPEXE="${STAGING_BINDIR_NATIVE}/zip" \ |
| 227 | ' | 170 | ' |
| 228 | 171 | ||
| 229 | # Puts an OE specific string into the binary making it possible for the user | ||
| 230 | # to know where it comes from (and blame the right people ...). | ||
| 231 | DIST_ID = "Built for ${DISTRO}" | ||
| 232 | DIST_NAME = "${DISTRO}" | ||
| 233 | EXTRA_OEMAKE += 'DIST_NAME="${DIST_NAME}" DIST_ID="${DIST_ID}"' | ||
| 234 | |||
| 235 | |||
| 236 | # llvm configure and compiles stuff | ||
| 237 | |||
| 238 | export WANT_LLVM_RELEASE = "2.8" | ||
| 239 | |||
| 240 | # Provides the target architecture to the configure script. | ||
| 241 | export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}" | ||
| 242 | |||
| 243 | OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm${WANT_LLVM_RELEASE} -Wl,-rpath,/usr/lib/llvm${WANT_LLVM_RELEASE}" | 172 | OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm${WANT_LLVM_RELEASE} -Wl,-rpath,/usr/lib/llvm${WANT_LLVM_RELEASE}" |
| 244 | 173 | ||
| 245 | EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"' | 174 | EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"' |
| 246 | 175 | ||
| 247 | 176 | ||
| 248 | # Large stack is required at least on x86_64 host, otherwise random segfaults appear: | ||
| 249 | QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET} -E LD_LIBRARY_PATH=${STAGING_BASELIBDIR}" | ||
| 250 | |||
| 251 | EXTRA_OEMAKE += 'QEMU="${QEMU}"' | ||
| 252 | |||
| 253 | # The build of OpenJDK is a 3-part process. For better restartability and overrideability they have been split into | 177 | # The build of OpenJDK is a 3-part process. For better restartability and overrideability they have been split into |
| 254 | # three functions. | 178 | # three functions. |
| 255 | # 1. compile Hotspot or Cacao (this one is supposed to be implemented according to wanted VM) | 179 | # 1. compile Hotspot or Cacao (this one is supposed to be implemented according to wanted VM) |
