From patchwork Mon Aug 19 10:06:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 8034 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4WnStM5XH6z3xGD for ; Mon, 19 Aug 2024 10:06:35 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4WnStL5pzrz60q; Mon, 19 Aug 2024 10:06:34 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4WnStL58cKz342Z; Mon, 19 Aug 2024 10:06:34 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4WnSsv0dz7z345W for ; Mon, 19 Aug 2024 10:06:11 +0000 (UTC) Received: from michael.haj.ipfire.org (michael.haj.ipfire.org [172.28.1.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (secp384r1) client-digest SHA384) (Client CN "michael.haj.ipfire.org", Issuer "E5" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4WnSst5KX0z5Yw; Mon, 19 Aug 2024 10:06:10 +0000 (UTC) Received: by michael.haj.ipfire.org (Postfix, from userid 0) id 4WnSst00NzzTtlP; Mon, 19 Aug 2024 10:06:09 +0000 (UTC) From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 15/19] syslinux: Fix build with GCC 14 Date: Mon, 19 Aug 2024 10:06:04 +0000 Message-Id: <20240819100608.991138-16-michael.tremer@ipfire.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240819100608.991138-1-michael.tremer@ipfire.org> References: <20240819100608.991138-1-michael.tremer@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: K4BVBYKTRN5FZBPSD3OJEVCZWNI5C7PP X-Message-ID-Hash: K4BVBYKTRN5FZBPSD3OJEVCZWNI5C7PP X-MailFrom: root@michael.haj.ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Michael Tremer X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Michael Tremer --- lfs/syslinux | 1 + ...inux-6.04-pre1-fix-build-with-gcc-14.patch | 61 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 src/patches/syslinux-6.04-pre1-fix-build-with-gcc-14.patch diff --git a/lfs/syslinux b/lfs/syslinux index 150e4071e..98719560e 100644 --- a/lfs/syslinux +++ b/lfs/syslinux @@ -80,6 +80,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04_replace-builtin-strlen-that-appears-to-get-optimized.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04_pre1-fcommon.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04-libinstaller-Fix-build-with-glibc-2.36.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/syslinux-6.04-pre1-fix-build-with-gcc-14.patch # Build cd $(DIR_APP) && make bios $(MAKETUNING) diff --git a/src/patches/syslinux-6.04-pre1-fix-build-with-gcc-14.patch b/src/patches/syslinux-6.04-pre1-fix-build-with-gcc-14.patch new file mode 100644 index 000000000..61de20eae --- /dev/null +++ b/src/patches/syslinux-6.04-pre1-fix-build-with-gcc-14.patch @@ -0,0 +1,61 @@ +From 321433861cc9cd3c7e0ee02830e561bc0f956998 Mon Sep 17 00:00:00 2001 +From: 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 *’ + +--- + 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 + #include + #include ++#include + + #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 +