Skip to contentSkip to conversation

cross-canadian.bbclass: Do not override LIBCOVERRIDE with SDK libc override

PATCH In review Khem Raj 3 participants 3 messages Mar 15, 2019 – Mar 18, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 cross-canadian.bbclass: Do not override LIBCOVERRIDE with SDK libc override

cross-canadian tools are supposed to generate code for target and if we override the libc override then needed overrides do not get applied when building gcc cross canadian e.g. for baremetal, which causes build failures during compile

e.g. https://github.com/riscv/meta-riscv/issues/117

Not override libc override helps us fix this issue

---
 meta/classes/cross-canadian.bbclass | 1 -
 1 file changed, 1 deletion(-)
meta/classes/cross-canadian.bbclass +0 -1
index f5c9f61595..ee53faad79 100644
@@ -9,7 +9,6 @@
 # or indirectly via dependency.  No need to be in 'world'.
 EXCLUDE_FROM_WORLD = "1"
 NATIVESDKLIBC ?= "libc-glibc"
-LIBCOVERRIDE = ":${NATIVESDKLIBC}"
 CLASSOVERRIDE = "class-cross-canadian"
 STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
 
Signature · 1 line
2.21.0
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 11 lines · Khem Raj

cross-canadian tools are supposed to generate code for target and if we override the libc override then needed overrides do not get applied when building gcc cross canadian e.g. for baremetal, which causes build failures during compile

e.g. https://github.com/riscv/meta-riscv/issues/117

Not override libc override helps us fix this issue

Alistair

Quoted 24 lines
---
 meta/classes/cross-canadian.bbclass | 1 -
 1 file changed, 1 deletion(-)
meta/classes/cross-canadian.bbclass +0 -2
index f5c9f61595..ee53faad79 100644
@@ -9,7 +9,6 @@
 # or indirectly via dependency.  No need to be in 'world'.
 EXCLUDE_FROM_WORLD = "1"
 NATIVESDKLIBC ?= "libc-glibc"
-LIBCOVERRIDE = ":${NATIVESDKLIBC}"
 CLASSOVERRIDE = "class-cross-canadian"
 STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}"
 
--

2.21.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
In reply to Khem Raj
Quoted 28 lines · Khem Raj

cross-canadian tools are supposed to generate code for target and if we
override the libc override then needed overrides do not get applied when
building gcc cross canadian e.g. for baremetal, which causes build failures during compile

e.g. https://github.com/riscv/meta-riscv/issues/117

Not override libc override helps us fix this issue

---
 meta/classes/cross-canadian.bbclass | 1 -
 1 file changed, 1 deletion(-)
meta/classes/cross-canadian.bbclass +0 -1
index f5c9f61595..ee53faad79 100644
@@ -9,7 +9,6 @@
 # or indirectly via dependency.  No need to be in 'world'.
 EXCLUDE_FROM_WORLD = "1"
 NATIVESDKLIBC ?= "libc-glibc"
-LIBCOVERRIDE = ":${NATIVESDKLIBC}"
 CLASSOVERRIDE = "class-cross-canadian"
 STAGING_BINDIR_TOOLCHAIN =
Quoted 3 lines

"${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}- ${SDK_OS}:${STAGING_DIR_NATIVE}${bindir_native}/${TARGET_ARCH}${TARGE T_VENDOR}-${TARGET_OS}"

Whilst I understand the problem, we need to be cautious here.

*-cross-canadian-* runs on nativesdk and for example often use glibc even when the target uses musl. This change is partly reverting fixes made to ensure that nativesdk worked as glibc (and glibc overrides were applied correctly) even when the target system used musl.

I think this issue may need more investigation unfortunately...

Cheers,

Richard