mirror of
git://git.yoctoproject.org/meta-dpdk.git
synced 2025-12-15 23:05:25 +01:00
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>
This commit is contained in:
parent
617ca40b42
commit
6bb0d25138
|
|
@ -9,8 +9,11 @@ S = "${WORKDIR}/git"
|
|||
|
||||
def get_cpu_instruction_set(bb, d):
|
||||
import re
|
||||
march = re.search(r'-march=([^\s]*)', d.getVar('CC')).group(1)
|
||||
return march
|
||||
march = re.search(r'-march=([^\s]*)', d.getVar('CC'))
|
||||
if march:
|
||||
return march.group(1)
|
||||
else:
|
||||
return "core2"
|
||||
|
||||
EXTRA_OEMESON = " -Dexamples=all -Dcpu_instruction_set=${@get_cpu_instruction_set(bb, d)} "
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user