Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions pkgs/by-name/bl/blender/llvm-conflict.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/extern/hipew/src/util.h b/extern/hipew/src/util.h
index 2aafc4b7f9..b9ed1c0cd3 100644
--- a/extern/hipew/src/util.h
+++ b/extern/hipew/src/util.h
@@ -40,11 +40,12 @@
# define dynamic_library_close(lib) FreeLibrary(lib)
# define dynamic_library_find(lib, symbol) GetProcAddress(lib, symbol)
#else
+# define _GNU_SOURCE
# include <dlfcn.h>

typedef void* DynamicLibrary;

-# define dynamic_library_open(path) dlopen(path, RTLD_NOW)
+# define dynamic_library_open(path) dlmopen(LM_ID_NEWLM, path, RTLD_NOW)
# define dynamic_library_close(lib) dlclose(lib)
# define dynamic_library_find(lib, symbol) dlsym(lib, symbol)
#endif
5 changes: 4 additions & 1 deletion pkgs/by-name/bl/blender/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ stdenv'.mkDerivation (finalAttrs: {
};

# Minimal backport of hiprt 3.x support from https://projects.blender.org/blender/blender/pulls/144889
patches = lib.optional rocmSupport ./hiprt-3-compat.patch;
patches = lib.optionals rocmSupport [
./hiprt-3-compat.patch
./llvm-conflict.patch
];

postPatch =
(lib.optionalString stdenv.hostPlatform.isDarwin ''
Expand Down
Loading