All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] busybox: fix menuconfig on newer hosts
@ 2025-02-12 16:11 Dan McGregor
  2025-02-12 16:16 ` Patchtest results for " patchtest
  2025-02-12 16:18 ` [OE-core] " Alexander Kanavin
  0 siblings, 2 replies; 3+ messages in thread
From: Dan McGregor @ 2025-02-12 16:11 UTC (permalink / raw)
  To: openembedded-core; +Cc: Dan McGregor

From: Dan McGregor <dan.mcgregor@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.mcgregor@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.mcgregor@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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-12 16:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-12 16:11 [PATCH] busybox: fix menuconfig on newer hosts Dan McGregor
2025-02-12 16:16 ` Patchtest results for " patchtest
2025-02-12 16:18 ` [OE-core] " Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.