pkgsrc-Changes archive

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

CVS commit: pkgsrc/parallel/opencl-clang



Module Name:    pkgsrc
Committed By:   adam
Date:           Thu Dec 14 13:16:06 UTC 2023

Modified Files:
        pkgsrc/parallel/opencl-clang: Makefile PLIST distinfo
Added Files:
        pkgsrc/parallel/opencl-clang/patches: patch-CMakeLists.txt
            patch-cl__headers_CMakeLists.txt

Log Message:
opencl-clang: updated to 16.0.0

v16.0.0
opencl-clang linked against LLVM 16 libraries


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/parallel/opencl-clang/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/parallel/opencl-clang/PLIST
cvs rdiff -u -r1.8 -r1.9 pkgsrc/parallel/opencl-clang/distinfo
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/parallel/opencl-clang/patches/patch-CMakeLists.txt
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/parallel/opencl-clang/patches/patch-cl__headers_CMakeLists.txt

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

Modified files:

Index: pkgsrc/parallel/opencl-clang/Makefile
diff -u pkgsrc/parallel/opencl-clang/Makefile:1.13 pkgsrc/parallel/opencl-clang/Makefile:1.14
--- pkgsrc/parallel/opencl-clang/Makefile:1.13  Wed Nov  8 13:20:39 2023
+++ pkgsrc/parallel/opencl-clang/Makefile       Thu Dec 14 13:16:05 2023
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.13 2023/11/08 13:20:39 wiz Exp $
+# $NetBSD: Makefile,v 1.14 2023/12/14 13:16:05 adam Exp $
 
-DISTNAME=      opencl-clang-15.0.0
-PKGREVISION=   3
+DISTNAME=      opencl-clang-16.0.0
 CATEGORIES=    parallel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=intel/}
 GITHUB_PROJECT=        opencl-clang    # do not remove this, it breaks cwrappers
@@ -12,15 +11,16 @@ HOMEPAGE=   https://github.com/intel/openc
 COMMENT=       OpenCL-oriented wrapper library around clang
 LICENSE=       modified-bsd
 
-USE_CMAKE=     yes
-USE_LANGUAGES= c c++
-
-# C++14
-GCC_REQD+=     7 # sync with llvm/clang
-
-BUILDLINK_TRANSFORM.Darwin+=   rm:-Wl,--version-script=${WRKSRC}/common_clang.map
-BUILDLINK_TRANSFORM.SunOS+=    rm:-Wl,--version-script=${WRKSRC}/common_clang.map
+USE_CXX_FEATURES=      c++17
+FORCE_CXX_STD=         c++17
+USE_LANGUAGES=         c c++
+
+BUILDLINK_TRANSFORM.Darwin+=   rm:-Wl,--no-undefined
+BUILDLINK_TRANSFORM.Darwin+=   rm:-Wl,-Bsymbolic
+BUILDLINK_TRANSFORM.Darwin+=   rm:-Wl,--version-script=${WRKSRC}/opencl_clang.map
+BUILDLINK_TRANSFORM.SunOS+=    rm:-Wl,--version-script=${WRKSRC}/opencl_clang.map
 
+.include "../../devel/cmake/build.mk"
 .include "../../parallel/spirv-llvm-translator/buildlink3.mk"
 .include "../../lang/clang/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/parallel/opencl-clang/PLIST
diff -u pkgsrc/parallel/opencl-clang/PLIST:1.5 pkgsrc/parallel/opencl-clang/PLIST:1.6
--- pkgsrc/parallel/opencl-clang/PLIST:1.5      Sat Nov 19 12:35:57 2022
+++ pkgsrc/parallel/opencl-clang/PLIST  Thu Dec 14 13:16:05 2023
@@ -1,4 +1,7 @@
-@comment $NetBSD: PLIST,v 1.5 2022/11/19 12:35:57 adam Exp $
-include/cclang/common_clang.h
+@comment $NetBSD: PLIST,v 1.6 2023/12/14 13:16:05 adam Exp $
+include/cclang/module.modulemap
+include/cclang/opencl-c-base.h
+include/cclang/opencl-c.h
+include/cclang/opencl_clang.h
 lib/libopencl-clang.so
-lib/libopencl-clang.so.15
+lib/libopencl-clang.so.16

