diff --git a/libomp.spec b/libomp.spec index 1f982dc52a3fe90f42c03c527c301c10e7e8ed3c..51ad1ea883a964c00a79aa98b83c0289b4618612 100644 --- a/libomp.spec +++ b/libomp.spec @@ -1,7 +1,8 @@ %global toolchain clang -%global maj_ver 12 -%global libomp_version %{maj_ver}.0.1 +%global maj_ver 17 +%global so_suffix %{maj_ver} +%global libomp_version %{maj_ver}.0.6 %global libomp_srcdir openmp-%{libomp_version}.src %ifarch ppc64le @@ -12,13 +13,15 @@ Name: libomp Version: %{libomp_version} -Release: 2 +Release: 1 Summary: OpenMP runtime for clang License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://openmp.llvm.org Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-12.0.1/%{libomp_srcdir}.tar.xz +%ifarch loongarch64 Patch0: 0001-libomp-add-support-for-loongarch64.patch +%endif BuildRequires: clang # For clang-offload-packager @@ -29,10 +32,11 @@ BuildRequires: perl BuildRequires: perl-Data-Dumper BuildRequires: perl-Encode BuildRequires: libffi-devel -#BuildRequires: ninja-build +BuildRequires: ninja-build # libomptarget needs the llvm cmake files BuildRequires: llvm-devel +BuildRequires: llvm-cmake-utils Requires: elfutils-libelf%{?isa} @@ -48,15 +52,13 @@ Requires: clang-resource-filesystem OpenMP header files. %prep -%autosetup -n %{libomp_srcdir} -p1 +%autosetup -n %{libomp_srcdir} -p2 %build -mkdir build && cd build # TODO: LIBOMP_HAVE_VERSION_SCRIPT_FLAG should be set automatically. -%cmake \ - -DOPENMP_ENABLE_LIBOMPTARGET:BOOL=ON \ +%cmake -GNinja \ -DLIBOMP_INSTALL_ALIASES=OFF \ - -DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \ + -DCMAKE_MODULE_PATH=%{_datadir}/llvm/cmake/Modules \ -DLLVM_DIR=%{_libdir}/cmake/llvm \ -DLIBOMPTARGET_LLVM_INCLUDE_DIRS=%{_includedir}/llvm \ -DCMAKE_INSTALL_PREFIX="/usr" \ @@ -66,24 +68,24 @@ mkdir build && cd build %else -DOPENMP_LIBDIR_SUFFIX= \ %endif - -DCMAKE_SKIP_RPATH:BOOL=ON \ - -DLIBOMP_HAVE_VERSION_SCRIPT_FLAG:BOOL=ON \ - .. + -DCMAKE_SKIP_RPATH:BOOL=ON -%make_build +%cmake_build %install -%make_install -C build -mkdir -p %{buildroot}%{_datadir}/licenses/libomp/ -cp LICENSE.txt %{buildroot}%{_datadir}/licenses/libomp/ +%cmake_install %check -%make_build -C build check-openmp || echo "CHECK FAIL" +%cmake_build -C build check-openmp || echo "CHECK FAIL" %files -%license LICENSE.txt +%license LICENSE.TXT %{_libdir}/*.so +%{_libdir}/libomptarget.so.%{so_suffix} +%{_libdir}/libomptarget.rtl.amdgpu.so.%{so_suffix} +%{_libdir}/libomptarget.rtl.cuda.so.%{so_suffix} +%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{so_suffix} %files devel %{_includedir}/omp.h @@ -91,8 +93,14 @@ cp LICENSE.txt %{buildroot}%{_datadir}/licenses/libomp/ %{_includedir}/ompt.h %{_includedir}/ompt-multiplex.h %{_libdir}/*.a +%{_libdir}/libomptarget-amdgpu-*.bc +%{_libdir}/libomptarget-nvptx-*.bc +%{_libdir}/cmake/openmp/FindOpenMPTarget.cmake %changelog +* Wed Dec 18 2024 misaka00251 - 17.0.6-1 +- Update to 17.0.6 + * Thu Apr 18 2024 Pengda Dou - 12.0.1-2 - add support for loongarch64 diff --git a/openmp-12.0.1.src.tar.xz b/openmp-12.0.1.src.tar.xz deleted file mode 100644 index e27e9ba111ed48a6271b12171d693ede722ad29f..0000000000000000000000000000000000000000 Binary files a/openmp-12.0.1.src.tar.xz and /dev/null differ diff --git a/openmp-17.0.6.src.tar.xz b/openmp-17.0.6.src.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..b6cbb6a28cef0577407c0be6ddc67fd678fe1376 Binary files /dev/null and b/openmp-17.0.6.src.tar.xz differ