ocl-icd: fix cross to musl

As with several other packages, we have to tell autoconf to please
assume malloc works properly.
This commit is contained in:
Alyssa Ross
2025-05-02 14:05:40 +02:00
parent f02fddb8ac
commit b9c6199cd8
+8 -3
View File
@@ -26,9 +26,14 @@ stdenv.mkDerivation rec {
buildInputs = [ opencl-headers ] ++ lib.optionals stdenv.hostPlatform.isWindows [ windows.dlfcn ];
configureFlags = [
"--enable-custom-vendordir=/run/opengl-driver/etc/OpenCL/vendors"
];
configureFlags =
[
"--enable-custom-vendordir=/run/opengl-driver/etc/OpenCL/vendors"
]
++ lib.optionals (!lib.systems.equals stdenv.buildPlatform stdenv.hostPlatform) [
"ac_cv_func_malloc_0_nonnull=yes"
"ac_cv_func_realloc_0_nonnull=yes"
];
# fixes: can't build x86_64-w64-mingw32 shared library unless -no-undefined is specified
makeFlags = lib.optionals stdenv.hostPlatform.isWindows [ "LDFLAGS=-no-undefined" ];