|
|
|
@ -1,16 +1,32 @@
|
|
|
|
|
%bcond_with snapshot_build
|
|
|
|
|
|
|
|
|
|
%if %{with snapshot_build}
|
|
|
|
|
# Unlock LLVM Snapshot LUA functions
|
|
|
|
|
%{llvm_sb}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%global maj_ver 18
|
|
|
|
|
%global min_ver 1
|
|
|
|
|
%global libomp_version %{maj_ver}.%{min_ver}.1
|
|
|
|
|
#global rc_ver 4
|
|
|
|
|
%global libomp_srcdir openmp-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src
|
|
|
|
|
%global so_suffix %{maj_ver}.%{min_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}.%{min_ver}%{llvm_snapshot_version_suffix}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%global libomp_srcdir openmp-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src
|
|
|
|
|
|
|
|
|
|
%global toolchain clang
|
|
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
%global maj_ver 16
|
|
|
|
|
%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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ifarch ppc64le
|
|
|
|
|
%global libomp_arch ppc64
|
|
|
|
|
%else
|
|
|
|
@ -18,21 +34,22 @@
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: libomp
|
|
|
|
|
Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}}
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
|
|
|
|
Release: 1.0.riscv64%{?dist}
|
|
|
|
|
Summary: OpenMP runtime for clang
|
|
|
|
|
|
|
|
|
|
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
|
|
|
|
URL: http://openmp.llvm.org
|
|
|
|
|
%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
|
|
|
|
|
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
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
BuildRequires: clang
|
|
|
|
|
BuildRequires: clang >= %{maj_ver}
|
|
|
|
|
# For clang-offload-packager
|
|
|
|
|
BuildRequires: clang-tools-extra
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
@ -48,12 +65,10 @@ BuildRequires: gnupg2
|
|
|
|
|
|
|
|
|
|
# libomptarget needs the llvm cmake files
|
|
|
|
|
BuildRequires: llvm-devel
|
|
|
|
|
BuildRequires: llvm-cmake-utils
|
|
|
|
|
|
|
|
|
|
Requires: elfutils-libelf%{?isa}
|
|
|
|
|
|
|
|
|
|
# libomp does not support s390x.
|
|
|
|
|
ExcludeArch: s390x
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
OpenMP runtime for clang.
|
|
|
|
|
|
|
|
|
@ -65,41 +80,27 @@ 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}'
|
|
|
|
|
%{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},
|
|
|
|
|
# but this is not a CACHED variable, so we can't actually set it externally :(
|
|
|
|
|
cd ..
|
|
|
|
|
mv %{cmake_srcdir} cmake
|
|
|
|
|
%endif
|
|
|
|
|
%autosetup -n %{libomp_srcdir} -p2
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# 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 \
|
|
|
|
|
-DLIBOMP_HAVE_VERSION_SCRIPT_FLAG:BOOL=ON
|
|
|
|
|
%if %{with snapshot_build}
|
|
|
|
|
-DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \
|
|
|
|
|
%endif
|
|
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=ON
|
|
|
|
|
|
|
|
|
|
%cmake_build
|
|
|
|
|
|
|
|
|
@ -107,30 +108,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
|
|
|
|
|
|
|
|
|
@ -146,42 +123,110 @@ rm -rf %{buildroot}%{_libdir}/libarcher_static.a
|
|
|
|
|
%endif
|
|
|
|
|
%ifnarch %{ix86} %{arm}
|
|
|
|
|
# libomptarget is not supported on 32-bit systems.
|
|
|
|
|
%{_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}
|
|
|
|
|
# s390x does not support the offloading plugins.
|
|
|
|
|
%ifnarch s390x riscv64
|
|
|
|
|
%{_libdir}/libomptarget.rtl.amdgpu.so.%{so_suffix}
|
|
|
|
|
%{_libdir}/libomptarget.rtl.cuda.so.%{so_suffix}
|
|
|
|
|
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{so_suffix}
|
|
|
|
|
%endif
|
|
|
|
|
%{_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
|
|
|
|
|
%{_prefix}/lib/clang/%{maj_ver}/include/ompx.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.
|
|
|
|
|
# s390x does not support the offloading plugins.
|
|
|
|
|
%ifnarch s390x riscv64
|
|
|
|
|
%{_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
|
|
|
|
|
%endif
|
|
|
|
|
%{_libdir}/libomptarget.devicertl.a
|
|
|
|
|
%{_libdir}/libomptarget-amdgpu-*.bc
|
|
|
|
|
%{_libdir}/libomptarget-nvptx-*.bc
|
|
|
|
|
%{_libdir}/libomptarget.so
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files test
|
|
|
|
|
%{_datadir}/libomp
|
|
|
|
|
%{_libexecdir}/tests/libomp/
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Mar 28 2024 David Abdurachmanov <davidlt@rivosinc.com> - 18.1.1-1.0.riscv64
|
|
|
|
|
- Add support for riscv64
|
|
|
|
|
|
|
|
|
|
* Wed Mar 13 2024 Tom Stellard <tstellar@redhat.com> - 18.1.1-1
|
|
|
|
|
- 18.1.1 Release
|
|
|
|
|
|
|
|
|
|
* Thu Feb 29 2024 Tom Stellard <tstellar@redhat.com> - 18.1.0~rc4-1
|
|
|
|
|
- 18.1.0-rc4 Release
|
|
|
|
|
|
|
|
|
|
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 17.0.6-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 17.0.6-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
%{?llvm_snapshot_changelog_entry}
|
|
|
|
|
|
|
|
|
|
* Wed Nov 29 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.6-1
|
|
|
|
|
- Update to LLVM 17.0.6
|
|
|
|
|
|
|
|
|
|
* Wed Nov 01 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.4-1
|
|
|
|
|
- Update to LLVM 17.0.4
|
|
|
|
|
|
|
|
|
|
* Wed Oct 18 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.3-1
|
|
|
|
|
- Update to LLVM 17.0.3
|
|
|
|
|
|
|
|
|
|
* Thu Oct 05 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.2-1
|
|
|
|
|
- Update to LLVM 17.0.2
|
|
|
|
|
|
|
|
|
|
* Mon Sep 25 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.1-1
|
|
|
|
|
- Update to LLVM 17.0.1
|
|
|
|
|
|
|
|
|
|
* Mon Sep 11 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc4-1
|
|
|
|
|
- Update to LLVM 17.0.0 RC4
|
|
|
|
|
|
|
|
|
|
* Fri Aug 25 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc3-1
|
|
|
|
|
- Update to LLVM 17.0.0 RC3
|
|
|
|
|
|
|
|
|
|
* Wed Aug 23 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc2-1
|
|
|
|
|
- Update to LLVM 17.0.0 RC2
|
|
|
|
|
|
|
|
|
|
* Wed Aug 02 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc1-1
|
|
|
|
|
- Update to LLVM 17.0.0 RC1
|
|
|
|
|
|
|
|
|
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 16.0.6-2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 10 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.6-1
|
|
|
|
|
- Update to LLVM 16.0.6
|
|
|
|
|
|
|
|
|
|
* Wed Jun 28 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.5-4
|
|
|
|
|
- Specify the required clang version at build time
|
|
|
|
|
|
|
|
|
|
* Sat Jun 17 2023 Tom Stellard <tstellar@redhat.com> - 16.0.5-3
|
|
|
|
|
- Remove libomp-test package
|
|
|
|
|
|
|
|
|
|
* Thu Jun 15 2023 Nikita Popov <npopov@redhat.com> - 16.0.5-2
|
|
|
|
|
- Use llvm-cmake-utils package
|
|
|
|
|
|
|
|
|
|
* Tue Jun 06 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.5-1
|
|
|
|
|
- Update to LLVM 16.0.5
|
|
|
|
|
|
|
|
|
|
* Fri May 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.4-1
|
|
|
|
|
- Update to LLVM 16.0.4
|
|
|
|
|
|
|
|
|
|
* Wed May 10 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.3-1
|
|
|
|
|
- Update to LLVM 16.0.3
|
|
|
|
|
|
|
|
|
|
* Thu Apr 27 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.2-1
|
|
|
|
|
- Update to LLVM 16.0.2
|
|
|
|
|
|
|
|
|
|
* Wed Apr 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.1-3
|
|
|
|
|
- Bump the release. Fix rhbz#2187642.
|
|
|
|
|
|
|
|
|
|