From ae48d2c87e4cc74b6ba87d793827856fa20071b3 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 2 Jan 2025 00:40:09 +0100 Subject: [PATCH] thttpd: fix build with GCC >= 14 Unfortunately there is no way in the configure script to persist CFLAGS from configure to the final build (CFLAGS is respected by configure, but by configure only). This roughly matches what alpine is doing now: They pass -fpermissive to configure via CFLAGS to avoid -Wimplicit-int, the -Wimplicit-function-declaration in the actual build seemingly never happens on Alpine, probably due to musl. --- pkgs/by-name/th/thttpd/package.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/by-name/th/thttpd/package.nix b/pkgs/by-name/th/thttpd/package.nix index 66ccfe04bad8..0b41027b0926 100644 --- a/pkgs/by-name/th/thttpd/package.nix +++ b/pkgs/by-name/th/thttpd/package.nix @@ -19,6 +19,13 @@ stdenv.mkDerivation rec { sed -i -e 's/chmod 2755/chmod 755/' extras/Makefile.in ''; + # Work around failures with GCC 14, upstream is inactive unfortunately + # https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors + NIX_CFLAGS_COMPILE = [ + "-Wno-error=implicit-int" + "-Wno-error=implicit-function-declaration" + ]; + buildInputs = [ libxcrypt ];