aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2018-08-20 23:14:37 +0200
committerRichard Leitner <richard.leitner@skidata.com>2018-10-02 07:59:06 +0200
commit8d12f59cfc6e829bf3454840db4de4935401b058 (patch)
tree7d1800b97bfb5c5db2bbc896827f5f271e7e971b
parent75c2622906afba5a53d48fde72dbdef8d81ba05a (diff)
downloadmeta-java-8d12f59cfc6e829bf3454840db4de4935401b058.tar.gz
meta-java-8d12f59cfc6e829bf3454840db4de4935401b058.tar.bz2
meta-java-8d12f59cfc6e829bf3454840db4de4935401b058.zip
openjdk-build-helper: add get_*_arch functions
As different parts of OpenJDK use sightly different names for ARCH'es we provide those translations functions centrally in our openjdk-build-helper class. Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
-rw-r--r--classes/openjdk-build-helper.bbclass51
1 files changed, 51 insertions, 0 deletions
diff --git a/classes/openjdk-build-helper.bbclass b/classes/openjdk-build-helper.bbclass
index 78906b0..01ed591 100644
--- a/classes/openjdk-build-helper.bbclass
+++ b/classes/openjdk-build-helper.bbclass
@@ -49,3 +49,54 @@ def openjdk_build_helper_get_target_cflags(d):
if match:
version = version[match.start():]
return openjdk_build_helper_get_cflags_by_cc_version(d, version)
+
+# OpenJDK uses slightly different names for certain arches. We need to know
+# this to create some files which are expected by the build.
+def openjdk_build_helper_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 in ['i486', 'i586', 'i686']:
+ jdk_arch = "i386"
+
+ return jdk_arch
+
+# Shark also needs slightly different names for certain arches. Due to the fact
+# these differ from the "normal" OpenJDK arch names we have a separate function
+# for Shark here. Furthermore we warn if we think Shark doesn't support the arch
+def openjdk_build_helper_get_llvm_configure_arch(d):
+ import bb;
+
+ arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
+ if arch in ['i386', 'i486', 'i586', 'i686', 'x86-64']:
+ arch = "x86"
+ elif arch in ['mipsel', 'mips']:
+ arch = "mips"
+ elif arch in ['powerpc', 'powerpc64']:
+ arch = "powerpc"
+ elif arch == "arm":
+ arch = "arm"
+ 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
+
+# Again it seems IcedTea native also needs slightly different names for certain
+# arches. Therefore provide the translation.
+def openjdk_build_helper_get_icedtea_arch(d):
+ import bb;
+
+ arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
+ if arch == "x86-64":
+ arch = "amd64"
+ elif arch in ['i386', 'i486', 'i586', 'i686']:
+ arch = "x86"
+
+ return arch