[llvm-bugs] [Bug 44836] New: LTO doesn't work on RISC-V rv64imafdc

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 7 13:31:28 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=44836

            Bug ID: 44836
           Summary: LTO doesn't work on RISC-V rv64imafdc
           Product: new-bugs
           Version: 10.0
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: bero at lindev.ch
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Clang 10.0-rc1 on riscv64-linux (RV64IMAFDC) breaks if LTO is enabled --
apparently the correct ABI isn't passed to the linker:

$ clang -march=rv64imafdc test.c
[works perfectly, binary works]
$ clang -march=rv64imafdc -flto test.c
/usr/bin/ld: /tmp/lto-llvm-f65f95.o: can't link soft-float modules with
double-float modules
/usr/bin/ld: failed to merge target specific data of file
/tmp/lto-llvm-f65f95.o
clang-10: error: linker command failed with exit code 1 (use -v to see
invocation)
$ clang -march=rv64imafdc -flto -fuse-ld=lld test.c
ld.lld: error: lto.tmp: cannot link object files with different floating-point
ABI
ld.lld: error: static-reloc.c:(.text+0x0): relocation R_RISCV_ALIGN requires
unimplemented linker relaxation; recompile with -mno-relax
ld.lld:
/builddir/build/BUILD/llvm-project-release-10.x/lld/ELF/Relocations.cpp:987:
uint64_t lld::elf::{anonymous}::OffsetGetter::get(uint64_t): Assertion
`pieces[i].inputOff <= off && "Relocation not in any piece"' failed.
Stack dump:
0.      Program arguments: /usr/bin/ld.lld --build-id --eh-frame-hdr -m
elf64lriscv -dynamic-linker /lib/ld-linux-riscv64-lp64d.so.1 -o a.out
/usr/bin/../lib64/gcc/riscv64-openmandriva-linux-gnu/9.2.1/../../../../lib64/crt1.o
/usr/bin/../lib64/gcc/riscv64-openmandriva-linux-gnu/9.2.1/crti.o
/usr/bin/../lib64/gcc/riscv64-openmandriva-linux-gnu/9.2.1/crtbegin.o
-L/usr/bin/../lib64/gcc/riscv64-openmandriva-linux-gnu/9.2.1
-L/usr/bin/../lib64/gcc/riscv64-openmandriva-linux-gnu/9.2.1/../../../../lib64
-L/usr/bin/../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/lib64/lp64d
-L/usr/lib64/lp64d
-L/usr/bin/../lib64/gcc/riscv64-openmandriva-linux-gnu/9.2.1/../../../../riscv64-openmandriva-linux-gnu/lib
-L/usr/bin/../lib64/gcc/riscv64-openmandriva-linux-gnu/9.2.1/../../..
-L/usr/bin/../lib -L/lib -L/usr/lib -plugin /usr/bin/../lib64/LLVMgold.so
/tmp/test-6791f6.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc
--as-needed -lgcc_s --no-as-needed
/usr/bin/../lib64/gcc/riscv64-openmandriva-linux-gnu/9.2.1/crtend.o
/usr/bin/../lib64/gcc/riscv64-openmandriva-linux-gnu/9.2.1/crtn.o 
clang-10: error: unable to execute command: Segmentation fault (core dumped)
clang-10: error: linker command failed due to signal (use -v to see invocation)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200207/ba7d7eac/attachment-0001.html>


More information about the llvm-bugs mailing list