Blame SPECS/libomp.spec

212297
%global libomp_version 13.0.1
212297
#global rc_ver 3
212297
%global libomp_srcdir openmp-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src
70fe70
70fe70
70fe70
%ifarch ppc64le
70fe70
%global libomp_arch ppc64
70fe70
%else
70fe70
%global libomp_arch %{_arch}
70fe70
%endif
70fe70
70fe70
Name: libomp
212297
Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}}
bf4e83
Release: 1%{?dist}
70fe70
Summary: OpenMP runtime for clang
70fe70
70fe70
License: NCSA
bf4e83
URL: http://openmp.llvm.org
212297
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{libomp_srcdir}.tar.xz
212297
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{libomp_srcdir}.tar.xz.sig
bf4e83
Source2: tstellar-gpg-key.asc
be9aa8
Source3: run-lit-tests
be9aa8
Source4: lit.fedora.cfg.py
70fe70
bf4e83
Patch0: 0001-PATCH-openmp-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch
70fe70
be9aa8
BuildRequires: gcc
be9aa8
BuildRequires: gcc-c++
70fe70
BuildRequires: cmake
be9aa8
BuildRequires: ninja-build
70fe70
BuildRequires: elfutils-libelf-devel
70fe70
BuildRequires: perl
70fe70
BuildRequires: perl-Data-Dumper
70fe70
BuildRequires: perl-Encode
70fe70
BuildRequires: libffi-devel
212297
BuildRequires: ncurses-devel
212297
212297
# The AMDGCN device RTL requires clang and llvm-link to build
212297
BuildRequires: clang
212297
BuildRequires: llvm
212297
212297
# libomptarget needs the llvm cmake files
212297
BuildRequires: llvm-devel
70fe70
70fe70
Requires: elfutils-libelf%{?isa}
70fe70
70fe70
# libomp does not support s390x.
70fe70
ExcludeArch: s390x
70fe70
70fe70
%description
70fe70
OpenMP runtime for clang.
70fe70
70fe70
%package devel
70fe70
Summary: OpenMP header files
bf4e83
Requires: clang-resource-filesystem%{?isa} = %{version}
70fe70
70fe70
%description devel
70fe70
OpenMP header files.
70fe70
70fe70
%package test
70fe70
Summary: OpenMP regression tests
be9aa8
Requires: %{name}%{?isa} = %{version}-%{release}
9359fe
Requires: %{name}-devel%{?isa} = %{version}-%{release}
70fe70
Requires: clang
70fe70
Requires: llvm
70fe70
Requires: gcc
70fe70
Requires: gcc-c++
70fe70
Requires: python3-lit
70fe70
70fe70
%description test
70fe70
OpenMP regression tests
70fe70
70fe70
%prep
bf4e83
%autosetup -n %{libomp_srcdir} -p2
70fe70
70fe70
%build
bf4e83
# LTO causes build failures in this package.  Disable LTO for now
212297
# https://bugzilla.redhat.com/show_bug.cgi?id=1988155
bf4e83
%define _lto_cflags %{nil}
bf4e83
bf4e83
mkdir -p %{_vpath_builddir}
bf4e83
cd %{_vpath_builddir}
70fe70
be9aa8
%cmake ..  -GNinja \
70fe70
	-DLIBOMP_INSTALL_ALIASES=OFF \
212297
	-DLLVM_DIR=%{_libdir}/cmake/llvm \
212297
	-DLIBOMP_HEADERS_INSTALL_PATH:PATH=%{_libdir}/clang/%{libomp_version}/include \
70fe70
%if 0%{?__isa_bits} == 64
70fe70
	-DOPENMP_LIBDIR_SUFFIX=64 \
70fe70
%else
70fe70
	-DOPENMP_LIBDIR_SUFFIX= \
