import libomp-14.0.6-2.module+el8.7.0+16313+2fe5fb1f
This commit is contained in:
parent
1c014330b7
commit
ddba0e7668
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
SOURCES/openmp-13.0.1.src.tar.xz
|
||||
SOURCES/openmp-14.0.6.src.tar.xz
|
||||
SOURCES/tstellar-gpg-key.asc
|
||||
|
@ -1,2 +1,2 @@
|
||||
a5b883a2fbdc14ec44277cc9cc0f6592d80663e4 SOURCES/openmp-13.0.1.src.tar.xz
|
||||
647f1db43c1bb3b8b7c947dd54a1c3d247685d68 SOURCES/openmp-14.0.6.src.tar.xz
|
||||
b8d2648a01d36ed0186fd2c5af325fd28797f9a0 SOURCES/tstellar-gpg-key.asc
|
||||
|
@ -13,11 +13,11 @@ diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.t
|
||||
index 822f9ca..583a3c3 100644
|
||||
--- a/openmp/runtime/src/CMakeLists.txt
|
||||
+++ b/openmp/runtime/src/CMakeLists.txt
|
||||
@@ -305,7 +305,7 @@ add_dependencies(libomp-micro-tests libomp-test-deps)
|
||||
@@ -346,7 +346,7 @@ add_dependencies(libomp-micro-tests libomp-test-deps)
|
||||
# We want to install libomp in DESTDIR/CMAKE_INSTALL_PREFIX/lib
|
||||
# We want to install headers in DESTDIR/CMAKE_INSTALL_PREFIX/include
|
||||
if(${OPENMP_STANDALONE_BUILD})
|
||||
- set(LIBOMP_HEADERS_INSTALL_PATH include)
|
||||
- set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
+ set(LIBOMP_HEADERS_INSTALL_PATH include CACHE PATH "Install path for OpenMP headers")
|
||||
else()
|
||||
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION ${PACKAGE_VERSION})
|
||||
|
44
SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch
Normal file
44
SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch
Normal file
@ -0,0 +1,44 @@
|
||||
diff --git a/openmp/runtime/src/kmp_os.h b/openmp/runtime/src/kmp_os.h
|
||||
--- a/openmp/runtime/src/kmp_os.h
|
||||
+++ b/openmp/runtime/src/kmp_os.h
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <atomic>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
|
||||
#define KMP_FTN_PLAIN 1
|
||||
#define KMP_FTN_APPEND 2
|
||||
@@ -864,15 +865,25 @@
|
||||
__sync_lock_test_and_set((volatile kmp_uint64 *)(p), (kmp_uint64)(v))
|
||||
|
||||
inline kmp_real32 KMP_XCHG_REAL32(volatile kmp_real32 *p, kmp_real32 v) {
|
||||
- kmp_int32 tmp =
|
||||
- __sync_lock_test_and_set((volatile kmp_uint32 *)(p), *(kmp_uint32 *)&v);
|
||||
- return *(kmp_real32 *)&tmp;
|
||||
+ volatile kmp_uint32 *up;
|
||||
+ kmp_uint32 uv;
|
||||
+ memcpy(&up, &p, sizeof(up));
|
||||
+ memcpy(&uv, &v, sizeof(uv));
|
||||
+ kmp_int32 tmp = __sync_lock_test_and_set(up, uv);
|
||||
+ kmp_real32 ftmp;
|
||||
+ memcpy(&ftmp, &tmp, sizeof(tmp));
|
||||
+ return ftmp;
|
||||
}
|
||||
|
||||
inline kmp_real64 KMP_XCHG_REAL64(volatile kmp_real64 *p, kmp_real64 v) {
|
||||
- kmp_int64 tmp =
|
||||
- __sync_lock_test_and_set((volatile kmp_uint64 *)(p), *(kmp_uint64 *)&v);
|
||||
- return *(kmp_real64 *)&tmp;
|
||||
+ volatile kmp_uint64 *up;
|
||||
+ kmp_uint64 uv;
|
||||
+ memcpy(&up, &p, sizeof(up));
|
||||
+ memcpy(&uv, &v, sizeof(uv));
|
||||
+ kmp_int64 tmp = __sync_lock_test_and_set(up, uv);
|
||||
+ kmp_real64 dtmp;
|
||||
+ memcpy(&dtmp, &tmp, sizeof(tmp));
|
||||
+ return dtmp;
|
||||
}
|
||||
|
||||
#else
|
||||
|
12
SOURCES/gcc-workaround.patch
Normal file
12
SOURCES/gcc-workaround.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -ruN openmp-14.0.0.src.orig/runtime/src/kmp_lock.cpp openmp-14.0.0.src/runtime/src/kmp_lock.cpp
|
||||
--- a/openmp-14.0.0.src.orig/runtime/src/kmp_lock.cpp 2022-03-14 10:44:55.000000000 +0100
|
||||
+++ b/openmp-14.0.0.src/runtime/src/kmp_lock.cpp 2022-04-22 10:58:26.736078432 +0200
|
||||
@@ -2663,7 +2663,7 @@
|
||||
}
|
||||
|
||||
// Truncated binary exponential backoff function
|
||||
-void __kmp_spin_backoff(kmp_backoff_t *boff) {
|
||||
+void __attribute__((optimize("O1"))) __kmp_spin_backoff(kmp_backoff_t *boff) {
|
||||
// We could flatten this loop, but making it a nested loop gives better result
|
||||
kmp_uint32 i;
|
||||
for (i = boff->step; i > 0; i--) {
|
Binary file not shown.
BIN
SOURCES/openmp-14.0.6.src.tar.xz.sig
Normal file
BIN
SOURCES/openmp-14.0.6.src.tar.xz.sig
Normal file
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
%global libomp_version 13.0.1
|
||||
#global rc_ver 3
|
||||
%global libomp_version 14.0.6
|
||||
#global rc_ver 1
|
||||
%global libomp_srcdir openmp-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
|
||||
|
||||
@ -9,9 +9,15 @@
|
||||
%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: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: OpenMP runtime for clang
|
||||
|
||||
License: NCSA
|
||||
@ -23,6 +29,12 @@ 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++
|
||||
@ -33,11 +45,12 @@ BuildRequires: perl
|
||||
BuildRequires: perl-Data-Dumper
|
||||
BuildRequires: perl-Encode
|
||||
BuildRequires: libffi-devel
|
||||
# RHEL specific: libomp requires libterminfo
|
||||
BuildRequires: ncurses-devel
|
||||
|
||||
# The AMDGCN device RTL requires clang and llvm-link to build
|
||||
BuildRequires: clang
|
||||
BuildRequires: llvm
|
||||
# For gpg source verification
|
||||
BuildRequires: gnupg2
|
||||
|
||||
|
||||
# libomptarget needs the llvm cmake files
|
||||
BuildRequires: llvm-devel
|
||||
@ -57,6 +70,8 @@ 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}
|
||||
@ -70,7 +85,10 @@ Requires: python3-lit
|
||||
%description test
|
||||
OpenMP regression tests
|
||||
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
||||
%autosetup -n %{libomp_srcdir} -p2
|
||||
|
||||
%build
|
||||
@ -90,6 +108,7 @@ cd %{_vpath_builddir}
|
||||
%else
|
||||
-DOPENMP_LIBDIR_SUFFIX= \
|
||||
%endif
|
||||
-DCMAKE_SKIP_RPATH:BOOL=ON
|
||||
|
||||
%cmake_build
|
||||
|
||||
@ -98,6 +117,7 @@ cd %{_vpath_builddir}
|
||||
cd %{_vpath_builddir}
|
||||
%cmake_install
|
||||
|
||||
%if %{with testpkg}
|
||||
# Test package setup
|
||||
%global libomp_srcdir %{_datadir}/libomp/src/
|
||||
%global libomp_testdir %{libomp_srcdir}/runtime/test/
|
||||
@ -122,6 +142,8 @@ echo "lit_config.load_config(config, '%{lit_fedora_cfg}')" >> %{buildroot}%{lit_
|
||||
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
|
||||
|
||||
@ -132,11 +154,11 @@ cd %{_vpath_builddir}
|
||||
%files
|
||||
%license LICENSE.TXT
|
||||
%{_libdir}/libomp.so
|
||||
%{_libdir}/libompd.so
|
||||
%ifnarch %{arm}
|
||||
%{_libdir}/libarcher.so
|
||||
%endif
|
||||
%ifnarch %{ix86} %{arm}
|
||||
%{_libdir}/libomptarget-amdgcn*.bc
|
||||
%{_libdir}/libomptarget.rtl.amdgpu.so
|
||||
%{_libdir}/libomptarget.rtl.cuda.so
|
||||
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so
|
||||
@ -154,11 +176,26 @@ cd %{_vpath_builddir}
|
||||
%{_includedir}/ompt-multiplex.h
|
||||
%endif
|
||||
|
||||
%if %{with testpkg}
|
||||
%files test
|
||||
%{_datadir}/libomp
|
||||
%{_libexecdir}/tests/libomp/
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Aug 10 2022 Tom Stellard <tstellar@redhat.com> - 14.0.6-2
|
||||
- Drop -test sub-package on i686
|
||||
|
||||
* Tue Jun 28 2022 Tom Stellard <tstellar@redhat.com> - 14.0.6-1
|
||||
- 14.0.6 Release
|
||||
|
||||
* Wed May 18 2022 Timm Bäder <tbaeder@redhat.com> - 14.00-2
|
||||
- Backport 40d3a0ba4d9e5452c0a68cfdaa8e88eb8ed5c63d to
|
||||
fix a strict aliasing issue.
|
||||
|
||||
* Thu Apr 07 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-1
|
||||
- Update to 14.0.0
|
||||
|
||||
* Thu Feb 03 2022 Tom Stellard <tstellar@redhat.com> - 13.0.1-1
|
||||
- 13.0.1 Release
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user