From 460711e5f7f8b4d141710b3603d984185bfa124b4921cdc1536500c208ac73f9 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Wed, 5 Oct 2022 08:01:34 +0000 Subject: [PATCH] Accepting request 1008002 from home:aaronpuchert:llvm-next - Update to version 0.2.0+llvm15.0.0. - Compile without opaque pointers for now because Mesa doesn't support them yet. - Add cmake-flags-concat.patch to ensure proper concatenation of build flags: CMAKE__FLAGS is a string and not a list. OBS-URL: https://build.opensuse.org/request/show/1008002 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libclc?expand=0&rev=50 --- cmake-flags-concat.patch | 15 +++++++++++++++ libclc-14.0.0.src.tar.xz | 3 --- libclc-15.0.0.src.tar.xz | 3 +++ libclc.changes | 11 ++++++++++- libclc.spec | 8 +++++++- 5 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 cmake-flags-concat.patch delete mode 100644 libclc-14.0.0.src.tar.xz create mode 100644 libclc-15.0.0.src.tar.xz diff --git a/cmake-flags-concat.patch b/cmake-flags-concat.patch new file mode 100644 index 0000000..cbf735e --- /dev/null +++ b/cmake-flags-concat.patch @@ -0,0 +1,15 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9773b2c..e1879a9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,8 +136,8 @@ set( LLVM_VERSION_DEFINE "-DHAVE_LLVM=0x${LLVM_MAJOR}0${LLVM_MINOR}" ) + + # LLVM 13 enables standard includes by default + if( ${LLVM_VERSION} VERSION_GREATER "12.99.99" ) +- set( CMAKE_LLAsm_FLAGS ${CMAKE_LLAsm_FLAGS} -cl-no-stdinc ) +- set( CMAKE_CLC_FLAGS ${CMAKE_CLC_FLAGS} -cl-no-stdinc ) ++ set( CMAKE_LLAsm_FLAGS "${CMAKE_LLAsm_FLAGS} -cl-no-stdinc" ) ++ set( CMAKE_CLC_FLAGS "${CMAKE_CLC_FLAGS} -cl-no-stdinc" ) + endif() + + enable_language( CLC LLAsm ) diff --git a/libclc-14.0.0.src.tar.xz b/libclc-14.0.0.src.tar.xz deleted file mode 100644 index 933dacd..0000000 --- a/libclc-14.0.0.src.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39fe8fbc112d335b483023c7e9dec2eac7e0be7062c5b088774de935d7c7cdb8 -size 130444 diff --git a/libclc-15.0.0.src.tar.xz b/libclc-15.0.0.src.tar.xz new file mode 100644 index 0000000..a563a71 --- /dev/null +++ b/libclc-15.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:77034efe5f5daddc8a8ce7607b8e74e10a9ab9c9929caea62e29b81bbdad2f15 +size 125712 diff --git a/libclc.changes b/libclc.changes index eac800e..69fecce 100644 --- a/libclc.changes +++ b/libclc.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Sep 29 21:33:37 UTC 2022 - Aaron Puchert + +- Update to version 0.2.0+llvm15.0.0. +- Compile without opaque pointers for now because Mesa doesn't + support them yet. +- Add cmake-flags-concat.patch to ensure proper concatenation of + build flags: CMAKE__FLAGS is a string and not a list. + ------------------------------------------------------------------- Thu Aug 25 13:33:10 UTC 2022 - Stefan Dirsch @@ -6,7 +15,7 @@ Thu Aug 25 13:33:10 UTC 2022 - Stefan Dirsch ------------------------------------------------------------------- Fri Apr 1 21:44:03 UTC 2022 - Aaron Puchert -- Update to version 0.2.0+14.0.0. +- Update to version 0.2.0+llvm14.0.0. ------------------------------------------------------------------- Mon Nov 15 09:30:31 UTC 2021 - Stefan Dirsch diff --git a/libclc.spec b/libclc.spec index 41c1c6c..3bece5b 100644 --- a/libclc.spec +++ b/libclc.spec @@ -16,7 +16,7 @@ # -%define _libclc_llvm_ver 14.0.0 +%define _libclc_llvm_ver 15.0.0 %define _version %_libclc_llvm_ver%{?_rc:rc%_rc} %define _tagver %_libclc_llvm_ver%{?_rc:-rc%_rc} @@ -29,6 +29,8 @@ Group: Development/Libraries/C and C++ URL: https://libclc.llvm.org/ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/%{name}-%{_version}.src.tar.xz Source1: %{name}-rpmlintrc +# PATCH-FIX-UPSTREAM: CMAKE__FLAGS is a string and not a list. +Patch0: cmake-flags-concat.patch BuildRequires: cmake %if 0%{?suse_version} >= 1550 BuildRequires: clang-devel @@ -56,15 +58,19 @@ Library requirements of the OpenCL C programming language. %prep %setup -q -n libclc-%{_version}.src +%patch0 -p1 %build # The libraries are bitcode files, so LTO is neither supported nor does it help. %define _lto_cflags %{nil} +# For now we turn off opaque pointers - Clang uses them by default, but Mesa doesn't support them yet. # TODO: For building all targets, we need llvm-spirv. %cmake \ -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_CLC_FLAGS="-Xclang -no-opaque-pointers" \ + -DCMAKE_LLAsm_FLAGS="-Xclang -no-opaque-pointers" \ -DENABLE_RUNTIME_SUBNORMAL:BOOL=ON \ -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;amdgcn-mesa-mesa3d;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl" %cmake_build