diff options
author | Astro <astro@spaceboyz.net> | 2023-11-20 00:55:06 +0100 |
---|---|---|
committer | Astro <astro@spaceboyz.net> | 2023-11-20 03:20:24 +0100 |
commit | 26b585aa7b1291580fd2152f5c1295731ced6b9a (patch) | |
tree | 41dfe4ee1d373d236c2e21f0da5ced481567f758 /pkgs/os-specific/bsd | |
parent | 92ec26ce8d59d6856fb4f5ee4d1b74c654ca6eda (diff) |
netbsd.sys: make compiler and linker warnings non-fatal
Diffstat (limited to 'pkgs/os-specific/bsd')
-rw-r--r-- | pkgs/os-specific/bsd/netbsd/default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 5012a0c7d3c76..fc6dfa8349262 100644 --- a/pkgs/os-specific/bsd/netbsd/default.nix +++ b/pkgs/os-specific/bsd/netbsd/default.nix @@ -603,6 +603,12 @@ in makeScopeWithSplicing' { version = "9.2"; sha256 = "03s18q8d9giipf05bx199fajc2qwikji0djz7hw63d2lya6bfnpj"; + # Make the build ignore linker warnings + prePatch = '' + substituteInPlace sys/conf/Makefile.kern.inc \ + --replace "-Wa,--fatal-warnings" "" + ''; + patches = [ # Fix this error when building bootia32.efi and bootx64.efi: # error: PHDR segment not covered by LOAD segment @@ -634,7 +640,11 @@ in makeScopeWithSplicing' { makeFlags = defaultMakeFlags ++ [ "FIRMWAREDIR=$(out)/libdata/firmware" ]; hardeningDisable = [ "pic" ]; MKKMOD = "no"; - env.NIX_CFLAGS_COMPILE = toString [ "-Wa,--no-warn" ]; + env.NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=array-parameter" + "-Wno-error=array-bounds" + "-Wa,--no-warn" + ]; postBuild = '' make -C arch/$MACHINE/compile/$CONFIG $makeFlags |