diff options
| author | Richard Leitner <richard.leitner@skidata.com> | 2018-08-20 23:14:39 +0200 |
|---|---|---|
| committer | Richard Leitner <richard.leitner@skidata.com> | 2018-10-02 07:59:06 +0200 |
| commit | 52479af161f235095b8a4b85e5de54c4edfb0754 (patch) | |
| tree | 9687ff2c77c71e33b18f09255aeae9878370679b | |
| parent | b8763325d9cb6d27d6215b51bc87658f97b36913 (diff) | |
| download | meta-java-52479af161f235095b8a4b85e5de54c4edfb0754.tar.gz | |
openjdk-7: use openjdk_build_helper's ARCH translation functions
As the openjdk_build_helper now provides the ARCH translation function
use those and drop the local ones.
Furthermore remove the duplicated LLVM_CONFIGURE_ARCH export.
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
| -rw-r--r-- | recipes-core/openjdk/openjdk-7-common.inc | 3 | ||||
| -rw-r--r-- | recipes-core/openjdk/openjdk-common.inc | 40 |
2 files changed, 2 insertions, 41 deletions
diff --git a/recipes-core/openjdk/openjdk-7-common.inc b/recipes-core/openjdk/openjdk-7-common.inc index 0ef6758..6b02a4f 100644 --- a/recipes-core/openjdk/openjdk-7-common.inc +++ b/recipes-core/openjdk/openjdk-7-common.inc | |||
| @@ -126,9 +126,6 @@ EXTRA_OEMAKE += ' \ | |||
| 126 | UNZIP_BIN="${STAGING_BINDIR_NATIVE}/unzip" \ | 126 | UNZIP_BIN="${STAGING_BINDIR_NATIVE}/unzip" \ |
| 127 | ' | 127 | ' |
| 128 | 128 | ||
| 129 | # Provides the target architecture to the configure script. | ||
| 130 | export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}" | ||
| 131 | |||
| 132 | OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm${WANT_LLVM_RELEASE} -Wl,-rpath,${libdir}/llvm${WANT_LLVM_RELEASE}" | 129 | OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm${WANT_LLVM_RELEASE} -Wl,-rpath,${libdir}/llvm${WANT_LLVM_RELEASE}" |
| 133 | 130 | ||
| 134 | OE_LAUNCHER_LDFLAGS_arm = "" | 131 | OE_LAUNCHER_LDFLAGS_arm = "" |
diff --git a/recipes-core/openjdk/openjdk-common.inc b/recipes-core/openjdk/openjdk-common.inc index 4e2eb94..ce3e39e 100644 --- a/recipes-core/openjdk/openjdk-common.inc +++ b/recipes-core/openjdk/openjdk-common.inc | |||
| @@ -21,46 +21,10 @@ inherit openjdk-build-helper | |||
| 21 | 21 | ||
| 22 | B = "${S}/build" | 22 | B = "${S}/build" |
| 23 | 23 | ||
| 24 | # OpenJDK uses slightly different names for certain arches. We need to know | 24 | JDK_ARCH = "${@openjdk_build_helper_get_jdk_arch(d)}" |
| 25 | # this to create some files which are expected by the build. | ||
| 26 | def get_jdk_arch(d): | ||
| 27 | import bb | ||
| 28 | |||
| 29 | jdk_arch = d.getVar('TRANSLATED_TARGET_ARCH', True) | ||
| 30 | if jdk_arch == "x86-64": | ||
| 31 | jdk_arch = "amd64" | ||
| 32 | elif jdk_arch == "powerpc": | ||
| 33 | jdk_arch = "ppc" | ||
| 34 | elif jdk_arch == "powerpc64": | ||
| 35 | jdk_arch = "ppc64" | ||
| 36 | elif (jdk_arch == "i486" or jdk_arch == "i586" or jdk_arch == "i686"): | ||
| 37 | jdk_arch = "i386" | ||
| 38 | |||
| 39 | return jdk_arch | ||
| 40 | |||
| 41 | JDK_ARCH = "${@get_jdk_arch(d)}" | ||
| 42 | JDK_HOME = "${libdir_jvm}/${JDK_DIR}" | 25 | JDK_HOME = "${libdir_jvm}/${JDK_DIR}" |
| 43 | JDK_FAKE = "${WORKDIR}/fake-jdk" | 26 | JDK_FAKE = "${WORKDIR}/fake-jdk" |
| 44 | 27 | ||
| 45 | # A function that is needed in the Shark builds. | ||
| 46 | def get_llvm_configure_arch(d): | ||
| 47 | import bb; | ||
| 48 | |||
| 49 | arch = d.getVar('TRANSLATED_TARGET_ARCH', True) | ||
| 50 | if arch == "x86-64" or arch == "i486" or arch == "i586" or arch == "i686": | ||
| 51 | arch = "x86" | ||
| 52 | elif arch == "arm": | ||
| 53 | arch = "arm" | ||
| 54 | elif arch == "mipsel" or arch == "mips": | ||
| 55 | arch = "mips" | ||
| 56 | elif arch == "powerpc" or arch == "powerpc64": | ||
| 57 | arch = "powerpc" | ||
| 58 | else: | ||
| 59 | if 'shark' in d.getVar('PACKAGECONFIG').split(): | ||
| 60 | bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN', True), arch) ); | ||
| 61 | |||
| 62 | return arch | ||
| 63 | |||
| 64 | # Puts an OE specific string into the binary making it possible for the user | 28 | # Puts an OE specific string into the binary making it possible for the user |
| 65 | # to know where it comes from (and blame the right people ...). | 29 | # to know where it comes from (and blame the right people ...). |
| 66 | DIST_ID = "Built for ${DISTRO}" | 30 | DIST_ID = "Built for ${DISTRO}" |
| @@ -72,7 +36,7 @@ EXTRA_OEMAKE = 'DIST_NAME="${DIST_NAME}" DIST_ID="${DIST_ID}"' | |||
| 72 | export WANT_LLVM_RELEASE = "2.8" | 36 | export WANT_LLVM_RELEASE = "2.8" |
| 73 | 37 | ||
| 74 | # Provides the target architecture to the configure script. | 38 | # Provides the target architecture to the configure script. |
| 75 | export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}" | 39 | export LLVM_CONFIGURE_ARCH="${@openjdk_build_helper_get_llvm_configure_arch(d)}" |
| 76 | 40 | ||
| 77 | # Large stack is required at least on x86_64 host, otherwise random segfaults appear: | 41 | # Large stack is required at least on x86_64 host, otherwise random segfaults appear: |
| 78 | QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 2097152" | 42 | QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 2097152" |