Index: pkgsrc/parallel/opencl-clang/distinfo
diff -u pkgsrc/parallel/opencl-clang/distinfo:1.8 pkgsrc/parallel/opencl-clang/distinfo:1.9
--- pkgsrc/parallel/opencl-clang/distinfo:1.8   Mon Nov 14 19:02:04 2022
+++ pkgsrc/parallel/opencl-clang/distinfo       Thu Dec 14 13:16:05 2023
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.8 2022/11/14 19:02:04 adam Exp $
+$NetBSD: distinfo,v 1.9 2023/12/14 13:16:05 adam Exp $
 
-BLAKE2s (opencl-clang-15.0.0.tar.gz) = 24dd74013a9a4f889626d002582cc87dd00bfb0015b6d6c35f252f6358789321
-SHA512 (opencl-clang-15.0.0.tar.gz) = a2ffce43493793524e9512be2e7bd46c0183b86b35a6f79018d355d07a83303a944e6dacebfb768e88ce75a7020a44939be872a2d4e754544198a9829f4febd4
-Size (opencl-clang-15.0.0.tar.gz) = 26212 bytes
+BLAKE2s (opencl-clang-16.0.0.tar.gz) = cd3f135e8cb3f788680e30704d5880732da241ae6652f48670d38cff585e1c8e
+SHA512 (opencl-clang-16.0.0.tar.gz) = bf723edab7dc7a028eb79d01fd2306690a2169472760bf2783d593ffec4eb788f28f184c66b204cc074cb95a4149fcc63a1dcbee5563c620a9dc2c76bb5a2d5a
+Size (opencl-clang-16.0.0.tar.gz) = 28413 bytes
+SHA1 (patch-CMakeLists.txt) = 844cac5dedb87b2de098955cebae1bf83341d9e5
+SHA1 (patch-cl__headers_CMakeLists.txt) = fc3d935aff7314d1a194b5802c63cdb125f8ec34

Added files:

