Skip to contentSkip to conversation

meta: conf: avoid appending LIBCOVERRIDE to OVERRIDES

PATCH In review [email protected] 2 participants 2 messages Apr 7, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meta: conf: avoid appending LIBCOVERRIDE to OVERRIDES

From: Ming Liu <[email protected]>

The order of any other overrides should be before forcevariable, or else it will get the highest priority.

---
 meta/classes/native.bbclass                   | 2 --
 meta/classes/nativesdk.bbclass                | 2 +-
 meta/conf/bitbake.conf                        | 3 ++-
 meta/conf/distro/include/tclibc-baremetal.inc | 5 ++---
 meta/conf/distro/include/tclibc-glibc.inc     | 5 ++---
 meta/conf/distro/include/tclibc-musl.inc      | 5 ++---
 6 files changed, 9 insertions(+), 13 deletions(-)
meta/classes/native.bbclass +0 -2
index a911f2a..775be04 100644
@@ -106,8 +106,6 @@ PKG_CONFIG_SYSROOT_DIR = ""
 PKG_CONFIG_SYSTEM_LIBRARY_PATH[unexport] = "1"
 PKG_CONFIG_SYSTEM_INCLUDE_PATH[unexport] = "1"
 
-# we dont want libc-*libc to kick in for native recipes
-LIBCOVERRIDE = ""
 CLASSOVERRIDE = "class-native"
 MACHINEOVERRIDES = ""
 MACHINE_FEATURES = ""
meta/classes/nativesdk.bbclass +1 -1
index 69fb45c..b6858d2 100644
@@ -6,7 +6,7 @@ STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${S
 
 # libc for the SDK can be different to that of the target
 NATIVESDKLIBC ?= "libc-glibc"
-LIBCOVERRIDE = ":${NATIVESDKLIBC}"
+LIBCOVERRIDE = "${NATIVESDKLIBC}"
 CLASSOVERRIDE = "class-nativesdk"
 MACHINEOVERRIDES = ""
 
meta/conf/bitbake.conf +2 -1
index 93f57f3..f240999 100644
@@ -729,10 +729,11 @@ DISTRO_NAME ??= "OpenEmbedded"
 #
 # This works for  functions as well, they are really just environment variables.
 # Default OVERRIDES to make compilation fail fast in case of build system misconfiguration.
-OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:forcevariable"
+OVERRIDES = "${TARGET_OS}:${TRANSLATED_TARGET_ARCH}:build-${BUILD_OS}:pn-${PN}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}:${CLASSOVERRIDE}:${LIBCOVERRIDE}:forcevariable"
 CLASSOVERRIDE ?= "class-target"
 DISTROOVERRIDES ?= "${@d.getVar('DISTRO') or ''}"
 MACHINEOVERRIDES ?= "${MACHINE}"
+LIBCOVERRIDE ?= ""
 
 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
 
meta/conf/distro/include/tclibc-baremetal.inc +2 -3
index a8ce6d3..4c7804e 100644
@@ -4,9 +4,8 @@
 
 LIBCEXTENSION = ""
 
-# Add baremetal libc overrides to the overrides.
-LIBCOVERRIDE = ":libc-baremetal"
-OVERRIDES .= "${LIBCOVERRIDE}"
+# Set baremetal libc overrides.
+LIBCOVERRIDE = "libc-baremetal"
 
 ASSUME_PROVIDED += "virtual/libc virtual/libiconv"
 
meta/conf/distro/include/tclibc-glibc.inc +2 -3
index ad8000f..672dbfb 100644
@@ -4,9 +4,8 @@
 
 LIBCEXTENSION = "${@['', '-gnu'][(d.getVar('ABIEXTENSION') or '') != '']}"
 
-# Add glibc overrides to the overrides for glibc.
-LIBCOVERRIDE = ":libc-glibc"
-OVERRIDES .= "${LIBCOVERRIDE}"
+# Set glibc overrides.
+LIBCOVERRIDE = "libc-glibc"
 
 PREFERRED_PROVIDER_virtual/libiconv ?= "glibc"
 PREFERRED_PROVIDER_virtual/nativesdk-libiconv ?= "nativesdk-glibc"
meta/conf/distro/include/tclibc-musl.inc +2 -3
index 54e1acf..cd06b11 100644
@@ -4,9 +4,8 @@
 
 LIBCEXTENSION = "-musl"
 
-# Add musl libc overrides to the overrides.
-LIBCOVERRIDE = ":libc-musl"
-OVERRIDES .= "${LIBCOVERRIDE}"
+# Set musl libc overrides.
+LIBCOVERRIDE = "libc-musl"
 
 PREFERRED_PROVIDER_virtual/libc ?= "musl"
 PREFERRED_PROVIDER_virtual/libiconv ?= "musl"
Signature · 1 line
2.7.4
#1 lore raw
Quoted 6 lines · On Sat, 2018-04-07 at 11:05 +0200, [email protected] wrote:

From: Ming Liu <[email protected]>

The order of any other overrides should be before forcevariable, or else it will get the highest priority.

Quoted 8 lines

---
 meta/classes/native.bbclass                   | 2 -- meta/classes/nativesdk.bbclass                | 2 +- meta/conf/bitbake.conf                        | 3 ++- meta/conf/distro/include/tclibc-baremetal.inc | 5 ++--- meta/conf/distro/include/tclibc-glibc.inc     | 5 ++--- meta/conf/distro/include/tclibc-musl.inc      | 5 ++---

 6 files changed, 9 insertions(+), 13 deletions(-)

We do not want to inject an empty entry into OVERRIDES. This patch changes things so we can end up with "::" in there.

I suspect we've fixed bugs in bitbake where problems resulted from that however I still don't want to do it.

Cheers,

Richard