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 08d474f..5714776 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}