-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Description
| Bugzilla Link | 11276 |
| Resolution | FIXED |
| Resolved on | Jun 28, 2014 05:58 |
| Version | 2.9 |
| OS | Linux |
| Attachments | puts("hello world!"), clang -S output, gcc -S output |
| Reporter | LLVM Bugzilla Contributor |
| CC | @efriedma-quic |
Extended Description
On linux/ppc llvm 2.9 (using clang) generates assembler in darwin style that gnu as does not accept. A simple testcase with llvm and gcc output is attached.
It seems to be a simple case of ha16(x) versus x@ha and lo16(x) versus x@l where the formers are darwin style and latters gnu style. Using corresponding #defines and preprocessing clang's assembler will enable us to make a functioning program.
$ clang -v
Debian clang version 2.9-16 (tags/RELEASE_29/final) (based on LLVM 2.9)
Target: powerpc-unknown-linux-gnu
gcc version 4.6.1 (Debian 4.6.1-15)
gcc -std=c99 -S -o simple_gcc.s simple.c
clang -std=c99 -S -o simple_clang.s simple.c
$ clang -std=c99 -c -o simple_clang simple.c
/tmp/cc-jdQ4Dp.s: Assembler messages:
/tmp/cc-jdQ4Dp.s:14: Error: syntax error; found (', expected ,'
/tmp/cc-jdQ4Dp.s:14: Error: junk at end of line: (.L.str)' /tmp/cc-jdQ4Dp.s:15: Error: junk at end of line: (3)'
clang: error: assembler command failed with exit code 1 (use -v to see invocation)