Disable LTO for riscv64 (no gold linker support)

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
David Abdurachmanov 2021-04-16 10:32:15 +03:00
parent ec90e409db
commit 938c961da9
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB

View File

@ -6,7 +6,7 @@
Name: libcxxabi
Version: 11.0.0
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}.0.riscv64%{?dist}
Summary: Low level support for a standard C++ library
License: MIT or NCSA
URL: http://libcxxabi.llvm.org/
@ -62,6 +62,13 @@ sed -i 's|${LLVM_BINARY_DIR}/share/llvm/cmake|%{_libdir}/cmake/llvm|g' CMakeList
sed -i 's|#define _LIBCXXABI_ARM_EHABI||g' include/__cxxabi_config.h
%endif
%ifarch riscv64
# Disable LTO on RISC-V.
# RISC-V does not have gold linker support.
# /usr/bin/ld: /usr/bin/../lib64/LLVMgold.so: error loading plugin: /usr/bin/../lib64/LLVMgold.so: cannot open shared object file: No such file or directory
%global _lto_cflags %{nil}
%endif
%ifarch s390 s390x
%if 0%{?fedora} < 26
# clang requires z10 at minimum
@ -105,6 +112,9 @@ cp -a include/* %{buildroot}%{_includedir}
%{_libdir}/libc++abi.a
%changelog
* Fri Apr 16 2021 David Abdurachmanov <david.abdurachmanov@gmail.com> - 11.0.0-1.0.riscv64
- Disable LTO for RISC-V due to lack of gold linker
* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1
- Fix NVR