diff mbox series

[v2] syslinux: Fix build with GCC 14

Message ID 20240502084933.1784665-1-zboszor@gmail.com
State New
Headers show
Series [v2] syslinux: Fix build with GCC 14 | expand

Commit Message

Böszörményi Zoltán May 2, 2024, 8:49 a.m. UTC
Add a patch from Fedora 40 to fix build with GCC 14.

Remove internal (long obsolete) copies of ext2_fs.h that clash
with the one from e2fsprogs when built with GCC 14.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
 .../syslinux/0008-Fix-build-with-GCC-14.patch | 63 +++++++++++++++++++
 .../syslinux/syslinux_6.04-pre2.bb            |  5 ++
 2 files changed, 68 insertions(+)
 create mode 100644 meta/recipes-devtools/syslinux/syslinux/0008-Fix-build-with-GCC-14.patch

Comments

patchtest@automation.yoctoproject.org May 2, 2024, 9:04 a.m. UTC | #1
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/v2-syslinux-Fix-build-with-GCC-14.patch

FAIL: test Upstream-Status presence: Upstream-Status is in incorrect format (test_patch.TestPatch.test_upstream_status_presence_format)

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 Signed-off-by presence (test_patch.TestPatch.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
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)

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)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)

---

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!
diff mbox series

Patch

diff --git a/meta/recipes-devtools/syslinux/syslinux/0008-Fix-build-with-GCC-14.patch b/meta/recipes-devtools/syslinux/syslinux/0008-Fix-build-with-GCC-14.patch
new file mode 100644
index 0000000000..d7c8aa50d0
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0008-Fix-build-with-GCC-14.patch
@@ -0,0 +1,63 @@ 
+From 321433861cc9cd3c7e0ee02830e561bc0f956998 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Sun, 4 Feb 2024 11:46:02 -0500
+Subject: [PATCH] Fix build with GCC 14
+
+com32/lib/syslinux/debug.c: In function ‘syslinux_debug’:
+com32/lib/syslinux/debug.c:91:5: error: implicit declaration of function ‘printf’
+
+com32/libupload/upload_tftp.c: In function ‘upload_tftp_write’:
+com32/libupload/upload_tftp.c:64:11: error: implicit declaration of function ‘tftp_put’
+
+com32/chain/chain.c: In function ‘main’:
+com32/chain/chain.c:517:44: error: passing argument 3 of ‘loadfile’ from incompatible pointer type
+com32/include/syslinux/loadfile.h:11:37: note: expected ‘size_t *’ but argument is of type ‘addr_t *’
+
+Upstream-Status: Inactive-Upstream [no upstream]
+Signed-off-by: rpm-build <rpm-build@fedora.org>
+---
+ com32/chain/chain.c        | 2 +-
+ com32/lib/syslinux/debug.c | 1 +
+ com32/libupload/tftp.h     | 3 +++
+ 3 files changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/com32/chain/chain.c b/com32/chain/chain.c
+index 4e9e32d..b11b880 100644
+--- a/com32/chain/chain.c
++++ b/com32/chain/chain.c
+@@ -514,7 +514,7 @@ int main(int argc, char *argv[])
+     if (opt.file) {
+ 	fdat.base = (opt.fseg << 4) + opt.foff;
+ 
+-	if (loadfile(opt.file, &fdat.data, &fdat.size)) {
++	if (loadfile(opt.file, &fdat.data, (size_t*)&fdat.size)) {
+ 	    error("Couldn't read the boot file.");
+ 	    goto bail;
+ 	}
+diff --git a/com32/lib/syslinux/debug.c b/com32/lib/syslinux/debug.c
+index d9ab863..e8f53d5 100644
+--- a/com32/lib/syslinux/debug.c
++++ b/com32/lib/syslinux/debug.c
+@@ -1,6 +1,7 @@
+ #include <linux/list.h>
+ #include <string.h>
+ #include <stdbool.h>
++#include <stdio.h>
+ 
+ #ifdef DYNAMIC_DEBUG
+ 
+diff --git a/com32/libupload/tftp.h b/com32/libupload/tftp.h
+index 323dc16..09aa40b 100644
+--- a/com32/libupload/tftp.h
++++ b/com32/libupload/tftp.h
+@@ -19,4 +19,7 @@ TFTP_OK	= 11, /* Not in RFC */
+ };
+ 
+ extern const char *tftp_string_error_message[];
++
++extern int tftp_put(struct url_info *url, int flags, struct inode *inode,
++                               const char **redir, char *data, int data_length);
+ #endif
+-- 
+2.43.0
+
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
index c8e7f25d2b..190891b6fe 100644
--- a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
@@ -22,6 +22,7 @@  SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz
            file://0012-libinstaller-Fix-build-with-glibc-2.36.patch \
            file://0013-remove-clean-script.patch \
            file://0014-Fix-reproducibility-issues.patch \
+           file://0008-Fix-build-with-GCC-14.patch \
 "
 
 SRC_URI[md5sum] = "2b31c78f087f99179feb357da312d7ec"
@@ -71,6 +72,10 @@  PACKAGECONFIG[mtools] = ",,,"
 # Tasks for native/nativesdk which just build the installer.
 #
 do_configure() {
+	# These clash with ext2_fs.h from e2fsprogs when built with GCC 14
+	rm -f ${S}/core/fs/ext2/ext2_fs.h
+	rm -f ${S}/libinstaller/ext2fs/ext2_fs.h
+
 	oe_runmake firmware="bios" clean
 }