Restore lost patch: downgrade RISCV ABI mismatch error to a warning
authorjca <jca@openbsd.org>
Mon, 20 Nov 2023 04:53:11 +0000 (04:53 +0000)
committerjca <jca@openbsd.org>
Mon, 20 Nov 2023 04:53:11 +0000 (04:53 +0000)
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 gkoehler@ kettenis@

gnu/llvm/lld/ELF/Arch/RISCV.cpp

index 87887b3..b0864b5 100644 (file)
@@ -144,7 +144,7 @@ uint32_t RISCV::calcEFlags() const {
       target |= EF_RISCV_RVC;
 
     if ((eflags & EF_RISCV_FLOAT_ABI) != (target & EF_RISCV_FLOAT_ABI))
-      error(
+      warn(
           toString(f) +
           ": cannot link object files with different floating-point ABI from " +
           toString(ctx.objectFiles[0]));