Skip to contentSkip to conversation

glibc: Add flags to CFLAGS instead of CC

PATCH In review Richard Purdie 2 participants 2 messages Jul 14, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 glibc: Add flags to CFLAGS instead of CC

Recent changes mean toolchain variables are initialized via inherit_defer. It is therefore no longer possible to add to CC using the += operator. Instead, add to CFLAGS.

---
 meta/recipes-core/glibc/glibc_2.41.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc_2.41.bb +1 -1
index 7771fac0412..0852bb4bdbe 100644
@@ -111,7 +111,7 @@ do_configure () {
 }
 
 LDFLAGS += "-fuse-ld=bfd"
-CC += "-fuse-ld=bfd"
+CFLAGS += "-fuse-ld=bfd"
 
 do_compile () {
 	base_do_compile
#1 lore raw
Quoted 15 lines · Richard Purdie via lists.openembedded.org

Recent changes mean toolchain variables are initialized via inherit_defer. It is therefore no longer possible to add to CC using the += operator. Instead, add to CFLAGS.

---
 meta/recipes-core/glibc/glibc_2.41.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc_2.41.bb +0 -0
index 7771fac0412..0852bb4bdbe 100644

meta/recipes-core/glibc/glibc_2.41.bb do_configure () { · line 114

Quoted 5 lines
meta/recipes-core/glibc/glibc_2.41.bb +1 -1
@@ -111,7 +111,7 @@ do_configure () {
 }
 
 LDFLAGS += "-fuse-ld=bfd"
-CC += "-fuse-ld=bfd"
+CFLAGS += "-fuse-ld=bfd"

This works ok when ld-is-lld is used as DISTRO_FEATURES so I am good with it.

Quoted 12 lines
meta/recipes-core/glibc/glibc_2.41.bb +0 -1
 do_compile () {
        base_do_compile
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#220225): https://lists.openembedded.org/g/openembedded-core/message/220225
Mute This Topic: https://lists.openembedded.org/mt/114145812/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-