Hi,
I use the crosstool build script to build a crosscompiler for ARM. I get the
following error when compilng "helloworld" program:
llvm-gcc hello.c -o hello
as: unrecognized option `-meabi=4'
I know that the reason is not to get proper cross assembler. It tries to use the
native assembler but I am unable to fix the problem. I use
llvm-gcc -### hello.c -o hello and see the following going on:
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /MinGW/llvm-project/src/llvm-gcc-4.2/configure --enable-languag
es=c --enable-bindings=none --disable-threads --enable-llvm=/usr/local/crosstool
/arm-none-linux-gnueabi/llvm --disable-gold --disable-multilib --prefix=/usr/loc
al/crosstool/arm-none-linux-gnueabi/llvm-gcc-4.2 --disable-shared --disable-libs
sp --program-prefix=llvm- --disable-bootstrap --disable-libmudflap --target=arm-
none-linux-gnueabi --disable-libstdcxx-pch --enable-optimized --with-as=/usr/loc
al/crosstool/codesourcery/arm-2010q1/bin/arm-none-linux-gnueabi-as --with-ld=/us
r/local/crosstool/codesourcery/arm-2010q1/bin/arm-none-linux-gnueabi-ld --with-s
ysroot=/usr/local/crosstool/codesourcery/arm-2010q1/arm-none-linux-gnueabi/libc
Thread model: single
gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build)
"c:/mingw/msys/1.0/local/crosstool/arm-none-linux-gnueabi/llvm-gcc-4.2/bin/../l
ibexec/gcc/arm-none-linux-gnueabi/4.2.1/cc1.exe" "-quiet"
"-iprefix" "c:\\mingw\
\msys\\1.0\\local\\crosstool\\arm-none-linux-gnueabi\\llvm-gcc-4.2\\bin\\../lib/
gcc/arm-none-linux-gnueabi/4.2.1/" "hello.c" "-quiet"
"-dumpbase" "hello.c" "-au
xbase" "hello" "-o"
"D:/DOCUME~2/AZIM/LOCALS~1/Temp/ccO28l0y.s"
"as" "-meabi=4" "-o"
"D:/DOCUME~2/AZIM/LOCALS~1/Temp/ccs3L4rX.o" "D:/DOCUME~2/A
ZIM/LOCALS~1/Temp/ccO28l0y.s"
"c:/mingw/msys/1.0/local/crosstool/arm-none-linux-gnueabi/llvm-gcc-4.2/bin/../l
ibexec/gcc/arm-none-linux-gnueabi/4.2.1/collect2.exe"
"--sysroot=C:/MinGW/msys/1
.0/local/crosstool/codesourcery/arm-2010q1/arm-none-linux-gnueabi/libc"
"--eh-fr
ame-hdr" "-dynamic-linker" "/lib/ld-linux.so.3"
"-X" "-m" "armelf_linux_eabi" "-
o" "hello"
"C:/MinGW/msys/1.0/local/crosstool/codesourcery/arm-2010q1/arm-none-l
inux-gnueabi/libc/usr/lib/crt1.o"
"C:/MinGW/msys/1.0/local/crosstool/codesourcer
y/arm-2010q1/arm-none-linux-gnueabi/libc/usr/lib/crti.o"
"c:/mingw/msys/1.0/loca
l/crosstool/arm-none-linux-gnueabi/llvm-gcc-4.2/bin/../lib/gcc/arm-none-linux-gn
ueabi/4.2.1/crtbegin.o"
"-Lc:/mingw/msys/1.0/local/crosstool/arm-none-linux-gnue
abi/llvm-gcc-4.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1"
"-Lc:/mingw/msys/1
.0/local/crosstool/arm-none-linux-gnueabi/llvm-gcc-4.2/bin/../lib/gcc"
"-LC:/Min
GW/msys/1.0/local/crosstool/arm-none-linux-gnueabi/llvm-gcc-4.2/lib/gcc/arm-none
-linux-gnueabi/4.2.1"
"-Lc:/mingw/msys/1.0/local/crosstool/arm-none-linux-gnueab
i/llvm-gcc-4.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-
linux-gnueabi/lib"
"-LC:/MinGW/msys/1.0/local/crosstool/arm-none-linux-gnueabi/l
lvm-gcc-4.2/lib/gcc/arm-none-linux-gnueabi/4.2.1/../../../../arm-none-linux-gnue
abi/lib"
"-LC:/MinGW/msys/1.0/local/crosstool/codesourcery/arm-2010q1/arm-none-l
inux-gnueabi/libc/lib"
"-LC:/MinGW/msys/1.0/local/crosstool/codesourcery/arm-201
0q1/arm-none-linux-gnueabi/libc/usr/lib"
"D:/DOCUME~2/AZIM/LOCALS~1/Temp/ccs3L4r
X.o" "-lgcc" "-lc" "-lgcc"
"c:/mingw/msys/1.0/local/crosstool/arm-none-linux-gnu
eabi/llvm-gcc-4.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.2.1/crtend.o"
"C:/MinG
W/msys/1.0/local/crosstool/codesourcery/arm-2010q1/arm-none-linux-gnueabi/libc/u
sr/lib/crtn.o"
I also use the following commands to see where is linker and assembler.
$ which as
/mingw/bin/as.exe
$ which ld
/mingw/bin/ld.exe
It will be great if I get any suggestions or comments. Will a symbolic link to
the cross assembler and linker to these native assembler and linker solve the
problem?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20110124/d5ba6b07/attachment.html>