Skip to content

Commit 97e4be2

Browse files
committed
Use libdir suffix in versioned prefix as well
Use the lib/lib64 distinction for the versioned prefix, to avoid a mismatch with the default prefix. This means that the versioned prefix now has libraries in /usr/lib64/llvmN/lib64. This should fix the issue https://src.fedoraproject.org/rpms/llvm/pull-request/446 ran into. This would also be needed if we wanted to switch to installing into libexec.
1 parent 6aa8bd5 commit 97e4be2

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

llvm.spec

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,12 @@
210210
%global install_prefix %{_libdir}/llvm%{maj_ver}
211211
%global install_bindir %{install_prefix}/bin
212212
%global install_includedir %{install_prefix}/include
213-
%global install_libdir %{install_prefix}/lib
213+
%global install_libdir %{install_prefix}/%{_lib}
214214
%global install_datadir %{install_prefix}/share
215215
%global install_mandir %{install_prefix}/share/man
216216
%global install_libexecdir %{install_prefix}/libexec
217-
%global build_libdir llvm/%{_vpath_builddir}/lib
218-
%global unprefixed_libdir lib
217+
%global build_libdir llvm/%{_vpath_builddir}/%{_lib}
218+
%global unprefixed_libdir %{_lib}
219219

220220
%if 0%{?rhel}
221221
%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;BPF;WebAssembly"
@@ -316,7 +316,7 @@
316316
#region main package
317317
Name: %{pkg_name_llvm}
318318
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
319-
Release: 8%{?dist}
319+
Release: 9%{?dist}
320320
Summary: The Low Level Virtual Machine
321321

322322
License: Apache-2.0 WITH LLVM-exception OR NCSA
@@ -1507,6 +1507,10 @@ popd
15071507
%global cmake_config_args %{cmake_config_args} -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG"
15081508
%endif
15091509

1510+
%if 0%{?__isa_bits} == 64
1511+
%global cmake_config_args %{cmake_config_args} -DLLVM_LIBDIR_SUFFIX=64
1512+
%endif
1513+
15101514
%if %{with gold}
15111515
%global cmake_config_args %{cmake_config_args} -DLLVM_BINUTILS_INCDIR=%{_includedir}
15121516
%endif
@@ -1904,7 +1908,7 @@ install -p -m644 clang/bindings/python/clang/* %{buildroot}%{python3_sitelib}/cl
19041908
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/clang
19051909

19061910
# install scanbuild-py to python sitelib.
1907-
mv %{buildroot}%{install_libdir}/{libear,libscanbuild} %{buildroot}%{python3_sitelib}
1911+
mv %{buildroot}%{install_prefix}/lib/{libear,libscanbuild} %{buildroot}%{python3_sitelib}
19081912
# Cannot use {libear,libscanbuild} style expansion in py_byte_compile.
19091913
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/libear
19101914
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/libscanbuild
@@ -1918,7 +1922,7 @@ done
19181922
%else
19191923

19201924
# Not sure where to put these python modules for the compat build.
1921-
rm -Rf %{buildroot}%{install_libdir}/{libear,libscanbuild}
1925+
rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild}
19221926
rm %{buildroot}%{install_bindir}/scan-build-py
19231927

19241928
# Not sure where to put the emacs integration files for the compat build.
@@ -3423,6 +3427,9 @@ fi
34233427

34243428
#region changelog
34253429
%changelog
3430+
* Mon Jun 16 2025 Nikita Popov <[email protected]> - 20.1.6-9
3431+
- Use libdir suffix in versioned prefix
3432+
34263433
* Tue Jun 10 2025 Nikita Popov <[email protected]> - 20.1.6-8
34273434
- Invert symlink direction
34283435
- Fix i686 multilib installation (rhbz#2365079)

0 commit comments

Comments
 (0)