From 84b88877da0b5bbc68649f430b6d5a421a3861c23a6f3af7205e8bbd5c49b42d Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Fri, 30 Oct 2020 17:44:31 +0000 Subject: [PATCH] Accepting request 845078 from home:aaronpuchert:llvm-next - Update to version 0.2.0+llvm11.0.0. The repository that we extracted the tarball from isn't updated any longer. So we take the tarballs from LLVM releases instead. - The build now uses CMake instead of a custom Python script. - Remove dependencies on gcc, libstdc++-devel, ncurses and zlib. - The provided package consists of LLVM bitcode files, which are not necessarily backwards-compatible across major versions. (https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility) So we let the package provide a symbol libclc(llvmXX). - The library files have moved from %{_libdir} to %{_datadir}. - Make noarch: the bitcode files don't depend on the host CPU. OBS-URL: https://build.opensuse.org/request/show/845078 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libclc?expand=0&rev=32 --- _service | 14 --------- _servicedata | 6 ---- libclc-0.2.0+git.20190805.tar.xz | 3 -- libclc-11.0.0.src.tar.xz | 3 ++ libclc.changes | 15 ++++++++++ libclc.spec | 49 ++++++++++++++------------------ 6 files changed, 40 insertions(+), 50 deletions(-) delete mode 100644 _service delete mode 100644 _servicedata delete mode 100644 libclc-0.2.0+git.20190805.tar.xz create mode 100644 libclc-11.0.0.src.tar.xz diff --git a/_service b/_service deleted file mode 100644 index 0877e94..0000000 --- a/_service +++ /dev/null @@ -1,14 +0,0 @@ - - - git - https://github.com/llvm-mirror/libclc.git - enable - enable - 0.2.0+git.%cd - - - xz - *.tar - - - diff --git a/_servicedata b/_servicedata deleted file mode 100644 index c0e5942..0000000 --- a/_servicedata +++ /dev/null @@ -1,6 +0,0 @@ - - - https://github.com/llvm-mirror/libclc.git - 0db3817c4e48f2fd56dc926e7c21cfc6a8ecff8f - - \ No newline at end of file diff --git a/libclc-0.2.0+git.20190805.tar.xz b/libclc-0.2.0+git.20190805.tar.xz deleted file mode 100644 index c83e909..0000000 --- a/libclc-0.2.0+git.20190805.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70c0f05bc613a21613342cb07be414696aa797a976dabb434f5a248b568edbc4 -size 128480 diff --git a/libclc-11.0.0.src.tar.xz b/libclc-11.0.0.src.tar.xz new file mode 100644 index 0000000..cd4dd6d --- /dev/null +++ b/libclc-11.0.0.src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a0a2f67b85ede09b2f08c071c5b0b6b5ad56bfb00b39a22c369afcc613c42ee +size 124148 diff --git a/libclc.changes b/libclc.changes index f6415b4..173300a 100644 --- a/libclc.changes +++ b/libclc.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Fri Oct 30 15:33:35 UTC 2020 - Aaron Puchert + +- Update to version 0.2.0+llvm11.0.0. + The repository that we extracted the tarball from isn't updated + any longer. So we take the tarballs from LLVM releases instead. +- The build now uses CMake instead of a custom Python script. +- Remove dependencies on gcc, libstdc++-devel, ncurses and zlib. +- The provided package consists of LLVM bitcode files, which are + not necessarily backwards-compatible across major versions. + (https://llvm.org/docs/DeveloperPolicy.html#ir-backwards-compatibility) + So we let the package provide a symbol libclc(llvmXX). +- The library files have moved from %{_libdir} to %{_datadir}. +- Make noarch: the bitcode files don't depend on the host CPU. + ------------------------------------------------------------------- Thu Sep 26 13:20:28 UTC 2019 - Martin Pluskal diff --git a/libclc.spec b/libclc.spec index fd73b5c..f989339 100644 --- a/libclc.spec +++ b/libclc.spec @@ -1,7 +1,7 @@ # # spec file for package libclc # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,53 +16,48 @@ # +%define _libclc_llvm_ver 11.0.0 + Name: libclc -Version: 0.2.0+git.20190805 +Version: 0.2.0+llvm%{_libclc_llvm_ver} Release: 0 Summary: OpenCL C programming language library License: (BSD-3-Clause OR MIT) AND Apache-2.0 WITH LLVM-exception Group: Development/Libraries/C and C++ URL: https://libclc.llvm.org/ -Source0: %{name}-%{version}.tar.xz +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_libclc_llvm_ver}/%{name}-%{_libclc_llvm_ver}.src.tar.xz Source1: %{name}-rpmlintrc -BuildRequires: gcc -BuildRequires: libstdc++-devel >= 3.9 +BuildRequires: clang-devel >= 4.0 +BuildRequires: cmake BuildRequires: llvm >= 4.0 -BuildRequires: llvm-clang-devel >= 4.0 -BuildRequires: pkgconfig BuildRequires: python3-base -BuildRequires: pkgconfig(ncurses) -BuildRequires: pkgconfig(zlib) +Provides: libclc(llvm%{_llvm_sonum}) +BuildArch: noarch %description Library requirements of the OpenCL C programming language. %prep -%autosetup +%setup -q -n libclc-%{_libclc_llvm_ver}.src %build -sed -i "s|python|python3|g" configure.py -export \ - CFLAGS="%{optflags}" \ - CXXFLAGS="%{optflags}" \ - CC=clang \ - CXX=clang++ -python3 ./configure.py \ - --prefix=%{_prefix} \ - --with-llvm-config=%{_bindir}/llvm-config \ - --with-cxx-compiler=${CXX} \ - --enable-runtime-subnormal \ - --pkgconfigdir=%{_libdir}/pkgconfig/ \ - --libexecdir=%{_libdir}/clc/ -%make_build +# The libraries are bitcode files, so LTO is neither supported nor does it help. +%define _lto_cflags %{nil} + +sed -i "s|python|python3|g" CMakeLists.txt +%cmake \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DENABLE_RUNTIME_SUBNORMAL:BOOL=ON +%cmake_build %install -%make_install +%cmake_install %files %license LICENSE.TXT %{_includedir}/clc -%{_libdir}/clc -%{_libdir}/pkgconfig/libclc.pc +%{_datadir}/clc +%{_datadir}/pkgconfig/libclc.pc %changelog