busybox: fix menuconfig on newer hosts
PATCH 1/1 busybox: fix menuconfig on newer hosts
From: Dan McGregor <[email protected]>
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.
--- ...-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
meta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 3386123c87a3398c1f1426bf72dd3707e74167c9 Mon Sep 17 00:00:00 2001 +From: Dan McGregor <[email protected]> +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 +
meta/recipes-core/busybox/busybox_1.37.0.bb +1 -0
@@ -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 \
Signature · 1 line
2.47.0
Patchtest results for [PATCH] busybox: fix menuconfig on newer hosts
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/busybox-fix-menuconfig-on-newer-hosts.patch
FAIL: test Signed-off-by presence: A patch file has been added without a Signed-off-by tag: 'busybox-menuconfig-fix-lxdialog-gcc-warning.patch' (test_patch.TestPatch.test_signed_off_by_presence)
PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test CVE tag format (test_patch.TestPatch.test_cve_tag_format)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test Upstream-Status presence (test_patch.TestPatch.test_upstream_status_presence_format)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test lic files chksum modified not mentioned (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
No new pending patches please, especially without a reason for it. Submit upstream first.
Alex
Quoted 87 lines · Dan McGregor via lists.openembedded.org
From: Dan McGregor <[email protected]>
The
lxdialog.shscript 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 <[email protected]>--- ...-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.patchdiff --git
a/meta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patchb/meta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patchnew file mode 100644
index 00000000000..42be243af86
---/dev/null
+++b/meta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patchmeta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patch new file +14
-0@@ -0,0 +1,29 @@ +From 3386123c87a3398c1f1426bf72dd3707e74167c9 Mon Sep 17 00:00:00 2001 +From: Dan McGregor <[email protected]> +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.shmeta/recipes-core/busybox/busybox/busybox-menuconfig-fix-lxdialog-gcc-warning.patch new file +15
-0+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 +meta/recipes-core/busybox/busybox_1.37.0.bb +1
-0@@ -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/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-