From 221b2ca46ac548b27f58f8106a1600d65392a76d Mon Sep 17 00:00:00 2001 From: jca Date: Thu, 10 Mar 2022 23:24:30 +0000 Subject: [PATCH] Downgrade RISCV ABI mismatch error to a warning This lets lld link code with object files created with ld -b binary, as used by several ports (mupdf, postgresql-pllua, various games). Upstream report with an unfinished diff: https://reviews.llvm.org/D106378 ok kettenis@ --- gnu/llvm/lld/ELF/Arch/RISCV.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/llvm/lld/ELF/Arch/RISCV.cpp b/gnu/llvm/lld/ELF/Arch/RISCV.cpp index dad23fff91c..baf0173bf84 100644 --- a/gnu/llvm/lld/ELF/Arch/RISCV.cpp +++ b/gnu/llvm/lld/ELF/Arch/RISCV.cpp @@ -124,8 +124,8 @@ uint32_t RISCV::calcEFlags() const { target |= EF_RISCV_RVC; if ((eflags & EF_RISCV_FLOAT_ABI) != (target & EF_RISCV_FLOAT_ABI)) - error(toString(f) + - ": cannot link object files with different floating-point ABI"); + warn(toString(f) + + ": linking object files with different floating-point ABI"); if ((eflags & EF_RISCV_RVE) != (target & EF_RISCV_RVE)) error(toString(f) + -- 2.20.1