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

This commit is contained in:
blenderfreaky
2025-08-24 13:27:49 +02:00
committed by Alyssa Ross
parent 3e04a8f0a8
commit fd261cb094
6 changed files with 48 additions and 2 deletions

View File

@@ -0,0 +1,22 @@
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()

View File

@@ -0,0 +1,8 @@
--- 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

View File

@@ -484,7 +484,7 @@ let
}
//
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 { };
}

View File

@@ -50,7 +50,7 @@ stdenv.mkDerivation (finalAttrs: {
];
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

View File

@@ -236,7 +236,23 @@
"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;
}
];
}