mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
liquidwar: drop -Werror (gcc-16 fix)
Without the change `liquidwar` build fails on `master` as https://hydra.nixos.org/build/347153247: ``` p2p-node.c:912:7: error: variable 'send_i' set but not used [-Werror=unused-but-set-variable=] 912 | int send_i = 0; | ^~~~~~ cc1: all warnings being treated as errors ```
This commit is contained in:
@@ -90,21 +90,13 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString (
|
||||
lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
|
||||
# Needed with GCC 12 but problematic with some old GCCs
|
||||
"-Wno-error=address"
|
||||
"-Wno-error=use-after-free"
|
||||
"-std=gnu17"
|
||||
# Fix build w/ glibc-2.44
|
||||
"-Wno-error=discarded-qualifiers"
|
||||
]
|
||||
++ [
|
||||
"-Wno-error=deprecated-declarations"
|
||||
# Avoid GL_GLEXT_VERSION double definition
|
||||
" -DNO_SDL_GLEXT"
|
||||
]
|
||||
);
|
||||
env.NIX_CFLAGS_COMPILE = toString [
|
||||
# gcc-12 and above generate many benign warnings
|
||||
"-Wno-error"
|
||||
"-std=gnu17"
|
||||
# Avoid GL_GLEXT_VERSION double definition
|
||||
"-DNO_SDL_GLEXT"
|
||||
];
|
||||
|
||||
# To avoid problems finding SDL_types.h.
|
||||
configureFlags = [ "CFLAGS=-I${lib.getDev SDL}/include/SDL" ];
|
||||
|
||||
Reference in New Issue
Block a user