summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2018-08-20 23:14:39 +0200
committerRichard Leitner <richard.leitner@skidata.com>2018-10-02 07:59:06 +0200
commit52479af161f235095b8a4b85e5de54c4edfb0754 (patch)
tree9687ff2c77c71e33b18f09255aeae9878370679b
parentb8763325d9cb6d27d6215b51bc87658f97b36913 (diff)
downloadmeta-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.inc3
-rw-r--r--recipes-core/openjdk/openjdk-common.inc40
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.
130export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}"
131
132OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm${WANT_LLVM_RELEASE} -Wl,-rpath,${libdir}/llvm${WANT_LLVM_RELEASE}" 129OE_LAUNCHER_LDFLAGS = "-Wl,-rpath-link,${STAGING_LIBDIR}/llvm${WANT_LLVM_RELEASE} -Wl,-rpath,${libdir}/llvm${WANT_LLVM_RELEASE}"
133 130
134OE_LAUNCHER_LDFLAGS_arm = "" 131OE_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
22B = "${S}/build" 22B = "${S}/build"
23 23
24# OpenJDK uses slightly different names for certain arches. We need to know 24JDK_ARCH = "${@openjdk_build_helper_get_jdk_arch(d)}"
25# this to create some files which are expected by the build.
26def 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
41JDK_ARCH = "${@get_jdk_arch(d)}"
42JDK_HOME = "${libdir_jvm}/${JDK_DIR}" 25JDK_HOME = "${libdir_jvm}/${JDK_DIR}"
43JDK_FAKE = "${WORKDIR}/fake-jdk" 26JDK_FAKE = "${WORKDIR}/fake-jdk"
44 27
45# A function that is needed in the Shark builds.
46def 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 ...).
66DIST_ID = "Built for ${DISTRO}" 30DIST_ID = "Built for ${DISTRO}"
@@ -72,7 +36,7 @@ EXTRA_OEMAKE = 'DIST_NAME="${DIST_NAME}" DIST_ID="${DIST_ID}"'
72export WANT_LLVM_RELEASE = "2.8" 36export 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.
75export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}" 39export 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:
78QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 2097152" 42QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 2097152"