llvmPackages_{20,21}.libclc: reenable and update patches

Changed files
+48 -2
pkgs
development
+22
pkgs/development/compilers/llvm/20/libclc/use-default-paths.patch
···
+
From e8b910246d0c7c3d9fff994f71c6f8a48ec09a50 Mon Sep 17 00:00:00 2001
+
From: Tristan Ross <tristan.ross@midstall.com>
+
Date: Sat, 24 Aug 2024 19:56:24 -0700
+
Subject: [PATCH] [libclc] use default paths with find_program when possible
+
+
---
+
libclc/CMakeLists.txt | 4 ++--
+
1 file changed, 1 insertions(+), 1 deletions(-)
+
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
+
index 02bb859ae8590b..6bcd8ae52a5794 100644
+
--- a/CMakeLists.txt
+
+++ b/CMakeLists.txt
+
@@ -55,7 +55,7 @@ if( LIBCLC_STANDALONE_BUILD OR CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DI
+
# Import required tools
+
if( NOT EXISTS ${LIBCLC_CUSTOM_LLVM_TOOLS_BINARY_DIR} )
+
foreach( tool IN ITEMS clang llvm-as llvm-link opt )
+
- find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH )
+
+ find_program( LLVM_TOOL_${tool} ${tool} PATHS ${LLVM_TOOLS_BINARY_DIR} )
+
set( ${tool}_exe ${LLVM_TOOL_${tool}} )
+
set( ${tool}_target )
+
endforeach()
+8
pkgs/development/compilers/llvm/21/libclc/gnu-install-dirs.patch
···
+
--- a/libclc.pc.in
+
+++ b/libclc.pc.in
+
@@ -1,4 +1,4 @@
+
-libexecdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_DATADIR@/clc
+
+libexecdir=@CMAKE_INSTALL_FULL_DATADIR@/clc
+
+
Name: libclc
+
Description: Library requirements of the OpenCL C programming language
+1 -1
pkgs/development/compilers/llvm/common/default.nix
···
}
//
lib.optionalAttrs
-
(lib.versionAtLeast metadata.release_version "16" && lib.versionOlder metadata.release_version "20")
+
(lib.versionAtLeast metadata.release_version "16" && lib.versionOlder metadata.release_version "22")
{
libclc = callPackage ./libclc { };
}
+1 -1
pkgs/development/compilers/llvm/common/libclc/default.nix
···
];
patches = [
-
./libclc-gnu-install-dirs.patch
+
(getVersionFile "libclc/gnu-install-dirs.patch")
]
# LLVM 19 changes how host tools are looked up.
# Need to remove NO_DEFAULT_PATH and the PATHS arguments for find_program
pkgs/development/compilers/llvm/common/libclc/libclc-gnu-install-dirs.patch pkgs/development/compilers/llvm/16/libclc/gnu-install-dirs.patch
+16
pkgs/development/compilers/llvm/common/patches.nix
···
"libclc/use-default-paths.patch" = [
{
after = "19";
+
before = "20";
path = ../19;
+
}
+
{
+
after = "20";
+
path = ../20;
+
}
+
];
+
"libclc/gnu-install-dirs.patch" = [
+
{
+
after = "16";
+
before = "21";
+
path = ../16;
+
}
+
{
+
after = "21";
+
path = ../21;
}
];
}