diff options
author | Mingli Yu <mingli.yu@windriver.com> | 2023-12-27 14:46:33 +0800 |
---|---|---|
committer | Anuj Mittal <anuj.mittal@intel.com> | 2024-01-08 15:31:58 +0800 |
commit | 6bb0d25138a4e8cc651b4da878fe2c44e2705996 (patch) | |
tree | a7c7af6793fa53ef69a14b86bc6df05b6c6a10f5 | |
parent | 617ca40b421f0b0ce4e3ba996688bbac2c68b14b (diff) | |
download | meta-dpdk-6bb0d25138a4e8cc651b4da878fe2c44e2705996.tar.gz |
dpdk: Make sure -march exist
Fixes:
ERROR: ExpansionError during parsing /build/layers/meta-dpdk/recipes-extended/dpdk/dpdk_23.11.bb
Traceback (most recent call last):
File "Var <EXTRA_OEMESON>", line 1, in <module>
File "/build/layers/meta-dpdk/recipes-extended/dpdk/dpdk_23.11.bb", line 12, in get_cpu_instruction_set(bb=<module 'bb' from '/build/layers/oe-core/bitbake/lib/bb/__init__.py'>, d=<bb.data_smart.DataSmart object at 0x7f63569bb070>):
import re
> march = re.search(r'-march=([^\s]*)', d.getVar('CC')).group(1)
return march
bb.data_smart.ExpansionError: Failure expanding variable EXTRA_OEMESON, expression was -Dexamples=all -Dcpu_instruction_set=${@get_cpu_instruction_set(bb, d)} which triggered exception AttributeError: 'NoneType' object has no attribute 'group'
The variable dependency chain for the failure is: EXTRA_OEMESON -> meson_do_configure
ERROR: Parsing halted due to errors, see error messages above
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r-- | recipes-extended/dpdk/dpdk_23.11.bb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/recipes-extended/dpdk/dpdk_23.11.bb b/recipes-extended/dpdk/dpdk_23.11.bb index 5f0f9ec..fc2796a 100644 --- a/recipes-extended/dpdk/dpdk_23.11.bb +++ b/recipes-extended/dpdk/dpdk_23.11.bb | |||
@@ -9,8 +9,11 @@ S = "${WORKDIR}/git" | |||
9 | 9 | ||
10 | def get_cpu_instruction_set(bb, d): | 10 | def get_cpu_instruction_set(bb, d): |
11 | import re | 11 | import re |
12 | march = re.search(r'-march=([^\s]*)', d.getVar('CC')).group(1) | 12 | march = re.search(r'-march=([^\s]*)', d.getVar('CC')) |
13 | return march | 13 | if march: |
14 | return march.group(1) | ||
15 | else: | ||
16 | return "core2" | ||
14 | 17 | ||
15 | EXTRA_OEMESON = " -Dexamples=all -Dcpu_instruction_set=${@get_cpu_instruction_set(bb, d)} " | 18 | EXTRA_OEMESON = " -Dexamples=all -Dcpu_instruction_set=${@get_cpu_instruction_set(bb, d)} " |
16 | 19 | ||