[oe] [meta-java][PATCH 2/7] openjdk-8: use openjdk_build_helper's ARCH translation functions

Richard Leitner richard.leitner at skidata.com
Mon Aug 20 21:14:38 UTC 2018


As the openjdk_build_helper now provides the ARCH translation function
use those and drop the local ones.

Signed-off-by: Richard Leitner <richard.leitner at skidata.com>
---
 recipes-core/openjdk/openjdk-8-common.inc | 43 +++----------------------------
 1 file changed, 3 insertions(+), 40 deletions(-)

diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index 7348657..e45bcf4 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -160,46 +160,9 @@ do_configure_prepend() {
         export ${@jdk_environment_options(d)}
 }
 
-# A function that is needed in the Shark builds.
-def get_llvm_configure_arch(d):
-    import bb;
-
-    arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
-    if arch == "x86-64" or arch == "i486" or arch == "i586" or arch == "i686":
-        arch = "x86"
-    elif arch == "arm":
-        arch = "arm"
-    elif arch == "mipsel" or arch == "mips":
-        arch = "mips"
-    elif arch == "powerpc" or arch == "powerpc64":
-        arch = "powerpc"
-    else:
-        if 'shark' in d.getVar('PACKAGECONFIG').split():
-            bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN', True), arch) );
-
-    return arch
-
-# Provides the target architecture to the configure script.
-export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}"
-
-# OpenJDK uses slightly different names for certain arches. We need to know
-# this to create some files which are expected by the build.
-def get_jdk_arch(d):
-    import bb
-
-    jdk_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
-    if jdk_arch == "x86-64":
-        jdk_arch = "amd64"
-    elif jdk_arch == "powerpc":
-        jdk_arch = "ppc"
-    elif jdk_arch == "powerpc64":
-        jdk_arch = "ppc64"
-    elif (jdk_arch == "i486" or jdk_arch == "i586" or jdk_arch == "i686"):
-        jdk_arch = "i386"
-
-    return jdk_arch
-
-JDK_ARCH = "${@get_jdk_arch(d)}"
+# Provide the translated target architectures
+export LLVM_CONFIGURE_ARCH="${@openjdk_build_helper_get_llvm_configure_arch(d)}"
+JDK_ARCH = "${@openjdk_build_helper_get_jdk_arch(d)}"
 
 export DEBUG_BINARIES = "true"
 
-- 
2.11.0




More information about the Openembedded-devel mailing list