diff --git a/pkgs/pocl/default.nix b/pkgs/pocl/default.nix index 0f683ce..fdf4c13 100644 --- a/pkgs/pocl/default.nix +++ b/pkgs/pocl/default.nix @@ -103,11 +103,10 @@ stdenv.mkDerivation (finalAttrs: { (lib.cmakeBool "ENABLE_TESTS" finalAttrs.finalPackage.doCheck) (lib.cmakeBool "ENABLE_RELOCATION" true) - (lib.cmakeBool "ENABLE_POCL_BUILDING" false) + (lib.cmakeBool "ENABLE_POCL_BUILDING" true) + (lib.cmakeBool "POCL_ICD_ABSOLUTE_PATH" true) (lib.cmakeBool "ENABLE_TBB_DEVICE" enableTBB) - (lib.cmakeBool "ENABLE_OVNI" enableOVNI) - (lib.cmakeBool "ENABLE_NOSV" enableNOSV) (lib.cmakeBool "ENABLE_ICD" enableICD) (lib.cmakeBool "ENABLE_HWLOC" enableHWLOC) (lib.cmakeBool "ENABLE_LTTNG" enableLTTNG) @@ -117,6 +116,9 @@ stdenv.mkDerivation (finalAttrs: { # avoid the runtime linker pulling in a different llvm e.g. from graphics drivers (lib.cmakeBool "STATIC_LLVM" staticLLVM) + ] ++ lib.optionals (enableNOSV || enableOVNI) [ + (lib.cmakeBool "ENABLE_NOSV" enableNOSV) + (lib.cmakeBool "ENABLE_OVNI" enableOVNI) ] ++ lib.optionals (!isCross && enableDistroVariants) [ (lib.cmakeFeature "KERNELLIB_HOST_CPU_VARIANTS" "distro") # TODO: check if we can do it when cross compiling ] ++ lib.optionals isCross [ @@ -136,6 +138,7 @@ stdenv.mkDerivation (finalAttrs: { preConfigure = '' cmakeFlagsArray+=( -DEXTRA_HOST_LD_FLAGS="${lib.escapeShellArg (builtins.readFile "${stdenv.cc}/nix-support/cc-ldflags")}" + -DEXTRA_KERNEL_FLAGS="${lib.escapeShellArg (builtins.readFile "${stdenv.cc}/nix-support/cc-ldflags")}" ) '' + lib.optionalString stdenv.hostPlatform.isRiscV '' cmakeFlagsArray+=(