70fe70
%endif
70fe70
bf4e83
%cmake_build
70fe70
70fe70
70fe70
%install
bf4e83
cd %{_vpath_builddir}
bf4e83
%cmake_install
70fe70
70fe70
# Test package setup
70fe70
%global libomp_srcdir %{_datadir}/libomp/src/
70fe70
%global libomp_testdir %{libomp_srcdir}/runtime/test/
70fe70
%global lit_cfg %{libomp_testdir}/%{_arch}.site.cfg.py
70fe70
%global lit_fedora_cfg %{_datadir}/libomp/lit.fedora.cfg.py
70fe70
70fe70
install -d %{buildroot}%{libomp_srcdir}/runtime
70fe70
cp -R runtime/test  %{buildroot}%{libomp_srcdir}/runtime
70fe70
cp -R runtime/src  %{buildroot}%{libomp_srcdir}/runtime
70fe70
70fe70
# Generate lit config files.  Strip off the last line that initiates the
70fe70
# test run, so we can customize the configuration.
bf4e83
head -n -1 runtime/test/lit.site.cfg >> %{buildroot}%{lit_cfg}
70fe70
70fe70
# Install custom fedora config file
be9aa8
cp %{SOURCE4} %{buildroot}%{lit_fedora_cfg}
70fe70
70fe70
# Patch lit config files to load custom fedora config
70fe70
echo "lit_config.load_config(config, '%{lit_fedora_cfg}')" >> %{buildroot}%{lit_cfg}
70fe70
70fe70
# Install test script
70fe70
install -d %{buildroot}%{_libexecdir}/tests/libomp
be9aa8
install -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/tests/libomp
70fe70
9359fe
# Remove static libraries with equivalent shared libraries
9359fe
rm -rf %{buildroot}%{_libdir}/libarcher_static.a
9359fe
be9aa8
%check
bf4e83
cd %{_vpath_builddir}
bf4e83
%cmake_build --target check-openmp
4c9090
70fe70
%files
212297
%license LICENSE.TXT
70fe70
%{_libdir}/libomp.so
9359fe
%ifnarch %{arm}
9359fe
%{_libdir}/libarcher.so
9359fe
%endif
212297
%ifnarch %{ix86} %{arm}
212297
%{_libdir}/libomptarget-amdgcn*.bc
212297
%{_libdir}/libomptarget.rtl.amdgpu.so
212297
%{_libdir}/libomptarget.rtl.cuda.so
212297
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so
212297
%endif
212297
%{_libdir}/libomptarget.so
70fe70
70fe70
%files devel
212297
%{_libdir}/clang/%{libomp_version}/include/omp.h
212297
%{_libdir}/cmake/openmp/FindOpenMPTarget.cmake
70fe70
%ifnarch %{arm}
212297
%{_libdir}/clang/%{libomp_version}/include/omp-tools.h
212297
%{_libdir}/clang/%{libomp_version}/include/ompt.h
be9aa8
# FIXME: This is probably wrong.  Seems like LIBOMP_HEADERS_INSTALL may
be9aa8
# not be respected.
be9aa8
%{_includedir}/ompt-multiplex.h
70fe70
%endif
70fe70
70fe70
%files test
70fe70
%{_datadir}/libomp
70fe70
%{_libexecdir}/tests/libomp/
70fe70
70fe70
%changelog
212297
* Thu Feb 03 2022 Tom Stellard <tstellar@redhat.com> - 13.0.1-1
212297
- 13.0.1 Release
212297
212297
* Fri Oct 15 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-1
212297
- 13.0.0 Release
212297
bf4e83
* Fri Jul 16 2021 sguelton@redhat.com - 12.0.1-1
bf4e83
- 12.0.1 release
bf4e83
bf4e83
* Thu May 6 2021 sguelton@redhat.com - 12.0.0-1
bf4e83
- 12.0.0 release
bf4e83
be9aa8
* Thu Oct 29 2020 sguelton@redhat.com - 11.0.0-1
be9aa8
- 11.0.0 final release
be9aa8
be9aa8
* Mon Sep 21 2020 sguelton@redhat.com - 11.0.0-0.1.rc2
be9aa8
- 11.0.0-rc2 Release
be9aa8
be9aa8
* Fri Jul 24 2020 sguelton@redhat.com - 10.0.1-1
be9aa8
- 10.0.1 final
be9aa8
9359fe
* Mon Jun 15 2020 sguelton@redhat.com - 10.0.0-2
9359fe
- Better dependency specification, see rhbz#1841180
9359fe
9359fe
* Thu Apr 9 2020 sguelton@redhat.com - 10.0.0-1
9359fe
- 10.0.0 final
9359fe
9359fe
* Thu Dec 19 2019 Tom Stellard <tstellar@redhat.com> - 9.0.1-1
9359fe
- 9.0.1 Release
9359fe
4c9090
* Fri Sep 27 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
4c9090
- 9.0.0 Release
4c9090
4c9090
* Thu Aug 1 2019 sguelton@redhat.com - 8.0.1-1
4c9090
- 8.0.1 release
4c9090
4c9090
* Thu Jun 13 2019 sguelton@redhat.com - 8.0.1-0.1.rc2
4c9090
- 8.0.1rc2 Release
4c9090
70fe70
* Mon Apr 29 2019 sguelton@redhat.com - 8.0.0-1
70fe70
- 8.0.0 Release
70fe70
70fe70
* Fri Dec 14 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-1
70fe70
- 7.0.1 Release
70fe70
70fe70
* Wed Dec 12 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-0.2.rc3
70fe70
- Fix test failures on single-core systems
70fe70
70fe70
* Mon Dec 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-0.1.rc3
70fe70
- 7.0.1-rc3 Release
70fe70
70fe70
* Tue Nov 27 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
70fe70
- 7.0.0 Release
70fe70
70fe70
* Sat Nov 10 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-3
70fe70
- Don't build libomp-test on i686
70fe70
70fe70
* Mon Oct 01 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-2
70fe70
- Drop scl macros
70fe70
70fe70
* Wed Jul 11 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
70fe70
- 6.0.1 Release
70fe70
70fe70
* Mon Jan 15 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-2
70fe70
- Drop ExcludeArch: ppc64
70fe70
70fe70
* Thu Dec 21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
70fe70
- 5.0.1 Release.
70fe70
70fe70
* Wed Jun 21 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
70fe70
- 4.0.1 Release.
70fe70
70fe70
* Wed Jun 07 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-3
70fe70
- Rename libopenmp->libomp
70fe70
70fe70
* Fri May 26 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-2
70fe70
- Disable build on s390x
70fe70
70fe70
* Mon May 15 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
70fe70
- Initial version.