From 327a097f5a81eba365a80ee3c52ec885629d42f3 Mon Sep 17 00:00:00 2001 From: Jerome Brunet Date: Fri, 22 Oct 2021 17:12:12 +0200 Subject: openjdk-build-helper: fix arm64 build When trying to build for an arm64 machine, such as qemuarm64, parsing of the recipes fails with the following messages: WARNING: /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb: Exception during build_dependencies for LLVM_CONFIGURE_ARCH WARNING: /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb: Error during finalise of /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb ERROR: ExpansionError during parsing /meta-java/recipes-core/openjdk/openjdk-7_99b00-2.6.5.bb Traceback (most recent call last): File "Var ", line 1, in File "/meta-java/classes/openjdk-build-helper.bbclass", line 86, in openjdk_build_helper_get_llvm_configure_arch(d=): else: > if 'shark' in d.getVar('PACKAGECONFIG').split(): bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN'), arch) ); bb.data_smart.ExpansionError: Failure expanding variable LLVM_CONFIGURE_ARCH, expression was ${@openjdk_build_helper_get_llvm_configure_arch(d)} which triggered exception AttributeError: 'NoneType' object has no attribute 'split' Using 'bb.utils.contains' solves the problem. Signed-off-by: Jerome Brunet Signed-off-by: Richard Leitner --- classes/openjdk-build-helper.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/openjdk-build-helper.bbclass b/classes/openjdk-build-helper.bbclass index a4b77a0..9a6c492 100644 --- a/classes/openjdk-build-helper.bbclass +++ b/classes/openjdk-build-helper.bbclass @@ -83,7 +83,7 @@ def openjdk_build_helper_get_llvm_configure_arch(d): elif arch == "arm": arch = "arm" else: - if 'shark' in d.getVar('PACKAGECONFIG').split(): + if bb.utils.contains('PACKAGECONFIG', 'shark', True, False, d): bb.warn("%s does not support %s in Shark builds yet" % (d.getVar('PN'), arch) ); return arch -- cgit v1.2.3-54-g00ecf