%global commit 7cdbf1ed4b94259a3aad2a7575e928fa61b0e57e %global shortcommit %(c=%{commit}; echo ${c:0:9}) %global shortname clc # this stop us generating an empty debuginfo %global debug_package %{nil} Name: libclc Version: 0.2.0 Release: 100.25.git%{shortcommit}%{?dist} Summary: An open source implementation of the OpenCL 1.1 library requirements License: BSD URL: https://libclc.llvm.org Source0: %{name}-%{shortcommit}.tar.xz ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 %{power64} s390x BuildRequires: clang-devel BuildRequires: libedit-devel BuildRequires: llvm-devel >= 3.9 BuildRequires: python BuildRequires: zlib-devel BuildRequires: cmake %description libclc is an open source, BSD licensed implementation of the library requirements of the OpenCL C programming language, as specified by the OpenCL 1.1 Specification. The following sections of the specification impose library requirements: * 6.1: Supported Data Types * 6.2.3: Explicit Conversions * 6.2.4.2: Reinterpreting Types Using as_type() and as_typen() * 6.9: Preprocessor Directives and Macros * 6.11: Built-in Functions * 9.3: Double Precision Floating-Point * 9.4: 64-bit Atomics * 9.5: Writing to 3D image memory objects * 9.6: Half Precision Floating-Point libclc is intended to be used with the Clang compiler's OpenCL frontend. libclc is designed to be portable and extensible. To this end, it provides generic implementations of most library requirements, allowing the target to override the generic implementation at the granularity of individual functions. libclc currently only supports the PTX target, but support for more targets is welcome. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %setup -q -n %{name}-%{shortcommit} %build export CFLAGS="%{build_cflags} -D__extern_always_inline=inline" %set_build_flags #./configure.py --prefix=%{_prefix} --libexecdir=%{_libdir}/%{shortname}/ --pkgconfigdir=%{_libdir}/pkgconfig/ %{__cmake} . -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_includedir} -DCMAKE_INSTALL_DATADIR:PATH=%{_libdir} %make_build %install %make_install %files %license LICENSE.TXT %doc README.TXT CREDITS.TXT %dir %{_libdir}/%{shortname} %{_libdir}/%{shortname}/*.bc %{_includedir}/%{shortname} %files devel %{_libdir}/pkgconfig/%{name}.pc %changelog