diff mbox series

[meta-oe] daemontools: fix incompatible-pointer-types issue

Message ID 20250618100159.1573-1-liuyd.fnst@fujitsu.com
State Under Review
Headers show
Series [meta-oe] daemontools: fix incompatible-pointer-types issue | expand

Commit Message

Liu Yiding June 18, 2025, 10:01 a.m. UTC
According to info from "bitbake -e daemontools", "CC += "-Wno-error=incompatible-pointer-types""
can't solve this issue now since CC will be overide by gcc.bbclass

|$ bitbake -e daemontools
|------------------------------
| # $CC [3 operations]
| #   exported ast.py:67 [eval]
| #     [export] "1"
| #   append /mnt/test/meta-openembedded/meta-oe/recipes-support/daemontools/daemontools_0.76.bb:58
| #     "-Wno-error=incompatible-pointer-types"
| #   set /mnt/test/poky/meta/classes/toolchain/gcc.bbclass:1
| #     "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
| # pre-expansion value:
| #   "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
| export CC="aarch64-poky-linux-gcc  -mcpu=cortex-a57+crc -mbranch-protection=standard -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mnt/test/build_auh/tmp/work/cortexa57-poky-linux/daemontools/0.76/recipe-sysroot

Signed-off-by: Liu Yiding <liuyd.fnst@fujitsu.com>
---
 .../recipes-support/daemontools/daemontools_0.76.bb | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/daemontools/daemontools_0.76.bb b/meta-oe/recipes-support/daemontools/daemontools_0.76.bb
index 3738b080ff..1ef6a07d0d 100644
--- a/meta-oe/recipes-support/daemontools/daemontools_0.76.bb
+++ b/meta-oe/recipes-support/daemontools/daemontools_0.76.bb
@@ -33,7 +33,13 @@  UPSTREAM_CHECK_URI = "http://cr.yp.to/daemontools/install.html"
 
 S = "${WORKDIR}/admin/${BP}"
 
+# http://errors.yoctoproject.org/Errors/Details/766886/
+# pathexec_run.c:19:17: error: passing argument 2 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types]
+# pathexec_run.c:19:22: error: passing argument 3 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types]
+# pathexec_run.c:36:18: error: passing argument 2 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types]
+# pathexec_run.c:36:23: error: passing argument 3 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types]
 do_compile() {
+    export CC="$CC -Wno-error=incompatible-pointer-types"
     ./package/compile
 }
 
@@ -48,10 +54,3 @@  do_install:append:class-target() {
 inherit update-alternatives
 ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE:${PN} = "svc svok"
-
-# http://errors.yoctoproject.org/Errors/Details/766886/
-# pathexec_run.c:19:17: error: passing argument 2 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types]
-# pathexec_run.c:19:22: error: passing argument 3 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types]
-# pathexec_run.c:36:18: error: passing argument 2 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types]
-# pathexec_run.c:36:23: error: passing argument 3 of 'execve' from incompatible pointer type [-Wincompatible-pointer-types] 
-CC += "-Wno-error=incompatible-pointer-types"