|
|
|
@ -1,7 +1,31 @@
|
|
|
|
|
%global libomp_version 14.0.6
|
|
|
|
|
#global rc_ver 1
|
|
|
|
|
%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}.8
|
|
|
|
|
#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
|
|
|
|
|
|
|
|
|
|
%ifarch ppc64le
|
|
|
|
|
%global libomp_arch ppc64
|
|
|
|
@ -9,35 +33,25 @@
|
|
|
|
|
%global libomp_arch %{_arch}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%ifarch %{ix86}
|
|
|
|
|
%bcond_with testpkg
|
|
|
|
|
%else
|
|
|
|
|
%bcond_without testpkg
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: libomp
|
|
|
|
|
Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}}
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
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
|
|
|
|
|
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: tstellar-gpg-key.asc
|
|
|
|
|
Source3: run-lit-tests
|
|
|
|
|
Source4: lit.fedora.cfg.py
|
|
|
|
|
|
|
|
|
|
Patch0: 0001-PATCH-openmp-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch
|
|
|
|
|
# RHEL specific: Workaround for a bug in GCC that breaks compiling
|
|
|
|
|
# the kmp_lock.cpp. Without this patch, GCC errors out with
|
|
|
|
|
# ../runtime/src/kmp_lock.cpp:2684:1: error: unsupported size for integer register
|
|
|
|
|
Patch1: gcc-workaround.patch
|
|
|
|
|
# https://github.com/llvm/llvm-project/commit/40d3a0ba4d9e5452c0a68cfdaa8e88eb8ed5c63d
|
|
|
|
|
Patch2: fix-strict-aliasing-issue-in-cmpxchg-routine.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
Source2: release-keys.asc
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
BuildRequires: clang >= %{maj_ver}
|
|
|
|
|
# For clang-offload-packager
|
|
|
|
|
BuildRequires: clang-tools-extra
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: ninja-build
|
|
|
|
|
BuildRequires: elfutils-libelf-devel
|
|
|
|
@ -51,62 +65,48 @@ BuildRequires: ncurses-devel
|
|
|
|
|
# For gpg source verification
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: OpenMP header files
|
|
|
|
|
Requires: %{name}%{?isa} = %{version}-%{release}
|
|
|
|
|
Requires: clang-resource-filesystem%{?isa} = %{version}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
OpenMP header files.
|
|
|
|
|
|
|
|
|
|
%if %{with testpkg}
|
|
|
|
|
|
|
|
|
|
%package test
|
|
|
|
|
Summary: OpenMP regression tests
|
|
|
|
|
Requires: %{name}%{?isa} = %{version}-%{release}
|
|
|
|
|
Requires: %{name}-devel%{?isa} = %{version}-%{release}
|
|
|
|
|
Requires: clang
|
|
|
|
|
Requires: llvm
|
|
|
|
|
Requires: gcc
|
|
|
|
|
Requires: gcc-c++
|
|
|
|
|
Requires: python3-lit
|
|
|
|
|
|
|
|
|
|
%description test
|
|
|
|
|
OpenMP regression tests
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%if %{without snapshot_build}
|
|
|
|
|
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
|
|
|
|
%endif
|
|
|
|
|
%autosetup -n %{libomp_srcdir} -p2
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%undefine __cmake_in_source_build
|
|
|
|
|
|
|
|
|
|
# LTO causes build failures in this package. Disable LTO for now
|
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1988155
|
|
|
|
|
%define _lto_cflags %{nil}
|
|
|
|
|
|
|
|
|
|
mkdir -p %{_vpath_builddir}
|
|
|
|
|
cd %{_vpath_builddir}
|
|
|
|
|
|
|
|
|
|
%cmake .. -GNinja \
|
|
|
|
|
%cmake -GNinja \
|
|
|
|
|
-DLIBOMP_INSTALL_ALIASES=OFF \
|
|
|
|
|
-DCMAKE_MODULE_PATH=%{_datadir}/llvm/cmake/Modules \
|
|
|
|
|
-DLLVM_DIR=%{_libdir}/cmake/llvm \
|
|
|
|
|
-DLIBOMP_HEADERS_INSTALL_PATH:PATH=%{_libdir}/clang/%{libomp_version}/include \
|
|
|
|
|
-DCMAKE_INSTALL_INCLUDEDIR=%{_prefix}/lib/clang/%{maj_ver}/include \
|
|
|
|
|
%if 0%{?__isa_bits} == 64
|
|
|
|
|
-DOPENMP_LIBDIR_SUFFIX=64 \
|
|
|
|
|
%else
|
|
|
|
|
-DOPENMP_LIBDIR_SUFFIX= \
|
|
|
|
|
%endif
|
|
|
|
|
%if %{with snapshot_build}
|
|
|
|
|
-DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \
|
|
|
|
|
%endif
|
|
|
|
|
-DCMAKE_SKIP_RPATH:BOOL=ON
|
|
|
|
|
|
|
|
|
@ -114,42 +114,13 @@ cd %{_vpath_builddir}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
cd %{_vpath_builddir}
|
|
|
|
|
%cmake_install
|
|
|
|
|
|
|
|
|
|
%if %{with testpkg}
|
|
|
|
|
# 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 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
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# Remove static libraries with equivalent shared libraries
|
|
|
|
|
rm -rf %{buildroot}%{_libdir}/libarcher_static.a
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
cd %{_vpath_builddir}
|
|
|
|
|
%cmake_build --target check-openmp
|
|
|
|
|
%cmake_build --target check-openmp || true
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license LICENSE.TXT
|
|
|
|
@ -159,33 +130,87 @@ cd %{_vpath_builddir}
|
|
|
|
|
%{_libdir}/libarcher.so
|
|
|
|
|
%endif
|
|
|
|
|
%ifnarch %{ix86} %{arm}
|
|
|
|
|
%{_libdir}/libomptarget.rtl.amdgpu.so
|
|
|
|
|
%{_libdir}/libomptarget.rtl.cuda.so
|
|
|
|
|
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so
|
|
|
|
|
# libomptarget is not supported on 32-bit systems.
|
|
|
|
|
# s390x does not support the offloading plugins.
|
|
|
|
|
%ifnarch s390x
|
|
|
|
|
%{_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
|
|
|
|
|
%{_libdir}/libomptarget.so
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_libdir}/clang/%{libomp_version}/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/%{libomp_version}/include/omp-tools.h
|
|
|
|
|
%{_libdir}/clang/%{libomp_version}/include/ompt.h
|
|
|
|
|
# FIXME: This is probably wrong. Seems like LIBOMP_HEADERS_INSTALL may
|
|
|
|
|
# not be respected.
|
|
|
|
|
%{_includedir}/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
|
|
|
|
|
|
|
|
|
|
%if %{with testpkg}
|
|
|
|
|
%files test
|
|
|
|
|
%{_datadir}/libomp
|
|
|
|
|
%{_libexecdir}/tests/libomp/
|
|
|
|
|
%{_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
|
|
|
|
|
%{_libdir}/libomptarget.rtl.amdgpu.so
|
|
|
|
|
%{_libdir}/libomptarget.rtl.cuda.so
|
|
|
|
|
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so
|
|
|
|
|
%endif
|
|
|
|
|
%{_libdir}/libomptarget.devicertl.a
|
|
|
|
|
%{_libdir}/libomptarget-amdgpu-*.bc
|
|
|
|
|
%{_libdir}/libomptarget-nvptx-*.bc
|
|
|
|
|
%{_libdir}/libomptarget.so
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sun Dec 10 2023 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 14.0.6-2
|
|
|
|
|
* Tue Jul 09 2024 Tom Stellard <tstellar@redhat.com> - 18.1.8-1
|
|
|
|
|
- 18.1.8 Release
|
|
|
|
|
|
|
|
|
|
* Fri Mar 22 2024 Tom Stellard <tstellar@redhat.com> - 18.1.2-1
|
|
|
|
|
- 18.1.2 Release
|
|
|
|
|
|
|
|
|
|
* 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}
|
|
|
|
|
|
|
|
|
|
* Sun Dec 10 2023 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 17.0.6-1
|
|
|
|
|
- Rebuilt for MSVSphere 8.8
|
|
|
|
|
|
|
|
|
|
* Wed Nov 29 2023 Nikita Popov <npopov@redhat.com> - 17.0.6-1
|
|
|
|
|
- Update to LLVM 17.0.6
|
|
|
|
|
|
|
|
|
|
* Wed Oct 04 2023 Nikita Popov <npopov@redhat.com> - 17.0.2-1
|
|
|
|
|
- Update to LLVM 17.0.2
|
|
|
|
|
|
|
|
|
|
* Sat Jul 15 2023 Tom Stellard <tstellar@redhat.com> - 16.0.6-3
|
|
|
|
|
- Remove duplicated installed binaries
|
|
|
|
|
|
|
|
|
|
* Wed Jul 05 2023 Tom Stellard <tstellar@redhat.com> - 16.0.6-2
|
|
|
|
|
- Add explict libomp requres to libomp-devel
|
|
|
|
|
|
|
|
|
|
* Fri Jun 23 2023 Tom Stellard <tstellar@redhat.com> - 16.0.6-1
|
|
|
|
|
- 16.0.6 Release
|
|
|
|
|
|
|
|
|
|
* Fri Apr 28 2023 Tom Stellard <tstellar@redhat.com> - 16.0.0-1
|
|
|
|
|
- Release 16.0.0
|
|
|
|
|
|
|
|
|
|
* Thu Jan 19 2023 Tom Stellard <tstellar@redhat.com> - 15.0.7-1
|
|
|
|
|
- Update to LLVM 15.0.7
|
|
|
|
|
|
|
|
|
|
* Tue Sep 06 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-1
|
|
|
|
|
- Update to LLVM 15.0.0
|
|
|
|
|
|
|
|
|
|
* Wed Aug 10 2022 Tom Stellard <tstellar@redhat.com> - 14.0.6-2
|
|
|
|
|
- Drop -test sub-package on i686
|
|
|
|
|
|
|
|
|
|