From: Dan McGregor <dan.mcgre...@usask.ca>

The lxdialog.sh script compiles a short program as a link test. That
test program relied on an implicit return type of the main function,
but gcc >= 14 now warns on that by default. This caused the test
to fail and prevented menuconfig from starting.

Use a full function declaration to fix this, allowing menuconfig to
once again run on a newer host.

Signed-off-by: Dan McGregor <dan.mcgre...@usask.ca>
---
 ...-menuconfig-fix-lxdialog-gcc-warning.patch | 29 +++++++++++++++++++
 meta/recipes-core/busybox/busybox_1.37.0.bb   |  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 
meta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patch

diff --git 
a/meta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patch
 
b/meta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patch
new file mode 100644
index 00000000000..42be243af86
--- /dev/null
+++ 
b/meta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patch
@@ -0,0 +1,29 @@
+From 3386123c87a3398c1f1426bf72dd3707e74167c9 Mon Sep 17 00:00:00 2001
+From: Dan McGregor <dan.mcgre...@usask.ca>
+Date: Wed, 12 Feb 2025 09:47:22 -0600
+Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Fix gcc warning
+
+New gcc warns by default if a function is declared without a return
+type. Use a full c99 function declaration for main in the test.
+
+Upstream-Status: Pending
+---
+ scripts/kconfig/lxdialog/check-lxdialog.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh 
b/scripts/kconfig/lxdialog/check-lxdialog.sh
+index 7003e02..4808b21 100755
+--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
+@@ -55,7 +55,7 @@ trap "rm -f $tmp" 0 1 2 3 15
+ check() {
+         $cc -x c - -o $tmp 2>/dev/null <<'EOF'
+ #include CURSES_LOC
+-main() {}
++int main(void) {}
+ EOF
+       if [ $? != 0 ]; then
+           echo " *** Unable to find the ncurses libraries or the"       1>&2
+-- 
+2.47.0
+
diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb 
b/meta/recipes-core/busybox/busybox_1.37.0.bb
index c3131eb4531..83efe991033 100644
--- a/meta/recipes-core/busybox/busybox_1.37.0.bb
+++ b/meta/recipes-core/busybox/busybox_1.37.0.bb
@@ -26,6 +26,7 @@ SRC_URI = 
"https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://login-utilities.cfg \
            file://recognize_connmand.patch \
            file://busybox-cross-menuconfig.patch \
+           file://busybox-menuconfig-fix-lxdialog-gcc-warning.patch \
            file://mount-via-label.cfg \
            file://sha1sum.cfg \
            file://sha256sum.cfg \
-- 
2.47.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#211256): 
https://lists.openembedded.org/g/openembedded-core/message/211256
Mute This Topic: https://lists.openembedded.org/mt/111145318/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to