public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Cc: Michael Tremer <michael.tremer@ipfire.org>
Subject: [PATCH 12/42] unzip: Fix build with GCC 15
Date: Fri,  2 May 2025 10:16:02 +0000	[thread overview]
Message-ID: <20250502101632.1082010-12-michael.tremer@ipfire.org> (raw)
In-Reply-To: <20250502101632.1082010-1-michael.tremer@ipfire.org>

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 lfs/unzip                           |  8 ++++++--
 src/patches/unzip-gnu89-build.patch | 15 +++++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)
 create mode 100644 src/patches/unzip-gnu89-build.patch

diff --git a/lfs/unzip b/lfs/unzip
index 418ea7444..87ff9a3c7 100644
--- a/lfs/unzip
+++ b/lfs/unzip
@@ -32,6 +32,9 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 
+# Fix build with GCC 15
+CFLAGS += -std=gnu17
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -70,10 +73,11 @@ $(subst %,%_BLAKE2,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 	@$(PREBUILD)
 	@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
+	cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/unzip-gnu89-build.patch
 	cd $(DIR_APP) && make -f unix/Makefile clean
-	cd $(DIR_APP)/unix && ./configure
+	cd $(DIR_APP)/unix && CFLAGS="$(CFLAGS)" ./configure
 	# ARM/x86_64 cannot use the x86 32 bit assembly code.
-	cd $(DIR_APP) && make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 linux_noasm
+	cd $(DIR_APP) && make -f unix/Makefile LOCAL_UNZIP=-D_FILE_OFFSET_BITS=64 generic_gcc
 	cd $(DIR_APP) && make prefix=/usr MANDIR=/usr/share/man/man1 -f unix/Makefile install
 	@rm -rf $(DIR_APP)
 	@$(POSTBUILD)
diff --git a/src/patches/unzip-gnu89-build.patch b/src/patches/unzip-gnu89-build.patch
new file mode 100644
index 000000000..706f12531
--- /dev/null
+++ b/src/patches/unzip-gnu89-build.patch
@@ -0,0 +1,15 @@
+unzip uses C89-only features, so it needs to be built in C89 mode.
+
+diff --git a/unix/Makefile b/unix/Makefile
+index ab32270cf4b9b2cf..5eabbe13095e1f58 100644
+--- a/unix/Makefile
++++ b/unix/Makefile
+@@ -545,7 +545,7 @@ generic:	flags	   # now try autoconfigure first
+ #	make $(MAKEF) unzips CF="${CF} `cat flags`"
+ 
+ generic_gcc:
+-	$(MAKE) $(MAKEF) generic CC=gcc IZ_BZIP2="$(IZ_BZIP2)"
++	$(MAKE) $(MAKEF) generic CC="gcc -std=gnu89" IZ_BZIP2="$(IZ_BZIP2)"
+ 
+ # extensions to perform SVR4 package-creation after compilation
+ generic_pkg:	generic svr4package
-- 
2.39.5



  parent reply	other threads:[~2025-05-02 10:16 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250502101632.1082010-1-michael.tremer@ipfire.org>
2025-05-02 10:15 ` [PATCH 02/42] berkeley: " Michael Tremer
2025-05-02 10:15 ` [PATCH 03/42] m4: " Michael Tremer
2025-05-02 10:15 ` [PATCH 04/42] ncurses: " Michael Tremer
2025-05-02 10:15 ` [PATCH 05/42] perl: " Michael Tremer
2025-05-02 10:15 ` [PATCH 06/42] bash: " Michael Tremer
2025-05-02 10:15 ` [PATCH 07/42] ed: " Michael Tremer
2025-05-02 10:15 ` [PATCH 08/42] sysklogd: " Michael Tremer
2025-05-02 10:15 ` [PATCH 09/42] texinfo: " Michael Tremer
2025-05-02 10:16 ` [PATCH 10/42] jq: " Michael Tremer
2025-05-02 10:16 ` [PATCH 11/42] ppp: " Michael Tremer
2025-05-02 10:16 ` Michael Tremer [this message]
2025-05-02 10:16 ` [PATCH 13/42] cpio: " Michael Tremer
2025-05-02 10:16 ` [PATCH 14/42] libconfig: " Michael Tremer
2025-05-02 10:16 ` [PATCH 15/42] linux-atm: " Michael Tremer
2025-05-02 10:16 ` [PATCH 16/42] p11-kit: " Michael Tremer
2025-05-02 10:16 ` [PATCH 17/42] cyrus-sasl: " Michael Tremer
2025-05-02 10:16 ` [PATCH 18/42] fcron: " Michael Tremer
2025-05-02 10:16 ` [PATCH 19/42] libtirpc: " Michael Tremer
2025-05-02 10:16 ` [PATCH 20/42] perl-Convert-UUlib: " Michael Tremer
2025-05-02 10:16 ` [PATCH 21/42] squidguard: " Michael Tremer
2025-05-02 10:16 ` [PATCH 22/42] mpage: " Michael Tremer
2025-05-02 10:16 ` [PATCH 23/42] cifs-utils: " Michael Tremer
2025-05-02 10:16 ` [PATCH 24/42] krb5: " Michael Tremer
2025-05-02 10:16 ` [PATCH 25/42] postfix: " Michael Tremer
2025-05-02 10:16 ` [PATCH 26/42] strongswan: " Michael Tremer
2025-05-02 10:16 ` [PATCH 27/42] w_scan: " Michael Tremer
2025-05-02 10:16 ` [PATCH 28/42] iperf3: " Michael Tremer
2025-05-02 10:16 ` [PATCH 29/42] openvmtools: " Michael Tremer
2025-05-02 10:16 ` [PATCH 30/42] usb_modeswitch: " Michael Tremer
2025-05-02 10:16 ` [PATCH 31/42] parted: " Michael Tremer
2025-05-02 10:16 ` [PATCH 32/42] xinetd: " Michael Tremer
2025-05-02 10:16 ` [PATCH 33/42] ipfire-netboot: " Michael Tremer
2025-05-02 10:16 ` [PATCH 34/42] iftop: " Michael Tremer
2025-05-02 10:16 ` [PATCH 35/42] pmacct: " Michael Tremer
2025-05-02 10:16 ` [PATCH 36/42] Revert "tcl: Update to version 9.0.1" Michael Tremer
2025-05-02 10:16 ` [PATCH 37/42] expect: Update to 5.45.4 Michael Tremer
2025-05-02 10:16 ` [PATCH 38/42] pkg-config: Fix build with GCC 15 Michael Tremer
2025-05-02 10:16 ` [PATCH 39/42] pam: Fix build with GCC 15 on aarch64 Michael Tremer
2025-05-02 10:16 ` [PATCH 40/42] perl: Respect our CFLAGS/LDFLAGS in the toolchain stage, too Michael Tremer
2025-05-02 10:16 ` [PATCH 41/42] make.sh: Bump the toolchain version Michael Tremer
2025-05-02 10:16 ` [PATCH 42/42] gmp: Fix build with GCC 15 Michael Tremer

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=20250502101632.1082010-12-michael.tremer@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox