2015-12-02 16:15:58 +01:00
|
|
|
#
|
|
|
|
# spec file for package libclc
|
|
|
|
#
|
2024-03-18 02:54:00 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2015-12-02 16:15:58 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-01-06 04:28:51 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-12-02 16:15:58 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2024-03-18 02:54:00 +01:00
|
|
|
%define _libclc_llvm_ver 18.1.0
|
2021-10-04 11:03:57 +02:00
|
|
|
%define _version %_libclc_llvm_ver%{?_rc:rc%_rc}
|
|
|
|
%define _tagver %_libclc_llvm_ver%{?_rc:-rc%_rc}
|
2020-10-30 18:44:31 +01:00
|
|
|
|
2015-12-02 16:15:58 +01:00
|
|
|
Name: libclc
|
2021-10-04 11:03:57 +02:00
|
|
|
Version: 0.2.0+llvm%{_libclc_llvm_ver}%{?_rc:~rc%_rc}
|
2015-12-02 16:15:58 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: OpenCL C programming language library
|
2021-04-17 20:06:30 +02:00
|
|
|
License: Apache-2.0 WITH LLVM-exception AND (BSD-3-Clause OR MIT)
|
2015-12-02 16:15:58 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
2019-09-26 15:51:59 +02:00
|
|
|
URL: https://libclc.llvm.org/
|
2021-10-04 11:03:57 +02:00
|
|
|
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/%{name}-%{_version}.src.tar.xz
|
2023-03-23 13:24:22 +01:00
|
|
|
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{_tagver}/%{name}-%{_version}.src.tar.xz.sig
|
|
|
|
Source100: %{name}-rpmlintrc
|
|
|
|
Source101: https://releases.llvm.org/release-keys.asc#/%{name}.keyring
|
2020-10-30 18:44:31 +01:00
|
|
|
BuildRequires: cmake
|
2021-09-29 14:58:22 +02:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
BuildRequires: clang-devel
|
|
|
|
BuildRequires: llvm-devel
|
2023-01-28 20:16:05 +01:00
|
|
|
BuildRequires: pkgconfig(LLVMSPIRVLib)
|
2021-09-29 14:58:22 +02:00
|
|
|
%else
|
2023-11-20 13:58:15 +01:00
|
|
|
%if 0%{?sle_version} >= 150600
|
|
|
|
BuildRequires: clang17-devel
|
|
|
|
BuildRequires: llvm17-devel
|
|
|
|
%else
|
|
|
|
%if 0%{?sle_version} >= 150500
|
2022-11-05 12:06:40 +01:00
|
|
|
BuildRequires: clang15-devel
|
|
|
|
BuildRequires: llvm15-devel
|
2022-08-25 15:34:03 +02:00
|
|
|
%endif
|
|
|
|
%endif
|
2021-09-29 14:58:22 +02:00
|
|
|
%endif
|
2019-09-26 15:51:59 +02:00
|
|
|
BuildRequires: python3-base
|
2020-10-30 18:44:31 +01:00
|
|
|
Provides: libclc(llvm%{_llvm_sonum})
|
2021-11-15 10:31:05 +01:00
|
|
|
BuildArch: noarch
|
2015-12-02 16:15:58 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Library requirements of the OpenCL C programming language.
|
|
|
|
|
|
|
|
%prep
|
2021-10-04 11:03:57 +02:00
|
|
|
%setup -q -n libclc-%{_version}.src
|
2015-12-02 16:15:58 +01:00
|
|
|
|
|
|
|
%build
|
2020-10-30 18:44:31 +01:00
|
|
|
# The libraries are bitcode files, so LTO is neither supported nor does it help.
|
|
|
|
%define _lto_cflags %{nil}
|
|
|
|
|
|
|
|
%cmake \
|
|
|
|
-DCMAKE_C_COMPILER=clang \
|
|
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
2023-01-28 20:16:05 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
|
|
|
-DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;amdgcn-mesa-mesa3d;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl" \
|
|
|
|
%endif
|
|
|
|
-DENABLE_RUNTIME_SUBNORMAL:BOOL=ON
|
2020-10-30 18:44:31 +01:00
|
|
|
%cmake_build
|
2015-12-02 16:15:58 +01:00
|
|
|
|
|
|
|
%install
|
2020-10-30 18:44:31 +01:00
|
|
|
%cmake_install
|
2015-12-02 16:15:58 +01:00
|
|
|
|
|
|
|
%files
|
2019-09-26 15:51:59 +02:00
|
|
|
%license LICENSE.TXT
|
2015-12-02 16:15:58 +01:00
|
|
|
%{_includedir}/clc
|
2020-10-30 18:44:31 +01:00
|
|
|
%{_datadir}/clc
|
|
|
|
%{_datadir}/pkgconfig/libclc.pc
|
2015-12-02 16:15:58 +01:00
|
|
|
|
|
|
|
%changelog
|