All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan McGregor <danismostlikely@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Dan McGregor <dan.mcgregor@usask.ca>
Subject: [PATCH] busybox: fix menuconfig on newer hosts
Date: Wed, 12 Feb 2025 10:11:28 -0600	[thread overview]
Message-ID: <20250212161128.1933320-1-danismostlikely@gmail.com> (raw)

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



             reply	other threads:[~2025-02-12 16:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 16:11 Dan McGregor [this message]
2025-02-12 16:16 ` Patchtest results for [PATCH] busybox: fix menuconfig on newer hosts patchtest
2025-02-12 16:18 ` [OE-core] " Alexander Kanavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250212161128.1933320-1-danismostlikely@gmail.com \
    --to=danismostlikely@gmail.com \
    --cc=dan.mcgregor@usask.ca \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.