Disable LTO on riscv64

This requires ld.gold, which is not ported to riscv64.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-03-23 11:33:00 +02:00
parent e5470172c8
commit bf16dc98cb
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
1 changed files with 5 additions and 0 deletions

View File

@ -27,7 +27,12 @@
%global patch_ver 7
%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
%ifnarch riscv64
%global _lto_cflags -flto=thin
%else
# riscv64: gold is not supported on riscv64
%global _lto_cflags %nil
%endif
%if %{with compat_build}
%global pkg_name llvm%{maj_ver}