glibc: Use :append to add to CC
PATCH 1/1 glibc: Use :append to add to CC
Due to the recent changes to how the toolchain variables are initialized via inherit_defer, it is no longer possible to add to CC using the += operator. Instead, CC:append needs to be used.
--- 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
@@ -111,7 +111,7 @@ do_configure () { } LDFLAGS += "-fuse-ld=bfd" -CC += "-fuse-ld=bfd" +CC:append = " -fuse-ld=bfd" do_compile () { base_do_compile
Quoted 19 lines · Peter Kjellerstedt via lists.openembedded.org
Due to the recent changes to how the toolchain variables are initialized
viainherit_defer, it is no longer possible to add to CC using the += operator. Instead, CC:append needs to be used.Signed-off-by Peter Kjellerstedt <[email protected]>---
meta/recipes-core/glibc/glibc_2.41.bb | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes- renamed from meta/recipes-core/glibc/glibc_2.41.bb +0
-0core/glibc/glibc_2.41.bb
index7771fac041..2ef738f5b4100644meta/recipes-core/glibc/glibc_2.41.bb +0
-0@@ -111,7 +111,7 @@ do_configure () { }
LDFLAGS += "-fuse-ld=bfd"
meta/recipes-core/glibc/glibc_2.41.bb do_configure () { · line 114
Quoted 2 lines
meta/recipes-core/glibc/glibc_2.41.bb +1
-1-CC += "-fuse-ld=bfd" +CC:append = " -fuse-ld=bfd"
Given my hatred of using append, is it not possible to put this in CFLAGS?
Cheers,
RIchard
Quoted 32 lines
-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: den 25 juni 2025 00:27
To: Peter Kjellerstedt <[email protected]>; [email protected]
Subject: Re: [OE-core] [PATCH] glibc: Use :append to add to CCQuoted 19 lines · Peter Kjellerstedt via lists.openembedded.org
Due to the recent changes to how the toolchain variables are initialized
viainherit_defer, it is no longer possible to add to CC using the += operator. Instead, CC:append needs to be used.Signed-off-by Peter Kjellerstedt <[email protected]>---
meta/recipes-core/glibc/glibc_2.41.bb | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes- renamed from meta/recipes-core/glibc/glibc_2.41.bb +0
-0core/glibc/glibc_2.41.bb
index7771fac041..2ef738f5b4100644meta/recipes-core/glibc/glibc_2.41.bb +0
-0@@ -111,7 +111,7 @@ do_configure () { }LDFLAGS += "-fuse-ld=bfd"
meta/recipes-core/glibc/glibc_2.41.bb do_configure () { · line 114
Quoted 2 lines
meta/recipes-core/glibc/glibc_2.41.bb +1
-1-CC += "-fuse-ld=bfd" +CC:append = " -fuse-ld=bfd"Given my hatred of using append, is it not possible to put this in CFLAGS?
Quoted 3 lines
Cheers,
Richard
Given the commit message by Khem when that line was added (see commit 63248d2cbd7a15aec5b864d0058fe919eb17c46c), I did not want to risk it by changing it. However, that commit also mentions build failures if the option is not passed via CC, and since we have not seen any build failures, maybe this is not needed at all? But I will leave that for Khem to answer as I have no idea.
//Peter
Quoted 35 lines · Peter Kjellerstedt
Quoted 35 lines
-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: den 25 juni 2025 00:27
To: Peter Kjellerstedt <[email protected]>; [email protected]
Subject: Re: [OE-core] [PATCH] glibc: Use :append to add to CCQuoted 16 lines · Peter Kjellerstedt via lists.openembedded.org
Due to the recent changes to how the toolchain variables are initialized
viainherit_defer, it is no longer possible to add to CC using the += operator. Instead, CC:append needs to be used.Signed-off-by Peter Kjellerstedt <[email protected]>--- meta/recipes-core/glibc/glibc_2.41.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes- renamed from meta/recipes-core/glibc/glibc_2.41.bb +0
-0core/glibc/glibc_2.41.bb
index7771fac041..2ef738f5b4100644meta/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" +CC:append = " -fuse-ld=bfd"Given my hatred of using append, is it not possible to put this in CFLAGS?
Cheers,
Quoted 8 lines
Quoted 1 line
Richard
Given the commit message by Khem when that line was added (see commit
63248d2cbd7a15aec5b864d0058fe919eb17c46c), I did not want to risk it by changing it. However, that commit also mentions build failures if the option is not passed via CC, and since we have not seen any build failures, maybe this is not needed at all? But I will leave that for Khem to answer as I have no idea.
I think it is still needed when building glibc for distros that use lld as default system linker
Quoted 3 lines
//Peter