linuxPackages.evdi: Fix flags
Since #402198 kernel modules are no longer built with wrapped compilers. Firstly, NIX_CFLAGS_COMPILE is no longer effective, so we change that to CFLAGS, which is used in the Makefile for evdi. Secondly, we still need to use the wrapped compiler for userspace stuff, so separate that out in postBuild. Fixes #437311
This commit is contained in:
@@ -26,12 +26,17 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-xB3AHg9t/X8vw5p7ohFQ+WuMjb1P8DAP3pROiwWkVPs=";
|
||||
};
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString [
|
||||
env.CFLAGS = toString [
|
||||
"-Wno-error"
|
||||
"-Wno-error=discarded-qualifiers" # for Linux 4.19 compatibility
|
||||
"-Wno-error=sign-compare"
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
# Don't use makeFlags for userspace stuff
|
||||
make library pyevdi
|
||||
'';
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
buildInputs = [
|
||||
@@ -43,6 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
makeFlags = kernelModuleMakeFlags ++ [
|
||||
"KVER=${kernel.modDirVersion}"
|
||||
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
"module"
|
||||
];
|
||||
|
||||
hardeningDisable = [
|
||||
|
||||
Reference in New Issue
Block a user