pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libclc: catch up w/ llvm



Module Name:	pkgsrc-wip
Committed By:	Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By:	tnn
Date:		Wed Oct 14 15:04:37 2026 +0200
Changeset:	6584ed56ad48feaf4358750986549009297534b4

Modified Files:
	libclc/DESCR
	libclc/Makefile
	libclc/PLIST
	libclc/buildlink3.mk

Log Message:
libclc: catch up w/ llvm

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=6584ed56ad48feaf4358750986549009297534b4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 libclc/DESCR         |   2 +-
 libclc/Makefile      |  36 +++++++++++--
 libclc/PLIST         | 140 ++++-----------------------------------------------
 libclc/buildlink3.mk |   4 +-
 4 files changed, 46 insertions(+), 136 deletions(-)

diffs:
diff --git a/libclc/DESCR b/libclc/DESCR
index 4d637ef797..6be50fa3c2 100644
--- a/libclc/DESCR
+++ b/libclc/DESCR
@@ -21,4 +21,4 @@ allowing the target to override the generic implementation at the
 granularity of individual functions.
 
 libclc currently supports PTX, AMDGPU, SPIRV and CLSPV targets, but
-support for more targets is welcome.
\ No newline at end of file
+support for more targets is welcome.
diff --git a/libclc/Makefile b/libclc/Makefile
index 1f21e62024..bcf6c0154b 100644
--- a/libclc/Makefile
+++ b/libclc/Makefile
@@ -17,15 +17,45 @@ GCC_REQD+=		7
 CMAKE_CONFIGURE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
 CMAKE_CONFIGURE_ARGS+=	-DCMAKE_C_COMPILER=${CC:Q}
 CMAKE_CONFIGURE_ARGS+=	-DCMAKE_CXX_COMPILER=${CXX:Q}
+CMAKE_CONFIGURE_ARGS+=	-DCMAKE_CLC_COMPILER=${BUILDLINK_PREFIX.clang}/bin/clang
 
-PYTHON_FOR_BUILD_ONLY=	yes
+LIBCLC_TARGETS=		spirv32-unknown-unknown
+LIBCLC_TARGETS+=	spirv64-unknown-unknown
 
-PKGCONFIG_OVERRIDE+=	libclc.pc.in
+BUILD_DIRS=		${LIBCLC_TARGETS}
+
+PYTHON_FOR_BUILD_ONLY=	yes
 
-.include "../../devel/cmake/build.mk"
 .include "../../wip/clang/buildlink3.mk"
 .include "../../wip/libunwind/buildlink3.mk"
 .include "../../wip/llvm/buildlink3.mk"
+
+PLIST_VARS+=		amdgpu nvptx vulkan
+.if ${PKG_BUILD_OPTIONS.llvm:Mllvm-target-amdgpu}
+LIBCLC_TARGETS+=	amdgcn-amd-amdhsa
+PLIST.amdgpu=		yes
+.endif
+.if ${PKG_BUILD_OPTIONS.llvm:Mllvm-target-nvptx}
+LIBCLC_TARGETS+=	nvptx64-nvidia-cuda
+PLIST.nvptx=		yes
+.endif
+.if ${PKG_BUILD_OPTIONS.llvm:Mllvm-target-spirv}
+LIBCLC_TARGETS+=	spirv64-unknown-vulkan
+PLIST.vulkan=		yes
+.endif
+
+do-configure:
+	${RUN} cd ${WRKSRC}/${CONFIGURE_DIR} && \
+	for t in ${LIBCLC_TARGETS}; do \
+		${SETENV} ${CONFIGURE_ENV} cmake \
+		--install-prefix ${PREFIX} \
+		-B ${CMAKE_BUILD_DIR}/$$t \
+		-G ${_CMAKE_BUILD_SYSTEM:Q} \
+		${CMAKE_CONFIGURE_ARGS} \
+		-DLLVM_DEFAULT_TARGET_TRIPLE=$$t || exit 1; \
+	done
+
+.include "../../devel/cmake/build.mk"
 .include "../../lang/python/tool.mk"
 .include "../../parallel/spirv-tools/buildlink3.mk"
 .include "../../wip/spirv-llvm-translator/buildlink3.mk"
