Message ID | 20251001204638.1442908-1-adrian.freihofer@siemens.com |
---|---|
State | New |
Headers | show |
Series | expect: fix native build with GCC 15 | expand |
On Wed, 2025-10-01 at 22:46 +0200, Adrian Freihofer via lists.openembedded.org wrote: > From: Adrian Freihofer <adrian.freihofer@siemens.com> > > This does not work for native builds: > CFLAGS += "-std=gnu17" > The line from native.bbclass gets priority: > CFLAGS = "${BUILD_CFLAGS}" > > From bitbake-getvar -r expect-native CFLAGS > ... > append ...poky/meta/recipes-devtools/expect/expect_5.45.4.bb:44 > "-std=gnu17" > set ...poky/meta/classes-recipe/native.bbclass:44 > "${BUILD_CFLAGS}" > ... > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > --- > meta/recipes-devtools/expect/expect_5.45.4.bb | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Whilst the patch applies cleanly on master, was the command output above from master? I suspect it was not... Cheers, Richard
On Wed, 2025-10-01 at 23:13 +0100, Richard Purdie wrote: > On Wed, 2025-10-01 at 22:46 +0200, Adrian Freihofer via > lists.openembedded.org wrote: > > From: Adrian Freihofer <adrian.freihofer@siemens.com> > > > > This does not work for native builds: > > CFLAGS += "-std=gnu17" > > The line from native.bbclass gets priority: > > CFLAGS = "${BUILD_CFLAGS}" > > > > From bitbake-getvar -r expect-native CFLAGS > > ... > > append ...poky/meta/recipes-devtools/expect/expect_5.45.4.bb:44 > > "-std=gnu17" > > set ...poky/meta/classes-recipe/native.bbclass:44 > > "${BUILD_CFLAGS}" > > ... > > > > Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> > > --- > > meta/recipes-devtools/expect/expect_5.45.4.bb | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Whilst the patch applies cleanly on master, was the command output > above from master? I suspect it was not... You're correct. This error occurs on Scartsgraph. Since I couldn't find an explanation for why it doesn't occur on master, I thought I'd send this patch for master as well so we can discuss it quickly. It shouldn't cause any harm anyway. But your question guided me to the OE-core commit a157b2f9d93428ca21265cc860a3b58b3698b3aa which solves this issue at the root. The patch can be ignored for master. But for Scartsgraph it still makes sense. Thank you and regards, Adrian > > Cheers, > > Richard
diff --git a/meta/recipes-devtools/expect/expect_5.45.4.bb b/meta/recipes-devtools/expect/expect_5.45.4.bb index a89b48ef1c3..f1d30d82172 100644 --- a/meta/recipes-devtools/expect/expect_5.45.4.bb +++ b/meta/recipes-devtools/expect/expect_5.45.4.bb @@ -41,7 +41,7 @@ S = "${WORKDIR}/${BPN}${PV}" EXTRA_AUTORECONF += "--exclude=aclocal" -CFLAGS += "-std=gnu17" +CFLAGS:append = " -std=gnu17" do_install:append() { mv ${D}${libdir}/expect${PV}/libexpect*.so ${D}${libdir}/