From 30cfa100b5f45f4332b2d9a4ffbb568d851ce3d5 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 13:23:10 +0000 Subject: [PATCH] Fix libomp libdir --- build.spec.inc | 13 ++----------- globals.spec.inc | 2 ++ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/build.spec.inc b/build.spec.inc index a87d16f..9232954 100644 --- a/build.spec.inc +++ b/build.spec.inc @@ -51,8 +51,6 @@ popd # TODO(kkleine): Follow more closely the Distribution guidelines found here: https://llvm.org/docs/BuildingADistribution.html # force off shared libs as cmake macros turns it on. # TODO: Disable LLVM_UNREACHABLE_OPTIMIZE. -# TODO: Override LIBOMP_INSTALL_LIBDIR, because otherwise the libraries -# are installed to /usr/lib64/$TRIPLE and clang can't find them. %cmake -G Ninja \ -DLLVM_ENABLE_PROJECTS="%{projects}" \ \ @@ -101,15 +99,8 @@ popd \ \ -DLIBOMP_INSTALL_ALIASES=OFF \ -%if %{without compat_build} -%if 0%{?__isa_bits} == 64 - -DOPENMP_LIBDIR_SUFFIX=64 \ -%else - -DOPENMP_LIBDIR_SUFFIX= \ -%endif -%endif - -DOPENMP_INSTALL_LIBDIR=%{_lib} \ - -DOFFLOAD_INSTALL_LIBDIR=%{_lib} \ + -DOPENMP_INSTALL_LIBDIR=%{unprefixed_libdir} \ + -DOFFLOAD_INSTALL_LIBDIR=%{unprefixed_libdir} \ \ \ \ diff --git a/globals.spec.inc b/globals.spec.inc index 6102ec6..f722da8 100644 --- a/globals.spec.inc +++ b/globals.spec.inc @@ -56,6 +56,7 @@ %global install_datadir %{install_prefix}/share %global install_libexecdir %{install_prefix}/libexec %global install_docdir %{install_datadir}/doc +%global unprefixed_libdir lib %global build_libdir llvm/%{_vpath_builddir}/lib %global pkg_includedir %{_includedir}/%{pkg_name_llvm} @@ -69,6 +70,7 @@ %global install_includedir %{_includedir} %global install_libexecdir %{_libexecdir} %global install_docdir %{_docdir} +%global unprefixed_libdir %{_lib} %global build_libdir llvm/%{_vpath_builddir}/%{_lib} %global pkg_datadir %{_datadir} %global pkg_suffix %{nil}