From 318d6afcaabaaea108be5a332ee547991b821259 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 31 Jul 2024 12:51:01 +0000 Subject: [PATCH] Add libomp compat package support This is not part of current rawhide sources, but based on libomp17 instead. --- build.spec.inc | 2 +- files.spec.inc | 22 +++++++++------------- globals.spec.inc | 6 +----- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index 7aa2cff..1f5a351 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -96,8 +96,8 @@ popd \ \ \ -%if %{without compat_build} -DLIBOMP_INSTALL_ALIASES=OFF \ +%if %{without compat_build} %if 0%{?__isa_bits} == 64 -DOPENMP_LIBDIR_SUFFIX=64 \ %else diff --git a/files.spec.inc b/files.spec.inc index 8576e09..7580588 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -550,17 +550,15 @@ #region OPENMP files -%if %{without compat_build} - %files -n %{pkg_name_libomp} %license openmp/LICENSE.TXT -%{_libdir}/libomp.so -%{_libdir}/libompd.so -%{_libdir}/libarcher.so +%{install_libdir}/libomp.so +%{install_libdir}/libompd.so +%{install_libdir}/libarcher.so %ifnarch %{ix86} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. -%{_libdir}/libomptarget.so.%{so_suffix} +%{install_libdir}/libomptarget.so.%{so_suffix} %endif %files -n %{pkg_name_libomp}-devel @@ -570,16 +568,14 @@ %{_prefix}/lib/clang/%{maj_ver}/include/omp-tools.h %{_prefix}/lib/clang/%{maj_ver}/include/ompt.h %{_prefix}/lib/clang/%{maj_ver}/include/ompt-multiplex.h -%{_libdir}/cmake/openmp/ +%{install_libdir}/cmake/openmp/ %ifnarch %{ix86} # libomptarget is not supported on 32-bit systems. # s390x does not support the offloading plugins. -%{_libdir}/libomptarget.devicertl.a -%{_libdir}/libomptarget-amdgpu-*.bc -%{_libdir}/libomptarget-nvptx-*.bc -%{_libdir}/libomptarget.so -%endif - +%{install_libdir}/libomptarget.devicertl.a +%{install_libdir}/libomptarget-amdgpu-*.bc +%{install_libdir}/libomptarget-nvptx-*.bc +%{install_libdir}/libomptarget.so %endif #endregion diff --git a/globals.spec.inc b/globals.spec.inc index d8d552a..3c6ed10 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -132,9 +132,7 @@ #region OPENMP globals -%if %{without compat_build} - -%global pkg_name_libomp libomp +%global pkg_name_libomp libomp%{pkg_suffix} %global so_suffix %{maj_ver}.%{min_ver} @@ -148,8 +146,6 @@ %global libomp_arch %{_arch} %endif -%endif - #endregion #region LLD globals