Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilib llvm riscv toolchain not work as expected #2

Open
fanghuaqi opened this issue Jan 19, 2023 · 0 comments
Open

Multilib llvm riscv toolchain not work as expected #2

fanghuaqi opened this issue Jan 19, 2023 · 0 comments

Comments

@fanghuaqi
Copy link

fanghuaqi commented Jan 19, 2023

Hi there,

I tried to download prebuilt toolchain from https://buildbot.embecosm.com/view/Releases/job/riscv32-clang-ubuntu2004-release/.

compiled a simple helloworld.

$ cat hello.c
#include <stdio.h>

int main(void) {
  printf("Hello World!\n");
  return 0;
}
riscv32-embecosm-clang-centos7-20230115
$ clang --target=riscv64-unknown-elf -march=rv64imafdc -mabi=lp64d -fuse-ld=lld  -o hello.elf hello.c
ld.lld: error: /tmp/hello-1b68d7.o: cannot link object files with different floating-point ABI
clang-16: error: ld command failed with exit code 1 (use -v to see invocation)
riscv32-embecosm-clang-centos7-20230115
$ clang --target=riscv64-unknown-elf -march=rv64imafdc -mabi=lp64d -o hello.elf hello.c
/home/share/devtools/riscv/llvmtoolchain/riscv32-embecosm-clang-centos7-20230115/bin/riscv64-unknown-elf-ld: /tmp/hello-924f32.o: can't link double-float modules with soft-float modules
/home/share/devtools/riscv/llvmtoolchain/riscv32-embecosm-clang-centos7-20230115/bin/riscv64-unknown-elf-ld: failed to merge target specific data of file /tmp/hello-924f32.o
clang-16: error: ld command failed with exit code 1 (use -v to see invocation)

I thought it might be caused by the compiler-rt is not multilib compiled, so link failed. Any suggestion about how to fix it.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant