From b9a38bf4f2dae7fe2f72975b15ba10bb70bf3aec Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 16 Oct 2023 08:14:48 +0100 Subject: [PATCH] monotone: fix build for upcoming gcc-14 Without the change build fails as: In file included from /<>/gcc-14.0.0/include/c++/14.0.0/limits:42, from :1: /<>/gcc-14.0.0/include/c++/14.0.0/x86_64-unknown-linux-gnu/bits/c++config.h:668:2: warning: #warning "__STRICT_ANSI__ seems to have been undefined; this is not supported" [-Wcpp] 668 | #warning "__STRICT_ANSI__ seems to have been undefined; this is not supported" | ^~~~~~~ /<>/gcc-14.0.0/include/c++/14.0.0/limits:2100:30: error: exponent has no digits 2100 | return __extension__ 0x1.0p-16382Q; | ^~~~~~ /<>/gcc-14.0.0/include/c++/14.0.0/limits:2114:30: error: exponent has no digits 2114 | return __extension__ 0x1.ffffffffffffffffffffffffffffp+16383Q; gcc upstream confirms unsetting __STRICT_ANSI__ is an unsupported configuration: https://gcc.gnu.org/PR111824 --- .../version-management/monotone/default.nix | 1 + .../monotone/monotone-1.1-gcc-14.patch | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/applications/version-management/monotone/monotone-1.1-gcc-14.patch diff --git a/pkgs/applications/version-management/monotone/default.nix b/pkgs/applications/version-management/monotone/default.nix index 2db433b3f8c4..56e23ee1f6bd 100644 --- a/pkgs/applications/version-management/monotone/default.nix +++ b/pkgs/applications/version-management/monotone/default.nix @@ -40,6 +40,7 @@ stdenv.mkDerivation rec { revert = true; sha256 = "0fzjdv49dx5lzvqhkvk50lkccagwx8h0bfha4a0k6l4qh36f9j7c"; }) + ./monotone-1.1-gcc-14.patch ]; postPatch = '' diff --git a/pkgs/applications/version-management/monotone/monotone-1.1-gcc-14.patch b/pkgs/applications/version-management/monotone/monotone-1.1-gcc-14.patch new file mode 100644 index 000000000000..a5b79b6d02fb --- /dev/null +++ b/pkgs/applications/version-management/monotone/monotone-1.1-gcc-14.patch @@ -0,0 +1,17 @@ +Unsetting __STRICT_ANSI__ is not a supported configuration for gcc +nowadays. gcc-14 started failing libstdc++ build as it uses gcc +extensions without __STRICT_ANSI__: https://gcc.gnu.org/PR111824 +--- a/src/base.hh ++++ b/src/base.hh +@@ -34,11 +34,6 @@ + #define WIN32_LEAN_AND_MEAN + #endif + +-// Cygwin somehow enables strict ansi, which we don't want. +-#ifdef __STRICT_ANSI__ +-#undef __STRICT_ANSI__ +-#endif +- + #include + #include // it would be nice if there were a +