2015-12-02 16:15:58 +01:00
|
|
|
#
|
|
|
|
# spec file for package libclc
|
|
|
|
#
|
2021-01-09 19:10:51 +01:00
|
|
|
# Copyright (c) 2021 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
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-10-04 11:03:57 +02:00
|
|
|
%define _libclc_llvm_ver 13.0.0
|
|
|
|
%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
|
2015-12-09 18:54:21 +01:00
|
|
|
Source1: %{name}-rpmlintrc
|
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
|
|
|
|
%else
|
|
|
|
%if 0%{?sle_version} >= 150300
|
|
|
|
BuildRequires: clang11-devel
|
|
|
|
BuildRequires: llvm11-devel
|
|
|
|
%else
|
|
|
|
BuildRequires: clang9-devel
|
|
|
|
BuildRequires: llvm9-devel
|
|
|
|
%endif
|
|
|
|
%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}
|
|
|
|
|
2021-04-17 20:06:30 +02:00
|
|
|
# TODO: For building all targets, we need llvm-spirv.
|
2020-10-30 18:44:31 +01:00
|
|
|
%cmake \
|
|
|
|
-DCMAKE_C_COMPILER=clang \
|
|
|
|
-DCMAKE_CXX_COMPILER=clang++ \
|
2021-04-17 20:06:30 +02:00
|
|
|
-DENABLE_RUNTIME_SUBNORMAL:BOOL=ON \
|
|
|
|
-DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;amdgcn-mesa-mesa3d;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"
|
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
|