From ddba0e76681a9d914601bf49c5f64c8aba6f7ab0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 27 Sep 2022 08:09:41 -0400 Subject: [PATCH] import libomp-14.0.6-2.module+el8.7.0+16313+2fe5fb1f --- .gitignore | 2 +- .libomp.metadata | 2 +- ...ke-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch | 4 +- ...ct-aliasing-issue-in-cmpxchg-routine.patch | 44 +++++++++++++++ SOURCES/gcc-workaround.patch | 12 +++++ SOURCES/openmp-13.0.1.src.tar.xz.sig | Bin 566 -> 0 bytes SOURCES/openmp-14.0.6.src.tar.xz.sig | Bin 0 -> 566 bytes SPECS/libomp.spec | 51 +++++++++++++++--- 8 files changed, 104 insertions(+), 11 deletions(-) create mode 100644 SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch create mode 100644 SOURCES/gcc-workaround.patch delete mode 100644 SOURCES/openmp-13.0.1.src.tar.xz.sig create mode 100644 SOURCES/openmp-14.0.6.src.tar.xz.sig diff --git a/.gitignore b/.gitignore index edea605..d62ef01 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.libomp.metadata b/.libomp.metadata index e9a4c02..3801658 100644 --- a/.libomp.metadata +++ b/.libomp.metadata @@ -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 diff --git a/SOURCES/0001-PATCH-openmp-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch b/SOURCES/0001-PATCH-openmp-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch index eedd1ee..e7febcf 100644 --- a/SOURCES/0001-PATCH-openmp-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch +++ b/SOURCES/0001-PATCH-openmp-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch @@ -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}) diff --git a/SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch b/SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch new file mode 100644 index 0000000..db6ca9c --- /dev/null +++ b/SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch @@ -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 + #include + #include ++#include + + #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 + diff --git a/SOURCES/gcc-workaround.patch b/SOURCES/gcc-workaround.patch new file mode 100644 index 0000000..a7de6ca --- /dev/null +++ b/SOURCES/gcc-workaround.patch @@ -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--) { diff --git a/SOURCES/openmp-13.0.1.src.tar.xz.sig b/SOURCES/openmp-13.0.1.src.tar.xz.sig deleted file mode 100644 index cc297137827dc33cc0b137cce00bef17ceed04f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmV-60?GY}0y6{v0SEvc79j*jP9iaCzek0rjBbvi$CRmtL7j>P0%7``3;+rV5TeJF zsfIzFiu2PD0E2N}7mW#=Dd|6?y1B_@ekksr(=`2tHzR(8 zj{~NlwB1hFR6`sk>idgHnbo=$Vl2E^b@{;{9k(ig92yy3tx`$*Ht{v#MK>>1>vMWn zu`0Ecu3@46nE0no^Md1aQb-irb(7NnmWG}7k8+jNI?2SWh~2$6XqQQ?P#0F)QPts%I&g&3 zmSb3_z?r)LeHTC>SU1u}t-#cBi=9muc7n2~B#OD@zSngU>dnm!gr^B`J7Mv!x?cLV zt%7mT^YhU8kaqlA1b^;%V3OCS1NBT@ag!W3xk<{C7q=yEO)(iV?adT7!>6+LuI$(& zV=SF%ysV_{I`>G2nX_-`N@SpLWO6Q}KQ)rcdk=)G?b3P0%Ep`XaEWc5TeJF zsfIzFiU>as|9uF&S?bSM)Ix71ZRIy@%_7N$+CIyktrOA27&-(-4$Z}g+nAcA_*EI{ z*nd=?X2b2J)!-WAb_-s+$+KxO6u^1)gD_({=P5818RP)WZDGTX+|jb-jO@v*f_r=k zD#*mk7!bW*KXBy%H>ZI$R zx+znX3SEeKu}BO8^wmXh?EW%;QF;sRmrHBE|GJY1s?tg=y;4Cz7UYth0eO>#xXZ7B zIY-`eyQC$`VlI2GfSWZ29_n%5ILS^h6o43KJtryUoj*1Yy(FyI!qX39=Y})t)||)S z*V7;7iDy;2j6hb>wG2~sj=RzQi3KC!G(G(IpWV#A=CAMO;i)!9>^vvfFpBvAeU56! z0}&CPF!?U>-5B5vMkzWr%k^Fm6_|3p_iF~Jb7_)(Gd@?u8W|k2wBc{!^>0x3it-FH zbXxa;7yvKns1MuqJnCtjcR_1pS%W0CXGU#E{boi^WU{%B`B({~3 zI-Ne$1*2ur4$VMGB8n=D*d+b@cBDQtU&<91f^^b%hMCBRWOV> %{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 - 14.0.6-2 +- Drop -test sub-package on i686 + +* Tue Jun 28 2022 Tom Stellard - 14.0.6-1 +- 14.0.6 Release + +* Wed May 18 2022 Timm Bäder - 14.00-2 +- Backport 40d3a0ba4d9e5452c0a68cfdaa8e88eb8ed5c63d to + fix a strict aliasing issue. + +* Thu Apr 07 2022 Timm Bäder - 14.0.0-1 +- Update to 14.0.0 + * Thu Feb 03 2022 Tom Stellard - 13.0.1-1 - 13.0.1 Release