From b99883cb6f9efee5046577a9d38994c949ec1f7d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 1 Aug 2024 10:55:17 +0000 Subject: [PATCH] Fix binary symlinks --- install.spec.inc | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/install.spec.inc b/install.spec.inc index 73cfb9a..9ca6aad 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -45,15 +45,6 @@ ln -s -t %{buildroot}%{_libdir}/bfd-plugins/ ../LLVMgold.so %else -# Add version suffix to binaries -for f in %{buildroot}/%{install_bindir}/*; do - filename=`basename $f` - if echo $filename | grep -e '%{maj_ver}'; then - continue - fi - ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} -done - # Create ld.so.conf.d entry mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{pkg_name_llvm}-%{_arch}.conf << EOF @@ -277,3 +268,15 @@ ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so rm -f %{buildroot}%{python3_sitearch}/six.* %endif #endregion + +%if %{with compat_build} +# Add version suffix to binaries. Do this at the end so it includes any +# additional binaries that may be been added by other steps. +for f in %{buildroot}/%{install_bindir}/*; do + filename=`basename $f` + if echo $filename | grep -e '%{maj_ver}'; then + continue + fi + ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} +done +%endif