陳韋任 (Wei-Ren Chen)
2012-Sep-26 02:48 UTC
[LLVMdev] [Questions] clang cross compilation and SimpleScalar simulation
Hi Jim, On Tue, Sep 25, 2012 at 10:52:58AM -0700, Jim Grosbach wrote:> These errors are from the assembler, not LLVM. Specifically, your binutils is > too old. Given that it doesn't even recognize the ".syntax" directive, they're > *very* much too old. You need to upgrade. > -JimShe said in her previous mail, P.S. Because I got error when I use arm-linux-gcc (gcc version 3.X or 4.X), I use officially recommended version 2.95,2. I don't know what's her problem while using newer toolchain. :/ 奕梅,you should use latest toolchain if possible, and post your problem here to see if it comes from LLVM/Clang or other place. Also, where do you read that version is recommended? Regards, chenwj -- Wei-Ren Chen (陳韋任) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj
陳奕梅
2012-Sep-26 07:21 UTC
[LLVMdev] [Questions] clang cross compilation and SimpleScalar simulation
Dear all I use arm-linux-gcc 2.95.2, because the code generated by version 3.X and 4.X can not run on SimpleScalar. So I use the arm-linux-gcc 2.95.2 *only*, the version is recommended by SimpleScalar. The code generated by arm-linux-gcc 2.95.2 can run on SimpleScalar. Now I want to use llvm/clang to generate ARM assembly code and arm-linux-gcc 2.95.2 to be assembler. Unfortunately, I got some error messages below : hello.s: Assembler messages: hello.s:1: Error: Unknown pseudo-op: `.syntax' hello.s:2: Error: Unknown pseudo-op: `.eabi_attribute' hello.s:3: Error: Unknown pseudo-op: `.eabi_attribute' hello.s:4: Error: Unknown pseudo-op: `.eabi_attribute' hello.s:5: Error: Unknown pseudo-op: `.eabi_attribute' hello.s:6: Error: Unknown pseudo-op: `.eabi_attribute' make: *** [all] Error 1 Then I try commends : $ clang -ccc-host-triple armv4-none-linux-gnueabi -c hello.c -emit-llvm -o hello.bc $ llc -O3 -o hello.s -march=arm -mcpu=strongarm1100 hello.bc $ arm-linux-gcc -mcpu=strongarm1100 hello.s -static -O3 -o hello I got some error messages: hello.s: Assembler messages: hello.s:1: Error: Unknown pseudo-op: `.syntax' hello.s:2: Error: Unknown pseudo-op: `.eabi_attribute' hello.s:3: Error: Unknown pseudo-op: `.eabi_attribute' hello.s:4: Error: Unknown pseudo-op: `.eabi_attribute' hello.s:5: Error: Unknown pseudo-op: `.eabi_attribute' hello.s:6: Error: Unknown pseudo-op: `.eabi_attribute' hello.s:14: Error: bad instruction `push {r11,lr}' hello.s:18: Error: bad instruction `pop {r11,lr}' hello.s:28: Warning: Unrecognized .section attribute: want a,w,x hello.s:28: Warning: Unrecognized .section attribute: want a,w,x hello.s:28: Error: Rest of line ignored. First ignored character is `,' P.S. The version recommended by SimpleScalar : gcc 2.95.2 binutils 2.10 glibc 2.1.3 Thanks a lot ! Best regards, :) Yi-Mei Chen 2012/9/26 陳韋任 (Wei-Ren Chen) <chenwj at iis.sinica.edu.tw>> Hi Jim, > > On Tue, Sep 25, 2012 at 10:52:58AM -0700, Jim Grosbach wrote: > > These errors are from the assembler, not LLVM. Specifically, your > binutils is > > too old. Given that it doesn't even recognize the ".syntax" directive, > they're > > *very* much too old. You need to upgrade. > > -Jim > > She said in her previous mail, > > P.S. Because I got error when I use arm-linux-gcc (gcc version 3.X or > 4.X), > I use officially recommended version 2.95,2. > > I don't know what's her problem while using newer toolchain. :/ > > 奕梅,you should use latest toolchain if possible, and post your problem > here > to see if it comes from LLVM/Clang or other place. Also, where do you read > that > version is recommended? > > Regards, > chenwj > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > Homepage: http://people.cs.nctu.edu.tw/~chenwj >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120926/848a1b48/attachment.html>
Jim Grosbach
2012-Sep-26 07:28 UTC
[LLVMdev] [Questions] clang cross compilation and SimpleScalar simulation
Simplescalar is not compatible with llvm because the binutils simplescalar is based on is ancient. Jim On Sep 26, 2012, at 12:21 AM, 陳奕梅 <ymchen at sslab.cs.nctu.edu.tw> wrote:> Dear all > > I use arm-linux-gcc 2.95.2, because the code generated by version 3.X and 4.X can not run on SimpleScalar. > So I use the arm-linux-gcc 2.95.2 *only*, the version is recommended by SimpleScalar. > The code generated by arm-linux-gcc 2.95.2 can run on SimpleScalar. > Now I want to use llvm/clang to generate ARM assembly code and arm-linux-gcc 2.95.2 to be assembler. > Unfortunately, I got some error messages below : > > hello.s: Assembler messages: > hello.s:1: Error: Unknown pseudo-op: `.syntax' > hello.s:2: Error: Unknown pseudo-op: `.eabi_attribute' > hello.s:3: Error: Unknown pseudo-op: `.eabi_attribute' > hello.s:4: Error: Unknown pseudo-op: `.eabi_attribute' > hello.s:5: Error: Unknown pseudo-op: `.eabi_attribute' > hello.s:6: Error: Unknown pseudo-op: `.eabi_attribute' > make: *** [all] Error 1 > > Then I try commends : > $ clang -ccc-host-triple armv4-none-linux-gnueabi -c hello.c -emit-llvm -o hello.bc > $ llc -O3 -o hello.s -march=arm -mcpu=strongarm1100 hello.bc > $ arm-linux-gcc -mcpu=strongarm1100 hello.s -static -O3 -o hello > > I got some error messages: > > hello.s: Assembler messages: > hello.s:1: Error: Unknown pseudo-op: `.syntax' > hello.s:2: Error: Unknown pseudo-op: `.eabi_attribute' > hello.s:3: Error: Unknown pseudo-op: `.eabi_attribute' > hello.s:4: Error: Unknown pseudo-op: `.eabi_attribute' > hello.s:5: Error: Unknown pseudo-op: `.eabi_attribute' > hello.s:6: Error: Unknown pseudo-op: `.eabi_attribute' > hello.s:14: Error: bad instruction `push {r11,lr}' > hello.s:18: Error: bad instruction `pop {r11,lr}' > hello.s:28: Warning: Unrecognized .section attribute: want a,w,x > hello.s:28: Warning: Unrecognized .section attribute: want a,w,x > hello.s:28: Error: Rest of line ignored. First ignored character is `,' > > P.S. > The version recommended by SimpleScalar : > gcc 2.95.2 > binutils 2.10 > glibc 2.1.3 > > Thanks a lot ! > > Best regards, :) > > Yi-Mei Chen > > 2012/9/26 陳韋任 (Wei-Ren Chen) <chenwj at iis.sinica.edu.tw> > Hi Jim, > > On Tue, Sep 25, 2012 at 10:52:58AM -0700, Jim Grosbach wrote: > > These errors are from the assembler, not LLVM. Specifically, your binutils is > > too old. Given that it doesn't even recognize the ".syntax" directive, they're > > *very* much too old. You need to upgrade. > > -Jim > > She said in her previous mail, > > P.S. Because I got error when I use arm-linux-gcc (gcc version 3.X or 4.X), > I use officially recommended version 2.95,2. > > I don't know what's her problem while using newer toolchain. :/ > > 奕梅,you should use latest toolchain if possible, and post your problem here > to see if it comes from LLVM/Clang or other place. Also, where do you read that > version is recommended? > > Regards, > chenwj > > -- > Wei-Ren Chen (陳韋任) > Computer Systems Lab, Institute of Information Science, > Academia Sinica, Taiwan (R.O.C.) > Tel:886-2-2788-3799 #1667 > Homepage: http://people.cs.nctu.edu.tw/~chenwj > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120926/1d1ca442/attachment.html>
Anton Korobeynikov
2012-Sep-26 07:45 UTC
[LLVMdev] [Questions] clang cross compilation and SimpleScalar simulation
> The version recommended by SimpleScalar : > gcc 2.95.2 > binutils 2.10 > glibc 2.1.3These versions are ancient: at least 12 years old. Surely they do no support the unified ARM assembler syntax. So, you're out of luck here - you need to use much newer versions of tools. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Possibly Parallel Threads
- [LLVMdev] [Questions] clang cross compilation and SimpleScalar simulation
- [LLVMdev] [Questions] clang cross compilation and SimpleScalar simulation
- [LLVMdev] [Questions] clang cross compilation and SimpleScalar simulation
- [LLVMdev] [Questions] clang cross compilation and SimpleScalar simulation
- [LLVMdev] [Questions] clang cross compilation and SimpleScalar simulation