Index: pkgsrc/parallel/opencl-clang/patches/patch-CMakeLists.txt
diff -u /dev/null pkgsrc/parallel/opencl-clang/patches/patch-CMakeLists.txt:1.3
--- /dev/null   Thu Dec 14 13:16:06 2023
+++ pkgsrc/parallel/opencl-clang/patches/patch-CMakeLists.txt   Thu Dec 14 13:16:06 2023
@@ -0,0 +1,96 @@
+$NetBSD: patch-CMakeLists.txt,v 1.3 2023/12/14 13:16:06 adam Exp $
+
+Revert to use add_llvm_library and revert linking LLVM libraries
+https://github.com/intel/opencl-clang/pull/438
+
+--- CMakeLists.txt.orig        2023-04-13 01:08:59.000000000 +0000
++++ CMakeLists.txt
+@@ -292,21 +292,23 @@ else()
+   )
+ endif()
+ 
+-add_library(${TARGET_NAME} SHARED
+-    ${TARGET_INCLUDE_FILES}
+-    ${TARGET_SOURCE_FILES}
+-    $<TARGET_OBJECTS:cl_headers>
+-)
+-
+-# Same CRT compile option are reqiured to avoid link errors on Windows.
+-# MD and MDd are choosed by default for release and debug build in LLVM.
+-# If users set MT or MTd flags, they also need to add the flags for
+-# opencl-clang sources using a custom macro set_msvc_crt_flags.
+-if(COMMAND set_msvc_crt_flags)
+-    set_msvc_crt_flags(${TARGET_NAME})
++set(EXCLUDE_LIBS_FROM_ALL "" CACHE STRING "Space-separated list of LLVM libraries to exclude from all")
++llvm_map_components_to_libnames(ALL_LLVM_LIBS all)
++if (NOT "${EXCLUDE_LIBS_FROM_ALL}" STREQUAL "")
++  list(REMOVE_ITEM ALL_LLVM_LIBS ${EXCLUDE_LIBS_FROM_ALL})
+ endif()
++list(APPEND OPENCL_CLANG_LINK_LIBS ${ALL_LLVM_LIBS})
+ 
+-add_dependencies(${TARGET_NAME} CClangCompileOptions)
++add_llvm_library(${TARGET_NAME} SHARED
++  ${TARGET_INCLUDE_FILES}
++  ${TARGET_SOURCE_FILES}
++  $<TARGET_OBJECTS:cl_headers>
++
++  DEPENDS CClangCompileOptions
++
++  LINK_LIBS
++    ${OPENCL_CLANG_LINK_LIBS}
++  )
+ 
+ if (WIN32)
+     # Enable compiler generation of Control Flow Guard security checks.
+@@ -322,51 +324,6 @@ elseif(UNIX)
+         LINK_FLAGS " -Wl,--no-undefined")
+ endif(WIN32)
+ 
+-# Enable new IN_LIST operator.
+-cmake_policy(SET CMP0057 NEW)
+-set(OTHER_LIBRARIES)
+-if ("NVPTX" IN_LIST LLVM_TARGETS_TO_BUILD)
+-    list(APPEND OTHER_LIBRARIES LLVMNVPTXCodeGen LLVMNVPTXDesc LLVMNVPTXInfo)
+-endif()
+-if ("AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)
+-    list(APPEND OTHER_LIBRARIES LLVMAMDGPUCodeGen LLVMAMDGPUAsmParser LLVMAMDGPUDesc LLVMAMDGPUInfo)
+-endif()
+-
+-target_link_libraries( ${TARGET_NAME}
+-                       LINK_PRIVATE
+-                       ${OPENCL_CLANG_LINK_LIBS}
+-                       LLVMX86CodeGen
+-                       LLVMX86AsmParser
+-                       LLVMX86Desc
+-                       LLVMX86Info
+-                       LLVMX86Disassembler
+-                       LLVMAnalysis
+-                       LLVMCodeGen
+-                       LLVMCore
+-                       LLVMipo
+-                       LLVMInstCombine
+-                       LLVMInstrumentation
+-                       LLVMMC
+-                       LLVMMCParser
+-                       LLVMObjCARCOpts
+-                       LLVMOption
+-                       LLVMScalarOpts
+-                       LLVMSupport
+-                       LLVMTransformUtils
+-                       LLVMVectorize
+-                       LLVMAsmPrinter
+-                       LLVMSelectionDAG
+-                       LLVMMCDisassembler
+-                       LLVMProfileData
+-                       LLVMObject
+-                       LLVMBitWriter
+-                       LLVMIRReader
+-                       LLVMAsmParser
+-                       LLVMTarget
+-                       LLVMBitReader
+-                       ${OTHER_LIBRARIES}
+-                      )
+-
+ install(FILES opencl_clang.h
+         DESTINATION include/cclang
+         COMPONENT ${TARGET_NAME})

Index: pkgsrc/parallel/opencl-clang/patches/patch-cl__headers_CMakeLists.txt
diff -u /dev/null pkgsrc/parallel/opencl-clang/patches/patch-cl__headers_CMakeLists.txt:1.1
--- /dev/null   Thu Dec 14 13:16:06 2023
+++ pkgsrc/parallel/opencl-clang/patches/patch-cl__headers_CMakeLists.txt       Thu Dec 14 13:16:06 2023
@@ -0,0 +1,27 @@
+$NetBSD: patch-cl__headers_CMakeLists.txt,v 1.1 2023/12/14 13:16:06 adam Exp $
+
+Fix standalone build
+https://github.com/intel/opencl-clang/pull/485
+
+--- cl_headers/CMakeLists.txt.orig     2023-04-13 01:08:59.000000000 +0000
++++ cl_headers/CMakeLists.txt
+@@ -1,5 +1,9 @@
+ set(CL_HEADERS_LIB cl_headers)
+-set(CLANG_COMMAND $<TARGET_FILE:clang> )
++if(USE_PREBUILT_LLVM)
++  find_program(CLANG_COMMAND clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
++else()
++  set(CLANG_COMMAND $<TARGET_FILE:clang> )
++endif()
+ if(LLVM_USE_HOST_TOOLS AND NOT OPENCL_CLANG_BUILD_EXTERNAL)
+   build_native_tool(clang CLANG_COMMAND)
+ endif()
+@@ -16,7 +20,7 @@ endfunction(copy_file)
+ 
+ if(USE_PREBUILT_LLVM)
+     set(OPENCL_HEADERS_DIR
+-      "${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}/include/")
++      "${LLVM_LIBRARY_DIRS}/clang/${LLVM_VERSION_MAJOR}/include/")
+ else(USE_PREBUILT_LLVM)
+     set(OPENCL_HEADERS_DIR "${CLANG_SOURCE_DIR}/lib/Headers")
+ endif(USE_PREBUILT_LLVM)



Home | Main Index | Thread Index | Old Index