diff --git a/libclc/PLIST b/libclc/PLIST
index 0206114e61..98219e72f3 100644
--- a/libclc/PLIST
+++ b/libclc/PLIST
@@ -1,131 +1,11 @@
 @comment $NetBSD$
-share/clc/amdgcn-amd-amdhsa.bc
-share/clc/aruba-r600--.bc
-share/clc/barts-r600--.bc
-share/clc/bonaire-amdgcn--.bc
-share/clc/bonaire-amdgcn-mesa-mesa3d.bc
-share/clc/caicos-r600--.bc
-share/clc/carrizo-amdgcn--.bc
-share/clc/carrizo-amdgcn-mesa-mesa3d.bc
-share/clc/cayman-r600--.bc
-share/clc/cedar-r600--.bc
-share/clc/clspv--.bc
-share/clc/clspv64--.bc
-share/clc/cypress-r600--.bc
-share/clc/fiji-amdgcn--.bc
-share/clc/fiji-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1010-amdgcn--.bc
-share/clc/gfx1010-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1011-amdgcn--.bc
-share/clc/gfx1011-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1012-amdgcn--.bc
-share/clc/gfx1012-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1013-amdgcn--.bc
-share/clc/gfx1013-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1030-amdgcn--.bc
-share/clc/gfx1030-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1031-amdgcn--.bc
-share/clc/gfx1031-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1032-amdgcn--.bc
-share/clc/gfx1032-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1033-amdgcn--.bc
-share/clc/gfx1033-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1034-amdgcn--.bc
-share/clc/gfx1034-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1035-amdgcn--.bc
-share/clc/gfx1035-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1036-amdgcn--.bc
-share/clc/gfx1036-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1100-amdgcn--.bc
-share/clc/gfx1100-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1101-amdgcn--.bc
-share/clc/gfx1101-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1102-amdgcn--.bc
-share/clc/gfx1102-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1103-amdgcn--.bc
-share/clc/gfx1103-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1150-amdgcn--.bc
-share/clc/gfx1150-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1151-amdgcn--.bc
-share/clc/gfx1151-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1152-amdgcn--.bc
-share/clc/gfx1152-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1153-amdgcn--.bc
-share/clc/gfx1153-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1200-amdgcn--.bc
-share/clc/gfx1200-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1201-amdgcn--.bc
-share/clc/gfx1201-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1250-amdgcn--.bc
-share/clc/gfx1250-amdgcn-mesa-mesa3d.bc
-share/clc/gfx1251-amdgcn--.bc
-share/clc/gfx1251-amdgcn-mesa-mesa3d.bc
-share/clc/gfx602-amdgcn--.bc
-share/clc/gfx602-amdgcn-mesa-mesa3d.bc
-share/clc/gfx705-amdgcn--.bc
-share/clc/gfx705-amdgcn-mesa-mesa3d.bc
-share/clc/gfx805-amdgcn--.bc
-share/clc/gfx805-amdgcn-mesa-mesa3d.bc
-share/clc/gfx900-amdgcn--.bc
-share/clc/gfx900-amdgcn-mesa-mesa3d.bc
-share/clc/gfx902-amdgcn--.bc
-share/clc/gfx902-amdgcn-mesa-mesa3d.bc
-share/clc/gfx904-amdgcn--.bc
-share/clc/gfx904-amdgcn-mesa-mesa3d.bc
-share/clc/gfx906-amdgcn--.bc
-share/clc/gfx906-amdgcn-mesa-mesa3d.bc
-share/clc/gfx908-amdgcn--.bc
-share/clc/gfx908-amdgcn-mesa-mesa3d.bc
-share/clc/gfx909-amdgcn--.bc
-share/clc/gfx909-amdgcn-mesa-mesa3d.bc
-share/clc/gfx90a-amdgcn--.bc
-share/clc/gfx90a-amdgcn-mesa-mesa3d.bc
-share/clc/gfx90c-amdgcn--.bc
-share/clc/gfx90c-amdgcn-mesa-mesa3d.bc
-share/clc/gfx942-amdgcn--.bc
-share/clc/gfx942-amdgcn-mesa-mesa3d.bc
-share/clc/gfx950-amdgcn--.bc
-share/clc/gfx950-amdgcn-mesa-mesa3d.bc
-share/clc/hainan-amdgcn--.bc
-share/clc/hainan-amdgcn-mesa-mesa3d.bc
-share/clc/hawaii-amdgcn--.bc
-share/clc/hawaii-amdgcn-mesa-mesa3d.bc
-share/clc/hemlock-r600--.bc
-share/clc/iceland-amdgcn--.bc
-share/clc/iceland-amdgcn-mesa-mesa3d.bc
-share/clc/juniper-r600--.bc
-share/clc/kabini-amdgcn--.bc
-share/clc/kabini-amdgcn-mesa-mesa3d.bc
-share/clc/kaveri-amdgcn--.bc
-share/clc/kaveri-amdgcn-mesa-mesa3d.bc
-share/clc/mullins-amdgcn--.bc
-share/clc/mullins-amdgcn-mesa-mesa3d.bc
-share/clc/nvptx64--.bc
-share/clc/nvptx64--nvidiacl.bc
-share/clc/nvptx64-nvidia-cuda.bc
-share/clc/oland-amdgcn--.bc
-share/clc/oland-amdgcn-mesa-mesa3d.bc
-share/clc/palm-r600--.bc
-share/clc/pitcairn-amdgcn--.bc
-share/clc/pitcairn-amdgcn-mesa-mesa3d.bc
-share/clc/polaris10-amdgcn--.bc
-share/clc/polaris10-amdgcn-mesa-mesa3d.bc
-share/clc/polaris11-amdgcn--.bc
-share/clc/polaris11-amdgcn-mesa-mesa3d.bc
-share/clc/redwood-r600--.bc
-share/clc/spirv-mesa3d-.spv
-share/clc/spirv64-mesa3d-.spv
-share/clc/stoney-amdgcn--.bc
-share/clc/stoney-amdgcn-mesa-mesa3d.bc
-share/clc/sumo-r600--.bc
-share/clc/sumo2-r600--.bc
-share/clc/tahiti-amdgcn--.bc
-share/clc/tahiti-amdgcn-mesa-mesa3d.bc
-share/clc/tonga-amdgcn--.bc
-share/clc/tonga-amdgcn-mesa-mesa3d.bc
-share/clc/tongapro-amdgcn--.bc
-share/clc/tongapro-amdgcn-mesa-mesa3d.bc
-share/clc/turks-r600--.bc
-share/clc/verde-amdgcn--.bc
-share/clc/verde-amdgcn-mesa-mesa3d.bc
-share/pkgconfig/libclc.pc
+${PLIST.amdgpu}share/clc/amdgcn-amd-amdhsa/libclc.a
+${PLIST.amdgpu}share/clc/amdgcn-amd-amdhsa/libclc.bc
+${PLIST.nvptx}share/clc/nvptx64-nvidia-cuda/libclc.a
+${PLIST.nvptx}share/clc/nvptx64-nvidia-cuda/libclc.bc
+share/clc/spirv32-unknown-unknown/libclc.a
+share/clc/spirv32-unknown-unknown/libclc.spv
+share/clc/spirv64-unknown-unknown/libclc.a
+share/clc/spirv64-unknown-unknown/libclc.spv
+${PLIST.vulkan}share/clc/spirv64-unknown-vulkan/libclc.a
+${PLIST.vulkan}share/clc/spirv64-unknown-vulkan/libclc.bc
diff --git a/libclc/buildlink3.mk b/libclc/buildlink3.mk
index 2d0a7f3c01..09964cc194 100644
--- a/libclc/buildlink3.mk
+++ b/libclc/buildlink3.mk
@@ -8,8 +8,8 @@ LIBCLC_BUILDLINK3_MK:=
 BUILDLINK_API_DEPENDS.libclc+=	libclc>=23.1.0
 BUILDLINK_PKGSRCDIR.libclc?=	../../wip/libclc
 
-.include "../../lang/llvm/buildlink3.mk"
-.include "../../parallel/spirv-llvm-translator/buildlink3.mk"
+.include "../../wip/llvm/buildlink3.mk"
+.include "../../wip/spirv-llvm-translator/buildlink3.mk"
 .endif	# LIBCLC_BUILDLINK3_MK
 
 BUILDLINK_TREE+=	-libclc


Home | Main Index | Thread Index | Old Index