Date: Mon, 9 Aug 2021 19:48:44 GMT From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 80eadab44ca1 - main - devel/opencl-clang: flavorize for supported LLVM versions Message-ID: <202108091948.179JmioJ062374@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=80eadab44ca19eb18e7d49dc6035a0757e3f7436 commit 80eadab44ca19eb18e7d49dc6035a0757e3f7436 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2021-08-09 16:40:04 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2021-08-09 19:47:44 +0000 devel/opencl-clang: flavorize for supported LLVM versions Allow co-installation by moving under PREFIX/llvm* --- devel/intel-graphics-compiler/Makefile | 12 +++---- devel/opencl-clang/Makefile | 40 ++++++++++++++++++++---- devel/opencl-clang/distinfo.llvm10 | 3 ++ devel/opencl-clang/{distinfo => distinfo.llvm11} | 0 devel/opencl-clang/distinfo.llvm12 | 3 ++ devel/opencl-clang/distinfo.llvm70 | 7 +++++ devel/opencl-clang/distinfo.llvm80 | 7 +++++ devel/opencl-clang/distinfo.llvm90 | 7 +++++ 8 files changed, 65 insertions(+), 14 deletions(-) diff --git a/devel/intel-graphics-compiler/Makefile b/devel/intel-graphics-compiler/Makefile index 7e5935ba28cd..83e81935c5e6 100644 --- a/devel/intel-graphics-compiler/Makefile +++ b/devel/intel-graphics-compiler/Makefile @@ -1,6 +1,7 @@ PORTNAME= intel-graphics-compiler DISTVERSIONPREFIX= igc- DISTVERSION= 1.0.8173 +PORTREVISION= 1 CATEGORIES= devel PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ @@ -17,7 +18,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.md ONLY_FOR_ARCHS= amd64 i386 ONLY_FOR_ARCHS_REASON= Only Intel GPUs on x86 are supported -LIB_DEPENDS= libopencl-clang.so:devel/opencl-clang +LIB_DEPENDS= libopencl-clang.so.11:devel/opencl-clang@llvm11 USES= bison cmake compiler:c++17-lang python:build USE_GITHUB= yes @@ -25,6 +26,8 @@ USE_LDCONFIG= yes GH_ACCOUNT= intel GH_TUPLE= intel:vc-intrinsics:05d3f3d:vcintrin/../vc-intrinsics CMAKE_OFF= INSTALL_SPIRVDLL +CMAKE_ARGS= -DCMAKE_PREFIX_PATH:PATH="${LOCALBASE}/${LIB_DEPENDS:M*@llvm*:C/.*@//}" \ + -DIGC_OPTION__LLVM_PREFERRED_VERSION:STRING="${LIB_DEPENDS:M*@llvm*:C/.*so\.//:C/:.*//}" CFLAGS+= -Wno-macro-redefined # __fastcall PLIST_SUB= ARCH_SUFX=${ARCH:S/i386/32/:S/amd//:S/x86_//} @@ -44,11 +47,4 @@ post-patch: @${REINPLACE_CMD} -e 's/"-Werror"//; /-Werror/d' \ ${WRKSRC}/IGC/CMakeLists.txt -pre-configure: -# Only one libLLVM can be loaded, so use the same version as devel/opencl-clang - @for f in ${LOCALBASE}/lib/libopencl-clang.so.*; do \ - ${REINPLACE_CMD} "/set.*LLVM.*VERSION/s/\".*\"/\"$${f##*so.}\"/" \ - ${WRKSRC}/external/llvm/llvm_preferred_version.cmake; \ - done - .include <bsd.port.mk> diff --git a/devel/opencl-clang/Makefile b/devel/opencl-clang/Makefile index f4978c6c162b..a74e7d890605 100644 --- a/devel/opencl-clang/Makefile +++ b/devel/opencl-clang/Makefile @@ -1,8 +1,21 @@ PORTNAME= opencl-clang DISTVERSIONPREFIX= v -DISTVERSION= 11.0.0 -PORTREVISION= 1 +DISTVERSION= ${DISTVERSION_${FLAVOR}} +DISTVERSION_llvm12= 12.0.0 +DISTVERSION_llvm11= 11.0.0 +DISTVERSION_llvm10= 10.0.0-1 +DISTVERSION_llvm90= 9.0.1 +DISTVERSION_llvm80= 8.0.1-1 +DISTVERSION_llvm70= 7.0.1 CATEGORIES= devel +PKGNAMESUFFIX= -${FLAVOR} + +PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/ +PATCHFILES+= ${PATCHFILES_${FLAVOR}} +PATCHFILES_llvm90+= 3e753ba0cb0f.patch:-p1 # https://github.com/intel/opencl-clang/pull/96 +PATCHFILES_llvm90+= b28f74f9789f.patch:-p1 # https://github.com/intel/opencl-clang/pull/97 +PATCHFILES_llvm80+= ${PATCHFILES_llvm90} +PATCHFILES_llvm70+= ${PATCHFILES_llvm90} MAINTAINER= jbeich@FreeBSD.org COMMENT= Clang wrapper to compile OpenCL C kernels to SPIR-V modules @@ -10,15 +23,30 @@ COMMENT= Clang wrapper to compile OpenCL C kernels to SPIR-V modules LICENSE= NCSA LICENSE_FILE= ${WRKSRC}/LICENSE -LIB_DEPENDS= libLLVM-${DISTVERSION:R:R}.so:devel/llvm${DISTVERSION:R:R} \ - libLLVMSPIRVLib.so.${DISTVERSION:R:R}:devel/spirv-llvm-translator@llvm${DISTVERSION:R:R} +LIB_DEPENDS= libLLVM-${DISTVERSION:R:R}.so:devel/${FLAVOR} \ + libLLVMSPIRVLib.so.${DISTVERSION:R:R}:devel/spirv-llvm-translator@${FLAVOR} + +FLAVORS= ${12 11 10 90 80 70:L:S/^/llvm/} USES= cmake compiler:c++11-lib USE_GITHUB= yes -USE_LDCONFIG= yes +USE_LDCONFIG= ${PREFIX}/${FLAVOR}/lib GH_ACCOUNT= intel -PLIST_FILES= include/cclang/common_clang.h \ +DISTINFO_FILE= ${.CURDIR}/distinfo.${FLAVOR} +CMAKE_INSTALL_PREFIX= ${PREFIX}/${FLAVOR} +_PLIST_FILES= include/cclang/common_clang.h \ lib/libopencl-clang.so \ lib/libopencl-clang.so.${DISTVERSION:R:R} +.if ${FLAVOR:U:Mllvm70} +_PLIST_FILES:= ${_PLIST_FILES:S/libopencl-/libcommon_/} +.endif +PLIST_FILES= ${_PLIST_FILES:S,^,${FLAVOR}/,} + +.if !defined(DEFAULT_MAKESUM) +makesum: +. for f in ${FLAVORS} + ${MAKE} -C${.CURDIR} FLAVOR=$f DEFAULT_MAKESUM=1 ${.TARGET} +. endfor +.endif .include <bsd.port.mk> diff --git a/devel/opencl-clang/distinfo.llvm10 b/devel/opencl-clang/distinfo.llvm10 new file mode 100644 index 000000000000..dc01174a28e6 --- /dev/null +++ b/devel/opencl-clang/distinfo.llvm10 @@ -0,0 +1,3 @@ +TIMESTAMP = 1586267327 +SHA256 (intel-opencl-clang-v10.0.0-1_GH0.tar.gz) = 815005b6fb7fd8fd2f08b9036035d3aa9543f5ce8464e41ef2f2ed08a816f507 +SIZE (intel-opencl-clang-v10.0.0-1_GH0.tar.gz) = 23549 diff --git a/devel/opencl-clang/distinfo b/devel/opencl-clang/distinfo.llvm11 similarity index 100% rename from devel/opencl-clang/distinfo rename to devel/opencl-clang/distinfo.llvm11 diff --git a/devel/opencl-clang/distinfo.llvm12 b/devel/opencl-clang/distinfo.llvm12 new file mode 100644 index 000000000000..8955e5b74647 --- /dev/null +++ b/devel/opencl-clang/distinfo.llvm12 @@ -0,0 +1,3 @@ +TIMESTAMP = 1620727344 +SHA256 (intel-opencl-clang-v12.0.0_GH0.tar.gz) = da3cde9c3b360526371d255d99283f390a01a984fef84378d2df1e34021dda27 +SIZE (intel-opencl-clang-v12.0.0_GH0.tar.gz) = 25292 diff --git a/devel/opencl-clang/distinfo.llvm70 b/devel/opencl-clang/distinfo.llvm70 new file mode 100644 index 000000000000..891208dfc11f --- /dev/null +++ b/devel/opencl-clang/distinfo.llvm70 @@ -0,0 +1,7 @@ +TIMESTAMP = 1553516241 +SHA256 (intel-opencl-clang-v7.0.1_GH0.tar.gz) = 407800aceebebef8deaa1428d4b730a0f74329e0336a96fa1f1dd30a34b952e2 +SIZE (intel-opencl-clang-v7.0.1_GH0.tar.gz) = 49606 +SHA256 (3e753ba0cb0f.patch) = 805fbf620916e5efbfbd6c5160392ca88d43e2270e6d70539c767a6f9f6baacd +SIZE (3e753ba0cb0f.patch) = 1211 +SHA256 (b28f74f9789f.patch) = 4a0ecba33d3b92ffa72a157330ab71aa20b93a6dede4336a03b09ae141e14057 +SIZE (b28f74f9789f.patch) = 1336 diff --git a/devel/opencl-clang/distinfo.llvm80 b/devel/opencl-clang/distinfo.llvm80 new file mode 100644 index 000000000000..db95983fb646 --- /dev/null +++ b/devel/opencl-clang/distinfo.llvm80 @@ -0,0 +1,7 @@ +TIMESTAMP = 1582898359 +SHA256 (intel-opencl-clang-v8.0.1-1_GH0.tar.gz) = 00dd5d9606f916a935005ae1e13dd4f25a57ce89571b70a7ace7d3ec0fbaf550 +SIZE (intel-opencl-clang-v8.0.1-1_GH0.tar.gz) = 42534 +SHA256 (3e753ba0cb0f.patch) = 805fbf620916e5efbfbd6c5160392ca88d43e2270e6d70539c767a6f9f6baacd +SIZE (3e753ba0cb0f.patch) = 1211 +SHA256 (b28f74f9789f.patch) = 4a0ecba33d3b92ffa72a157330ab71aa20b93a6dede4336a03b09ae141e14057 +SIZE (b28f74f9789f.patch) = 1336 diff --git a/devel/opencl-clang/distinfo.llvm90 b/devel/opencl-clang/distinfo.llvm90 new file mode 100644 index 000000000000..db233c1e6ccb --- /dev/null +++ b/devel/opencl-clang/distinfo.llvm90 @@ -0,0 +1,7 @@ +TIMESTAMP = 1583140288 +SHA256 (intel-opencl-clang-v9.0.1_GH0.tar.gz) = 058d51e88cdb018fd3016d1ee2042018bd1c3d131037d4ff2cb3f08d79a8fe6d +SIZE (intel-opencl-clang-v9.0.1_GH0.tar.gz) = 24574 +SHA256 (3e753ba0cb0f.patch) = 805fbf620916e5efbfbd6c5160392ca88d43e2270e6d70539c767a6f9f6baacd +SIZE (3e753ba0cb0f.patch) = 1211 +SHA256 (b28f74f9789f.patch) = 4a0ecba33d3b92ffa72a157330ab71aa20b93a6dede4336a03b09ae141e14057 +SIZE (b28f74f9789f.patch) = 1336
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108091948.179JmioJ062374>