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

Can not complie or1k code using clang, it has some errors #1

Open
dssds opened this issue Apr 14, 2017 · 1 comment
Open

Can not complie or1k code using clang, it has some errors #1

dssds opened this issue Apr 14, 2017 · 1 comment

Comments

@dssds
Copy link

dssds commented Apr 14, 2017

I build llvm and clang cross compile environment, but test has error:
USE follow command:
clang -O0 -emit-llvm -target or1k-linux filename.c -S -o filename.ll --sysroot /opt/or1k-tool-chain/or32-linux/ -I /opt/or1k-tool-chain/or32-linux/include/
clang hello.ll -target or1k-linux -c -o hello.o
##############but I can't generate ELF FIles
clang hello.o -target or1k -o hello
/usr/bin/ld: hello.o: Relocations in generic ELF (EM: 92)
hello.o: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
clang-3.9: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)
clang hello.o -target or1k -o hello --sysroot /opt/or1k-tool-chain/or32-linux/ -I /opt/or1k-tool-chain/or32-linux/include/ -L /opt/or1k-tool-chain/or32-linux/lib/
/usr/bin/ld: hello.o: Relocations in generic ELF (EM: 92)
hello.o: could not read symbols: File in wrong format
collect2: error: ld returned 1 exit status
clang-3.9: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)

@eccentricshuvo
Copy link

How did you install it? Would you please tell me?

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

2 participants