diff --git a/libcxxabi.spec b/libcxxabi.spec index c892aa3..19de21b 100644 --- a/libcxxabi.spec +++ b/libcxxabi.spec @@ -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 - 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