From d876cfc5bfafa516dee55d04b50b319a22165640 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Wed, 28 Jul 2021 14:22:43 -0400 Subject: global: overrides syntax conversion OEcore/bitbake are moving to use the clearer ":" as an overrides separator. This is pass one of updating the meta-virt recipes to use that syntax. This has only been minimally build/runtime tested, more changes will be required for missed overrides, or incorrect conversions Note: A recent bitbake is required: commit 75fad23fc06c008a03414a1fc288a8614c6af9ca Author: Richard Purdie Date: Sun Jul 18 12:59:15 2021 +0100 bitbake: data_smart/parse: Allow ':' characters in variable/function names It is becomming increasingly clear we need to find a way to show what is/is not an override in our syntax. We need to do this in a way which is clear to users, readable and in a way we can transition to. The most effective way I've found to this is to use the ":" charater to directly replace "_" where an override is being specified. This includes "append", "prepend" and "remove" which are effectively special override directives. This patch simply adds the character to the parser so bitbake accepts the value but maps it back to "_" internally so there is no behaviour change. This change is simple enough it could potentially be backported to older version of bitbake meaning layers using the new syntax/markup could work with older releases. Even if other no other changes are accepted at this time and we don't backport, it does set us on a path where at some point in future we could require a more explict syntax. I've tested this patch by converting oe-core/meta-yocto to the new syntax for overrides (9000+ changes) and then seeing that builds continue to work with this patch. (Bitbake rev: 0dbbb4547cb2570d2ce607e9a53459df3c0ac284) Signed-off-by: Richard Purdie Signed-off-by: Bruce Ashfield --- recipes-extended/xen/xen.inc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'recipes-extended/xen/xen.inc') diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc index 3438034d..c0a087ec 100644 --- a/recipes-extended/xen/xen.inc +++ b/recipes-extended/xen/xen.inc @@ -100,7 +100,7 @@ EXTRA_CFLAGS_XEN_CORE="${DEBUG_PREFIX_MAP}" # - The Xen tools build for x86 systems with HVM-mode enabled includes hvmloader # which fails to build when "-m64" is included in flags set via the # EXTRA_CFLAGS_XEN_TOOLS: so clear TUNE_CCARGS on x86 to prevent that. -TUNE_CCARGS_x86-64="" +TUNE_CCARGS:x86-64="" # - Yocto supplies the _FORTIFY_SOURCE flag via CC/CPP/CXX but then passes the # optimization -O via C*FLAGS which is problematic when the CFLAGS are cleared @@ -115,11 +115,11 @@ CC="${CCACHE}${HOST_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${CC_REPRODUCIBLE_OPTIONS}" EXTRA_CFLAGS_XEN_TOOLS="${HOST_CC_ARCH} ${CFLAGS}" # 32-bit ARM needs the TUNE_CCARGS component of HOST_CC_ARCH to be passed # in CC to ensure that configure can compile binaries for the right arch. -CC_arm="${CCACHE}${HOST_PREFIX}gcc ${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS} ${CC_REPRODUCIBLE_OPTIONS}" +CC:arm="${CCACHE}${HOST_PREFIX}gcc ${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS} ${CC_REPRODUCIBLE_OPTIONS}" # There are no Xen-provided variables for C++, so append to the tool variables: -CPP_append = " ${CPPFLAGS}" -CXX_append = " ${CXXFLAGS}" +CPP:append = " ${CPPFLAGS}" +CXX:append = " ${CXXFLAGS}" EXTRA_OECONF += " \ --exec-prefix=${prefix} \ @@ -193,7 +193,7 @@ do_post_patch() { fi } -do_post_patch_append_arm() { +do_post_patch:append:arm() { # The hypervisor binary must not be built with the hard floating point ABI. echo "CC := \$(filter-out ${TUNE_CCARGS},\$(CC))" >> ${S}/xen/arch/arm/Rules.mk echo "CPP := \$(filter-out ${TUNE_CCARGS},\$(CPP))" >> ${S}/xen/arch/arm/Rules.mk @@ -229,13 +229,13 @@ do_configure_common() { PYTHON="${PYTHON}" } -do_compile_prepend() { +do_compile:prepend() { # workaround for build bug when CFLAGS is exported # https://www.mail-archive.com/xen-devel@lists.xen.org/msg67822.html unset CFLAGS } -do_install_prepend() { +do_install:prepend() { # CFLAGS is used to set PY_CFLAGS which affects the pygrub install # so also need to unset CFLAGS here: unset CFLAGS -- cgit v1.2.3-54-g00ecf