Disable LTO with Clang on riscv64
For LTO to work with Clang we need gold linker, which is not ported to riscv64. Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
parent
88d068bc75
commit
f4aa489194
5
macros
5
macros
|
@ -363,7 +363,12 @@ print(result)
|
||||||
# way we can detect installing an unusable .o/.a file. This is on the TODO
|
# way we can detect installing an unusable .o/.a file. This is on the TODO
|
||||||
# list for F34.
|
# list for F34.
|
||||||
%_gcc_lto_cflags -flto=auto -ffat-lto-objects
|
%_gcc_lto_cflags -flto=auto -ffat-lto-objects
|
||||||
|
%ifnarch riscv64
|
||||||
%_clang_lto_cflags -flto=thin
|
%_clang_lto_cflags -flto=thin
|
||||||
|
%else
|
||||||
|
# riscv64 does not have ld.gold support needed for LTO with Clang.
|
||||||
|
%_clang_lto_cflags %{nil}
|
||||||
|
%endif
|
||||||
%_lto_cflags %{expand:%%{_%{toolchain}_lto_cflags}}
|
%_lto_cflags %{expand:%%{_%{toolchain}_lto_cflags}}
|
||||||
|
|
||||||
# Default fortification level.
|
# Default fortification level.
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
Summary: Red Hat specific rpm configuration files
|
Summary: Red Hat specific rpm configuration files
|
||||||
Name: redhat-rpm-config
|
Name: redhat-rpm-config
|
||||||
Version: %{baserelease}
|
Version: %{baserelease}
|
||||||
Release: 1.0.riscv64%{?dist}
|
Release: 1.1.riscv64%{?dist}
|
||||||
# No version specified.
|
# No version specified.
|
||||||
License: GPL+
|
License: GPL+
|
||||||
URL: https://src.fedoraproject.org/rpms/redhat-rpm-config
|
URL: https://src.fedoraproject.org/rpms/redhat-rpm-config
|
||||||
|
@ -252,6 +252,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
||||||
%doc buildflags.md
|
%doc buildflags.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 03 2023 David Abdurachmanov <davidlt@rivosinc.com> - 252-1.1.riscv64
|
||||||
|
- Set %%_clang_lto_cflags to %%{nil} on riscv64 to disable LTO with Clang
|
||||||
|
|
||||||
* Wed Mar 15 2023 David Abdurachmanov <davidlt@rivosinc.com> - 252-1.0.riscv64
|
* Wed Mar 15 2023 David Abdurachmanov <davidlt@rivosinc.com> - 252-1.0.riscv64
|
||||||
- Add riscv64 to gap supported arch list
|
- Add riscv64 to gap supported arch list
|
||||||
- Add riscv64 to nodejs supported arch list
|
- Add riscv64 to nodejs supported arch list
|
||||||
|
|
Loading…
Reference in New Issue