summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2018-08-20 23:14:38 +0200
committerRichard Leitner <richard.leitner@skidata.com>2018-10-02 07:59:06 +0200
commitb8763325d9cb6d27d6215b51bc87658f97b36913 (patch)
tree6c8d0da62c5b6e840a1c2ee694afca4ebecf70fa
parent8d12f59cfc6e829bf3454840db4de4935401b058 (diff)
downloadmeta-java-b8763325d9cb6d27d6215b51bc87658f97b36913.tar.gz
openjdk-8: 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. Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
-rw-r--r--recipes-core/openjdk/openjdk-8-common.inc43
1 files 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() {
160 export ${@jdk_environment_options(d)} 160 export ${@jdk_environment_options(d)}
161} 161}
162 162
163# A function that is needed in the Shark builds. 163# Provide the translated target architectures
164def get_llvm_configure_arch(d): 164export LLVM_CONFIGURE_ARCH="${@openjdk_build_helper_get_llvm_configure_arch(d)}"
165 import bb; 165JDK_ARCH = "${@openjdk_build_helper_get_jdk_arch(d)}"
166
167 arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
168 if arch == "x86-64" or arch == "i486" or arch == "i586" or arch == "i686":
169 arch = "x86"
170 elif arch == "arm":
171 arch = "arm"
172 elif arch == "mipsel" or arch == "mips":
173 arch = "mips"
174 elif arch == "powerpc" or arch == "powerpc64":
175 arch = "powerpc"
176 else:
177 if 'shark' in d.getVar('PACKAGECONFIG').split():
178 bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN', True), arch) );
179
180 return arch
181
182# Provides the target architecture to the configure script.
183export LLVM_CONFIGURE_ARCH="${@get_llvm_configure_arch(d)}"
184
185# OpenJDK uses slightly different names for certain arches. We need to know
186# this to create some files which are expected by the build.
187def get_jdk_arch(d):
188 import bb
189
190 jdk_arch = d.getVar('TRANSLATED_TARGET_ARCH', True)
191 if jdk_arch == "x86-64":
192 jdk_arch = "amd64"
193 elif jdk_arch == "powerpc":
194 jdk_arch = "ppc"
195 elif jdk_arch == "powerpc64":
196 jdk_arch = "ppc64"
197 elif (jdk_arch == "i486" or jdk_arch == "i586" or jdk_arch == "i686"):
198 jdk_arch = "i386"
199
200 return jdk_arch
201
202JDK_ARCH = "${@get_jdk_arch(d)}"
203 166
204export DEBUG_BINARIES = "true" 167export DEBUG_BINARIES = "true"
205 168