[cfe-users] clang sparc backend

2020-05-01 Thread suyash singh via cfe-users
does clang support sparc backend? I tried " clang -target sparc " to compile a simple c program on ubuntu(x86_64), clang detects sparc as a valid target but does not work with it. /usr/bin/as: unrecognized option '-Av8' clang-11: error: assembler command failed with exit code 1 How can I get cla

Re: [cfe-users] clang sparc backend

2020-05-03 Thread suyash singh via cfe-users
btimer.c is the file /usr/bin/ld: /tmp/btimer-d33eb1.o: Relocations in generic ELF (EM: 2) /usr/bin/ld: /tmp/btimer-d33eb1.o: Relocations in generic ELF (EM: 2) /tmp/btimer-d33eb1.o: error adding symbols: File in wrong format collect2: error: ld returned 1 exit status clang-11: error: linker (via

Re: [cfe-users] clang sparc backend

2020-05-03 Thread suyash singh via cfe-users
Okay so I used -fuse-ld=lld and it kind of solved the problem but ld.lld: error: /tmp/btimer-cd0442.o is incompatible with elf64-x86-64 collect2: error: ld returned 1 exit status clang-11: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation) On Sun, May 3, 2020 at 3:

[cfe-users] clang sparc: generated .o file incompatible with elf64-x86-64

2020-05-04 Thread suyash singh via cfe-users
I am trying to cross compile with clang and run Undefined Behavior Sanitizer for .c file *Command I am running* clang -target sparc -integrated-as -fuse-ld=lld -fsanitize=undefined test1.c clang is the cross compiler sparc is the target architecture. -integrated-as to use the llvm assembler -