parent
c746f79538
commit
6566acdcd9
126
libomp.spec
126
libomp.spec
|
@ -1,10 +1,30 @@
|
|||
%bcond_with snapshot_build
|
||||
|
||||
%if %{with snapshot_build}
|
||||
# Unlock LLVM Snapshot LUA functions
|
||||
%{llvm_sb}
|
||||
%endif
|
||||
|
||||
%global toolchain gcc
|
||||
|
||||
%global maj_ver 16
|
||||
%global libomp_version %{maj_ver}.0.6
|
||||
%global maj_ver 17
|
||||
%global libomp_version %{maj_ver}.0.1
|
||||
#global rc_ver 4
|
||||
%global libomp_srcdir openmp-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
%global cmake_srcdir cmake-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
%global so_suffix %{maj_ver}
|
||||
|
||||
%if %{with snapshot_build}
|
||||
%undefine rc_ver
|
||||
%global maj_ver %{llvm_snapshot_version_major}
|
||||
%global libomp_version %{llvm_snapshot_version}
|
||||
%global so_suffix %{maj_ver}%{llvm_snapshot_version_suffix}
|
||||
%endif
|
||||
|
||||
|
||||
# Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2158587
|
||||
%undefine _include_frame_pointers
|
||||
|
||||
%ifarch ppc64le
|
||||
%global libomp_arch ppc64
|
||||
|
@ -13,21 +33,24 @@
|
|||
%endif
|
||||
|
||||
Name: libomp
|
||||
Version: %{libomp_version}
|
||||
Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
||||
Release: 1%{?dist}
|
||||
Summary: OpenMP runtime for clang
|
||||
|
||||
License: NCSA
|
||||
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
||||
URL: http://openmp.llvm.org
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}/%{libomp_srcdir}.tar.xz
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}/%{libomp_srcdir}.tar.xz.sig
|
||||
%if %{with snapshot_build}
|
||||
Source0: %{llvm_snapshot_source_prefix}openmp-%{llvm_snapshot_yyyymmdd}.src.tar.xz
|
||||
%{llvm_snapshot_extra_source_tags}
|
||||
%else
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{libomp_srcdir}.tar.xz
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{libomp_srcdir}.tar.xz.sig
|
||||
Source2: release-keys.asc
|
||||
Source3: run-lit-tests
|
||||
Source4: lit.fedora.cfg.py
|
||||
%endif
|
||||
Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz
|
||||
Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig
|
||||
|
||||
BuildRequires: clang
|
||||
BuildRequires: clang >= %{maj_ver}
|
||||
# For clang-offload-packager
|
||||
BuildRequires: clang-tools-extra
|
||||
BuildRequires: cmake
|
||||
|
@ -43,6 +66,7 @@ BuildRequires: gnupg2
|
|||
|
||||
# libomptarget needs the llvm cmake files
|
||||
BuildRequires: llvm-devel
|
||||
BuildRequires: llvm-cmake-utils
|
||||
|
||||
Requires: elfutils-libelf%{?isa}
|
||||
|
||||
|
@ -60,19 +84,10 @@ Requires: clang-resource-filesystem%{?isa} = %{version}
|
|||
%description devel
|
||||
OpenMP header files.
|
||||
|
||||
%package test
|
||||
Summary: OpenMP regression tests
|
||||
Requires: %{name}%{?isa} = %{version}-%{release}
|
||||
Requires: %{name}-devel%{?isa} = %{version}-%{release}
|
||||
Requires: clang
|
||||
Requires: llvm
|
||||
Requires: python3-lit
|
||||
|
||||
%description test
|
||||
OpenMP regression tests
|
||||
|
||||
%prep
|
||||
%if %{without snapshot_build}
|
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||
%endif
|
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE6}' --data='%{SOURCE5}'
|
||||
%setup -T -q -b 5 -n %{cmake_srcdir}
|
||||
# TODO: It would be more elegant to set -DLLVM_COMMON_CMAKE_UTILS=%{_builddir}/%{cmake_srcdir},
|
||||
|
@ -87,18 +102,22 @@ mv %{cmake_srcdir} cmake
|
|||
# Building openmp with LTO fails with GCC but works with Clang
|
||||
%define _lto_cflags %{nil}
|
||||
%endif
|
||||
|
||||
# TODO: LIBOMP_HAVE_VERSION_SCRIPT_FLAG should be set automatically.
|
||||
%cmake -GNinja \
|
||||
-DLIBOMP_INSTALL_ALIASES=OFF \
|
||||
-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
|
||||
-DCMAKE_MODULE_PATH=%{_datadir}/llvm/cmake/Modules \
|
||||
-DLLVM_DIR=%{_libdir}/cmake/llvm \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=%{_libdir}/clang/%{maj_ver}/include \
|
||||
-DCMAKE_INSTALL_INCLUDEDIR=%{_prefix}/lib/clang/%{maj_ver}/include \
|
||||
%if 0%{?__isa_bits} == 64
|
||||
-DOPENMP_LIBDIR_SUFFIX=64 \
|
||||
%else
|
||||
-DOPENMP_LIBDIR_SUFFIX= \
|
||||
%endif
|
||||
-DCMAKE_SKIP_RPATH:BOOL=ON
|
||||
%if %{with snapshot_build}
|
||||
-DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \
|
||||
%endif
|
||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||
-DLIBOMP_HAVE_VERSION_SCRIPT_FLAG:BOOL=ON
|
||||
|
||||
%cmake_build
|
||||
|
||||
|
@ -106,30 +125,6 @@ mv %{cmake_srcdir} cmake
|
|||
%install
|
||||
%cmake_install
|
||||
|
||||
# Test package setup
|
||||
%global libomp_srcdir %{_datadir}/libomp/src/
|
||||
%global libomp_testdir %{libomp_srcdir}/runtime/test/
|
||||
%global lit_cfg %{libomp_testdir}/%{_arch}.site.cfg.py
|
||||
%global lit_fedora_cfg %{_datadir}/libomp/lit.fedora.cfg.py
|
||||
|
||||
install -d %{buildroot}%{libomp_srcdir}/runtime
|
||||
cp -R runtime/test %{buildroot}%{libomp_srcdir}/runtime
|
||||
cp -R runtime/src %{buildroot}%{libomp_srcdir}/runtime
|
||||
|
||||
# Generate lit config files. Strip off the last line that initiates the
|
||||
# test run, so we can customize the configuration.
|
||||
head -n -1 %{_vpath_builddir}/runtime/test/lit.site.cfg >> %{buildroot}%{lit_cfg}
|
||||
|
||||
# Install custom fedora config file
|
||||
cp %{SOURCE4} %{buildroot}%{lit_fedora_cfg}
|
||||
|
||||
# Patch lit config files to load custom fedora config
|
||||
echo "lit_config.load_config(config, '%{lit_fedora_cfg}')" >> %{buildroot}%{lit_cfg}
|
||||
|
||||
# Install test script
|
||||
install -d %{buildroot}%{_libexecdir}/tests/libomp
|
||||
install -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/tests/libomp
|
||||
|
||||
# Remove static libraries with equivalent shared libraries
|
||||
rm -rf %{buildroot}%{_libdir}/libarcher_static.a
|
||||
|
||||
|
@ -144,41 +139,38 @@ rm -rf %{buildroot}%{_libdir}/libarcher_static.a
|
|||
%{_libdir}/libarcher.so
|
||||
%endif
|
||||
%ifnarch %{ix86} %{arm}
|
||||
%{_libdir}/libomptarget.rtl.amdgpu.so.%{maj_ver}
|
||||
%{_libdir}/libomptarget.rtl.amdgpu.nextgen.so.%{maj_ver}
|
||||
%{_libdir}/libomptarget.rtl.cuda.so.%{maj_ver}
|
||||
%{_libdir}/libomptarget.rtl.cuda.nextgen.so.%{maj_ver}
|
||||
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{maj_ver}
|
||||
%{_libdir}/libomptarget.rtl.%{libomp_arch}.nextgen.so.%{maj_ver}
|
||||
%{_libdir}/libomptarget.so.%{maj_ver}
|
||||
# libomptarget is not supported on 32-bit systems.
|
||||
%{_libdir}/libomptarget.rtl.amdgpu.so.%{so_suffix}
|
||||
%{_libdir}/libomptarget.rtl.cuda.so.%{so_suffix}
|
||||
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{so_suffix}
|
||||
%{_libdir}/libomptarget.so.%{so_suffix}
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%{_libdir}/clang/%{maj_ver}/include/omp.h
|
||||
%{_libdir}/cmake/openmp/FindOpenMPTarget.cmake
|
||||
%{_prefix}/lib/clang/%{maj_ver}/include/omp.h
|
||||
%ifnarch %{arm}
|
||||
%{_libdir}/clang/%{maj_ver}/include/omp-tools.h
|
||||
%{_libdir}/clang/%{maj_ver}/include/ompt.h
|
||||
%{_libdir}/clang/%{maj_ver}/include/ompt-multiplex.h
|
||||
%{_prefix}/lib/clang/%{maj_ver}/include/omp-tools.h
|
||||
%{_prefix}/lib/clang/%{maj_ver}/include/ompt.h
|
||||
%{_prefix}/lib/clang/%{maj_ver}/include/ompt-multiplex.h
|
||||
%endif
|
||||
%{_libdir}/cmake/openmp/FindOpenMPTarget.cmake
|
||||
%ifnarch %{ix86} %{arm}
|
||||
# libomptarget is not supported on 32-bit systems.
|
||||
%{_libdir}/libomptarget.rtl.amdgpu.so
|
||||
%{_libdir}/libomptarget.rtl.amdgpu.nextgen.so
|
||||
%{_libdir}/libomptarget.rtl.cuda.so
|
||||
%{_libdir}/libomptarget.rtl.cuda.nextgen.so
|
||||
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so
|
||||
%{_libdir}/libomptarget.rtl.%{libomp_arch}.nextgen.so
|
||||
%{_libdir}/libomptarget.devicertl.a
|
||||
%{_libdir}/libomptarget-amdgpu-*.bc
|
||||
%{_libdir}/libomptarget-nvptx-*.bc
|
||||
%{_libdir}/libomptarget.so
|
||||
%endif
|
||||
|
||||
%files test
|
||||
%{_datadir}/libomp
|
||||
%{_libexecdir}/tests/libomp/
|
||||
|
||||
%changelog
|
||||
%{?llvm_snapshot_changelog_entry}
|
||||
|
||||
* Fri Sep 29 2023 Timm Bäder <tbaeder@redha4t.com> - 17.0.1-1
|
||||
- Update to 17.0.1
|
||||
|
||||
* Wed Jul 05 2023 Nikita Popov <npopov@redhat.com> - 16.0.6-1
|
||||
- Update to LLVM 16.0.6
|
||||
|
||||
|
|
8
sources
8
sources
|
@ -1,4 +1,4 @@
|
|||
SHA512 (openmp-16.0.6.src.tar.xz) = b68b60bd10ae6df3853513c163d6d6dc040cdcd4b48802002cd0da24d3c3bc88002e432012081beff15e887fb12b71ef0932f89f21229a80c61568c1643460fc
|
||||
SHA512 (openmp-16.0.6.src.tar.xz.sig) = e9e8e4c330d9ee246d0d83fb0d83805368e591d8e9e0ab1d27084655a6b2653e20f8ef5bfa59ae7e373a771df74114e5ee0a216e5f3a07e6b57769501b1900cf
|
||||
SHA512 (cmake-16.0.6.src.tar.xz) = 52ecd941d2d85a5b668caa5d0d40480cb6a97b3bf1174e634c2a93e9ef6d03670ca7e96abb0a60cb33ba537b93d5788754dab1f2f45c1f623f788162717d088b
|
||||
SHA512 (cmake-16.0.6.src.tar.xz.sig) = d20c5e51315aa476775e6ce886684b9f882ce283fc40aa6c1b8f03964c77a1e745e2e1fb00b3488dddfe1a04378e2bfd090350de28e58088525a5305ecb1bea6
|
||||
SHA512 (cmake-17.0.1.src.tar.xz.sig) = 3324dd7a76983d8fdf1d9201fb38cec643261556f461b706b9030ff64ba7d8819ecb4e2954e9a8c0b4181e0f2dadbcb3fb51181bc5885b87c11c9021addbdf71
|
||||
SHA512 (cmake-17.0.1.src.tar.xz) = fdfa055cb1d605669efc7b4d72be512bf8eacf681dc34f3c5fbf3fd0c99c8eec9dd5ab8904aac1b8e96fef54b936e0d7bbf0f1868c9baa0893fdd97dd39d92f1
|
||||
SHA512 (openmp-17.0.1.src.tar.xz) = cef4fb18158b7a995439190acb81dbd0e7a24d308255ba91bde39f9c4a9367329b2b2fd9b9eb0398a57f1c544062e7d4877d753101eeff76734a2c440116fa1f
|
||||
SHA512 (openmp-17.0.1.src.tar.xz.sig) = cff5cc886cb2ad85abf09021a44f7685aec2ffba0d461539b96de9891d01453d5f23e5ba36a96e529a71af03af1b7cd73260d99a095e5a4a128639a6b582a567
|
||||
|
|
Loading…
Reference in New Issue