diff --git a/llvm.spec b/llvm.spec index d696731..19a7cf8 100644 --- a/llvm.spec +++ b/llvm.spec @@ -48,7 +48,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine License: NCSA @@ -284,10 +284,6 @@ pathfix.py -i %{__python3} -pn \ %cmake_install mkdir -p %{buildroot}/%{_bindir} -mv %{buildroot}/%{pkg_bindir}/llvm-config %{buildroot}/%{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} - -# ghost presence -touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix} %if %{without compat_build} @@ -384,7 +380,6 @@ ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/ %else # Add version suffix to binaries -mkdir -p %{buildroot}/%{_bindir} for f in %{buildroot}/%{install_bindir}/*; do filename=`basename $f` ln -s ../../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix} @@ -416,6 +411,26 @@ rm -Rf %{build_install_prefix}/share/opt-viewer %endif +# llvm-config special casing. llvm-config is managed by update-alternatives. +# the original file must remain available for compatibility with the CMake +# infrastructure. Without compat, cmake points to the symlink, with compat it +# points to the original file. + +%if %{without compat_build} + +mv %{buildroot}/%{pkg_bindir}/llvm-config %{buildroot}/%{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} + +%else + +rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix} +(cd %{buildroot}/%{pkg_bindir} ; ln -s llvm-config llvm-config%{exec_suffix}-%{__isa_bits} ) + +%endif + +# ghost presence +touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix} + + %check # TODO: Fix the failures below @@ -545,6 +560,9 @@ fi %endif %changelog +* Mon May 17 2021 sguelton@redhat.com - 12.0.0-2 +- Fix handling of llvm-config + * Mon May 10 2021 Serge Guelton - 12.0.0-1 - 12.0.0 final release