diff mbox series

[scarthgap,8/8] expect-native: fix build with gcc-14

Message ID 20240617063431.2221035-9-changqing.li@windriver.com
State Superseded
Delegated to: Steve Sakoman
Headers show
Series backports from master | expand

Commit Message

Changqing Li June 17, 2024, 6:34 a.m. UTC
From: Changqing Li <changqing.li@windriver.com>

* do_configure failed with gcc-14:
error in build/config.log:
conftest.c:56:3: error: return type defaults to 'int' [-Wimplicit-int]
conftest.c:59:5: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]

* this recipe set "BBCLASSEXTEND = "native nativesdk", causes "CFLAGS +="
setting not take effect, use append instead.
snip of bitbake expect-native -e:
   set /layers/oe-core/meta/conf/documentation.conf:110
     [doc] "Flags passed to the C compiler for the target system. This variable evaluates to the same as TARGET_CFLAGS."
   append /layers/oe-core/meta/recipes-devtools/expect/expect_5.45.4.bb:87
     "-Wno-error=incompatible-pointer-types"
   set /layers/oe-core/meta/classes-recipe/native.bbclass:44
     "${BUILD_CFLAGS}"
   override[pn-gtk4]::append[toolchain-clang] /layers/meta-clang/conf/nonclangable.conf:336
     " -Wno-error=int-conversion"
   override[pn-pidgin-sipe]::append[toolchain-clang] /layers/meta-clang/conf/nonclangable.conf:340
     " -Wno-error=cast-function-type-strict"
 pre-expansion value:
   "${BUILD_CFLAGS}"
export CFLAGS="-isystem/build/tmp-glibc/work/x86_64-linux/expect-native/5.45.4/recipe-sysroot-native/usr/include -O2 -pipe"

This patch is rejected on master, refer [1], and need to rework based on
this new change [2]. scarthgap branch doesn't have commit [2], so still use
this patch for now.

[1] https://patchwork.yoctoproject.org/project/oe-core/patch/20240613061859.3777324-1-changqing.li@windriver.com/#19943
[2] https://git.openembedded.org/openembedded-core/commit/?h=master-next&id=9a8522723de8caac35d552abf1fb3061ca5dace2

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 meta/recipes-devtools/expect/expect_5.45.4.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/expect/expect_5.45.4.bb b/meta/recipes-devtools/expect/expect_5.45.4.bb
index 18904ebc10..5e7b352196 100644
--- a/meta/recipes-devtools/expect/expect_5.45.4.bb
+++ b/meta/recipes-devtools/expect/expect_5.45.4.bb
@@ -84,4 +84,7 @@  BBCLASSEXTEND = "native nativesdk"
 
 # http://errors.yoctoproject.org/Errors/Details/766950/
 # expect5.45.4/exp_chan.c:62:5: error: initialization of 'struct Tcl_ChannelTypeVersion_ *' from incompatible pointer type 'int (*)(void *, int)' [-Wincompatible-pointer-types]
-CFLAGS += "-Wno-error=incompatible-pointer-types"
+CFLAGS:append = " -Wno-error=incompatible-pointer-types"
+
+# Fix expect-native configure tests are failing with gcc-14
+CFLAGS:append:class-native = " -Wno-error=implicit-int -Wno-error=implicit-function-declaration"