diff options
Diffstat (limited to 'pkgs/os-specific/bsd/netbsd/default.nix')
-rw-r--r-- | pkgs/os-specific/bsd/netbsd/default.nix | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/pkgs/os-specific/bsd/netbsd/default.nix b/pkgs/os-specific/bsd/netbsd/default.nix index 5012a0c7d3c7..c44936ddcb47 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 @@ -612,8 +618,13 @@ in makeScopeWithSplicing' { ./sys-headers-incsdir.patch ]; - # multiple header dirs, see above - inherit (self.include) postPatch; + postPatch = + '' + substituteInPlace sys/arch/i386/stand/efiboot/Makefile.efiboot \ + --replace "-nocombreloc" "-z nocombreloc" + '' + + # multiple header dirs, see above + self.include.postPatch; CONFIG = "GENERIC"; @@ -634,7 +645,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 |