Message ID | 20250624215053.3162975-1-pkj@axis.com |
---|---|
State | New |
Headers | show |
Series | glibc: Use :append to add to CC | expand |
On Tue, 2025-06-24 at 23:50 +0200, Peter Kjellerstedt via lists.openembedded.org wrote: > 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. > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> > --- > meta/recipes-core/glibc/glibc_2.41.bb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/meta/recipes-core/glibc/glibc_2.41.bb b/meta/recipes- > core/glibc/glibc_2.41.bb > index 7771fac041..2ef738f5b4 100644 > --- a/meta/recipes-core/glibc/glibc_2.41.bb > +++ b/meta/recipes-core/glibc/glibc_2.41.bb > @@ -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, RIchard
> -----Original Message----- > From: Richard Purdie <richard.purdie@linuxfoundation.org> > Sent: den 25 juni 2025 00:27 > To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>; openembedded-core@lists.openembedded.org > Subject: Re: [OE-core] [PATCH] glibc: Use :append to add to CC > > On Tue, 2025-06-24 at 23:50 +0200, Peter Kjellerstedt via lists.openembedded.org wrote: > > 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. > > > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> > > --- > > meta/recipes-core/glibc/glibc_2.41.bb | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/meta/recipes-core/glibc/glibc_2.41.bb b/meta/recipes- > > core/glibc/glibc_2.41.bb > > index 7771fac041..2ef738f5b4 100644 > > --- a/meta/recipes-core/glibc/glibc_2.41.bb > > +++ b/meta/recipes-core/glibc/glibc_2.41.bb > > @@ -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, > > 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
diff --git a/meta/recipes-core/glibc/glibc_2.41.bb b/meta/recipes-core/glibc/glibc_2.41.bb index 7771fac041..2ef738f5b4 100644 --- a/meta/recipes-core/glibc/glibc_2.41.bb +++ b/meta/recipes-core/glibc/glibc_2.41.bb @@ -111,7 +111,7 @@ do_configure () { } LDFLAGS += "-fuse-ld=bfd" -CC += "-fuse-ld=bfd" +CC:append = " -fuse-ld=bfd" do_compile () { base_do_compile
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. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> --- meta/recipes-core/glibc/glibc_2.41.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)