From 8eea800f1a9f8b9cf7ec8c128956c9533a977533 Mon Sep 17 00:00:00 2001 From: geos_one Date: Sat, 9 Aug 2025 00:45:42 +0200 Subject: [PATCH] gcc 14 patch --- debian/rules | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 0552a65..1d0d496 100755 --- a/debian/rules +++ b/debian/rules @@ -2,7 +2,19 @@ NULL = -export DEB_BUILD_MAINT_OPTIONS = hardening=+all +# Make sure lintian does not complain about missing hardenings. +export DEB_BUILD_MAINT_OPTIONS=hardening=+all + +# Make sure the decades-old source code gets compiled by allowing implicit +# function declarations and, for gcc-14 and above, by downgrading the +# diagnostics applied by the compiler. See +# https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html +# for further details. +export DEB_CFLAGS_MAINT_STRIP=-Wincompatible-pointer-types +cc_major := $(shell $(CC) --version | head -n1 | cut -d' ' -f4 | cut -d. -f1) +cc_major_ge_14 := $(shell [ $(cc_major) -ge 14 ] && echo 'true') +export DEB_CFLAGS_MAINT_APPEND=$(if $(cc_major_ge_14),-fpermissive) + DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/buildflags.mk