perf: update bbappend

* Remove the KERNEL_VERSION-based logic for PACKAGECONFIG,
  since the kernel version isn't known at parse time, and
  just disable scripting for tegra platforms by default

* Fix build issues by appending to EXTRA_OECMAKE to override
  EXTRA_CFLAGS to add -fcommon and YFLAGS to remove the -y
  flag

Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
Matt Madison
2022-02-28 04:51:52 -08:00
committed by Matt Madison
parent 8b61699119
commit 58d5f4cf70

View File

@@ -1,8 +1,4 @@
def kernel_disable_features(d):
if bb.utils.vercmp_string(d.getVar('KERNEL_VERSION'), '4.17') < 0:
# python3 is not supported until 4.17, so do not allow scripting
return "scripting"
else:
return ""
PACKAGECONFIG:remove:tegra = "${@kernel_disable_features(d)}"
PACKAGECONFIG:tegra ?= "tui libunwind"
# Need to enable -fcommon on C compilations and disable POSIX yacc
# mode in bison
EXTRA_OEMAKE:append:tegra = " EXTRA_CFLAGS='-ldw -fcommon' YFLAGS='--file-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}'"