From da6f9e407aadae79713578c5ba2c37b2f7386b0c Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 15 Nov 2022 04:31:43 +0000 Subject: [PATCH] import libomp-15.0.0-1.module+el8.8.0+17086+d202f307 --- .gitignore | 4 +- .libomp.metadata | 4 +- ...ke-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch | 27 ---------- ...ct-aliasing-issue-in-cmpxchg-routine.patch | 44 ---------------- SOURCES/gcc-workaround.patch | 12 ----- SOURCES/openmp-14.0.6.src.tar.xz.sig | Bin 566 -> 0 bytes SOURCES/openmp-15.0.0.src.tar.xz.sig | Bin 0 -> 438 bytes SPECS/libomp.spec | 49 ++++++++++-------- 8 files changed, 31 insertions(+), 109 deletions(-) delete mode 100644 SOURCES/0001-PATCH-openmp-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch delete mode 100644 SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch delete mode 100644 SOURCES/gcc-workaround.patch delete mode 100644 SOURCES/openmp-14.0.6.src.tar.xz.sig create mode 100644 SOURCES/openmp-15.0.0.src.tar.xz.sig diff --git a/.gitignore b/.gitignore index d62ef01..33b2f0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/openmp-14.0.6.src.tar.xz -SOURCES/tstellar-gpg-key.asc +SOURCES/openmp-15.0.0.src.tar.xz +SOURCES/release-keys.asc diff --git a/.libomp.metadata b/.libomp.metadata index 3801658..5beb768 100644 --- a/.libomp.metadata +++ b/.libomp.metadata @@ -1,2 +1,2 @@ -647f1db43c1bb3b8b7c947dd54a1c3d247685d68 SOURCES/openmp-14.0.6.src.tar.xz -b8d2648a01d36ed0186fd2c5af325fd28797f9a0 SOURCES/tstellar-gpg-key.asc +97ec0adfd8f56423d8d22c83abf3ea35980dcd78 SOURCES/openmp-15.0.0.src.tar.xz +347bdd5ee6d6b93c9644c268511815912c0fb2dc SOURCES/release-keys.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 deleted file mode 100644 index e7febcf..0000000 --- a/SOURCES/0001-PATCH-openmp-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-.patch +++ /dev/null @@ -1,27 +0,0 @@ -From f2c9c1c9cda831a4305e2dc8899d630ed727353a Mon Sep 17 00:00:00 2001 -From: Tom Stellard -Date: Tue, 16 May 2017 11:52:19 -0400 -Subject: [PATCH] [PATCH][openmp] CMake: Make LIBOMP_HEADERS_INSTALL_PATH a - cache variable when bulding standalone - -This way it can be overriden on the command line. ---- - openmp/runtime/src/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt -index 822f9ca..583a3c3 100644 ---- a/openmp/runtime/src/CMakeLists.txt -+++ b/openmp/runtime/src/CMakeLists.txt -@@ -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 "${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}) - set(LIBOMP_HEADERS_INSTALL_PATH "${OPENMP_INSTALL_LIBDIR}/clang/${CLANG_VERSION}/include") --- -1.8.3.1 - diff --git a/SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch b/SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch deleted file mode 100644 index db6ca9c..0000000 --- a/SOURCES/fix-strict-aliasing-issue-in-cmpxchg-routine.patch +++ /dev/null @@ -1,44 +0,0 @@ -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 deleted file mode 100644 index a7de6ca..0000000 --- a/SOURCES/gcc-workaround.patch +++ /dev/null @@ -1,12 +0,0 @@ -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-14.0.6.src.tar.xz.sig b/SOURCES/openmp-14.0.6.src.tar.xz.sig deleted file mode 100644 index 77f81a19523381bf84a36df3b90c297e4cb19954..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 566 zcmV-60?GY}0y6{v0SEvc79j*jP9iaCzek0rjBbvi$CRmtL7j>P0%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%hMCBRWOVC684}eE_C*ZdEv@B<33}lQC;N0LI*<&v#=8GEI1bk$0rm{Rhr& zxO}aex%XqUK>SNJSAWsIzTVGJdmsst%6%Q>@*yWfZaUjEAclf~b6*w?Xa{hDz{B5y zk;t!)IEp)GOqho)0a=U8@pr5TM0S@PrG7RVNcJxnI)n|MMuPE{4dtttdi>DymLiqXs|92Ruy zQyjFFcoy!QTc5%=B0c{0NJU`9a%}+VAb6sRNkoO5#{_c^`2FSu&5(+%?W=! g6#;szg0{bV8x_~T>-MKytpNxN=SbC^m_*V9UJ7B;oB#j- literal 0 HcmV?d00001 diff --git a/SPECS/libomp.spec b/SPECS/libomp.spec index 1831374..d119fb9 100644 --- a/SPECS/libomp.spec +++ b/SPECS/libomp.spec @@ -1,4 +1,5 @@ -%global libomp_version 14.0.6 +%global maj_ver 15 +%global libomp_version %{maj_ver}.0.0 #global rc_ver 1 %global libomp_srcdir openmp-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src @@ -17,27 +18,20 @@ Name: libomp Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: OpenMP runtime for clang License: NCSA URL: http://openmp.llvm.org 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 +Source2: release-keys.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++ +BuildRequires: clang +# For clang-offload-packager +BuildRequires: clang-tools-extra BuildRequires: cmake BuildRequires: ninja-build BuildRequires: elfutils-libelf-devel @@ -101,8 +95,9 @@ cd %{_vpath_builddir} %cmake .. -GNinja \ -DLIBOMP_INSTALL_ALIASES=OFF \ + -DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \ -DLLVM_DIR=%{_libdir}/cmake/llvm \ - -DLIBOMP_HEADERS_INSTALL_PATH:PATH=%{_libdir}/clang/%{libomp_version}/include \ + -DCMAKE_INSTALL_INCLUDEDIR=%{_libdir}/clang/%{libomp_version}/include \ %if 0%{?__isa_bits} == 64 -DOPENMP_LIBDIR_SUFFIX=64 \ %else @@ -149,7 +144,7 @@ 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,11 +154,11 @@ 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 +%{_libdir}/libomptarget.rtl.amdgpu.so.%{maj_ver} +%{_libdir}/libomptarget.rtl.cuda.so.%{maj_ver} +%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{maj_ver} %endif -%{_libdir}/libomptarget.so +%{_libdir}/libomptarget.so.%{maj_ver} %files devel %{_libdir}/clang/%{libomp_version}/include/omp.h @@ -171,10 +166,17 @@ cd %{_vpath_builddir} %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 +%{_libdir}/clang/%{libomp_version}/include/ompt-multiplex.h %endif +%ifnarch %{ix86} %{arm} +%{_libdir}/libomptarget.rtl.amdgpu.so +%{_libdir}/libomptarget.rtl.cuda.so +%{_libdir}/libomptarget.rtl.%{libomp_arch}.so +%{_libdir}/libomptarget.devicertl.a +%{_libdir}/libomptarget-amdgpu-*.bc +%{_libdir}/libomptarget-nvptx-*.bc +%endif +%{_libdir}/libomptarget.so %if %{with testpkg} %files test @@ -183,6 +185,9 @@ cd %{_vpath_builddir} %endif %changelog +* Tue Sep 06 2022 Nikita Popov - 15.0.0-1 +- Update to LLVM 15.0.0 + * Wed Aug 10 2022 Tom Stellard - 14.0.6-2 - Drop -test sub-package on i686