mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-25 01:35:17 +00:00
Add i686 -> i386 compiler-rt symlink
This ports the change from https://src.fedoraproject.org/rpms/compiler-rt/pull-request/67 to big-merge, which is a bit more complicated here due to the explicit file lists. By default compiler_rt_triple is the same as llvm_triple. For x86 it is i386-redhat-linux-gnu instead, with a symlink to the llvm_triple i686-redhat-linux-gnu. And then the file list also needs to ship that symlink.
This commit is contained in:
parent
21909abc79
commit
4f3c9f6743
2 changed files with 23 additions and 5 deletions
|
@ -511,15 +511,20 @@
|
||||||
%{_prefix}/lib/clang/%{maj_ver}/share/*.txt
|
%{_prefix}/lib/clang/%{maj_ver}/share/*.txt
|
||||||
|
|
||||||
# Files that appear on all targets
|
# Files that appear on all targets
|
||||||
%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/libclang_rt.*
|
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/libclang_rt.*
|
||||||
|
|
||||||
%ifnarch s390x
|
%ifnarch s390x
|
||||||
%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtbegin.o
|
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/clang_rt.crtbegin.o
|
||||||
%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/clang_rt.crtend.o
|
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/clang_rt.crtend.o
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifnarch %{ix86} s390x
|
%ifnarch %{ix86} s390x
|
||||||
%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}/liborc_rt.a
|
%{_prefix}/lib/clang/%{maj_ver}/lib/%{compiler_rt_triple}/liborc_rt.a
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Additional symlink if two triples are in use.
|
||||||
|
%if "%{llvm_triple}" != "%{compiler_rt_triple}"
|
||||||
|
%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
|
@ -202,10 +202,23 @@ echo "--gcc-triple=%{_target_cpu}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{
|
||||||
|
|
||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
|
|
||||||
|
# Triple where compiler-rt libs are installed. If it differs from llvm_triple, then there is
|
||||||
|
# also a symlink llvm_triple -> compiler_rt_triple.
|
||||||
|
%global compiler_rt_triple %{llvm_triple}
|
||||||
|
|
||||||
%ifarch ppc64le
|
%ifarch ppc64le
|
||||||
# Fix install path on ppc64le so that the directory name matches the triple used
|
# Fix install path on ppc64le so that the directory name matches the triple used
|
||||||
# by clang.
|
# by clang.
|
||||||
mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/ppc64le-redhat-linux-gnu
|
mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifarch %{ix86}
|
||||||
|
# Fix install path on ix86 so that the directory name matches the triple used
|
||||||
|
# by clang on both actual ix86 (i686) and on x86_64 with -m32 (i386):
|
||||||
|
%global compiler_rt_triple i386-redhat-linux-gnu
|
||||||
|
%if "%{llvm_triple}" != "%{compiler_rt_triple}"
|
||||||
|
ln -s %{compiler_rt_triple} %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{llvm_triple}
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
Loading…
Reference in a new issue