[LLVMdev] LLVM-gcc for ARM

corina s corina_fff at yahoo.com
Sun Jan 17 04:26:14 PST 2010


I recompiled the LLVM-gcc with these options:

.../llvm-gcc4.2-2.6.source/configure --prefix=`pwd`/../install --program-prefix=llvm- --enable-llvm=/home/LLVM/llvm-2.6/ --enable-languages=c  --disable-libssp  --with-gnu-ld --with-gnu-as  --with-arch=armv7-a  --target=arm-elf

It compiles successfuly.

make install.

But when compiling a file :

llvm-gcc a.c
Assembler messages:
Fatal error: Invalid -march= option: `armv7-a'

Any ideas?


Thank you,
Corina


--- On Sun, 1/17/10, corina s <corina_fff at yahoo.com> wrote:

From: corina s <corina_fff at yahoo.com>
Subject: Re: [LLVMdev] LLVM-gcc for ARM
To: llvmdev at cs.uiuc.edu, anton at korobeynikov.info
Date: Sunday, January 17, 2010, 1:36 AM

Moreover, 

 ../llvm-gcc4.2-2.6.source/configure --prefix=`pwd`/../install --program-prefix=llvm- --enable-llvm=/home/LLVM/llvm-2.6/ --enable-languages=c,c++  
--with-gnu-ld=/home/arm/bin/arm-elf-ld 
--with-gnu-as=/home/arm/bin/arm-elf-as  
--with-arch=armv7  
--target=arm-elf

and then make target=arm-elf gives the following error:

Unknown arch used in --with-arch=armv7

Thanks.

--- On Sun, 1/17/10, corina s <corina_fff at yahoo.com> wrote:

From: corina s <corina_fff at yahoo.com>
Subject: Re: [LLVMdev] LLVM-gcc for ARM
To: "Anton Korobeynikov" <anton at korobeynikov.info>, llvmdev at cs.uiuc.edu
Date: Sunday, January 17, 2010, 1:00 AM

Thanks for your tips.. But I'm still getting errors.

.../llvm-gcc4.2-2.6.source/configure --prefix=`pwd`/../install --program-prefix=llvm- --enable-llvm=/home/LLVM/llvm-2.6/ --enable-languages=c,c++  --with-gnu-ld=/home/arm/bin/arm-elf-ld 
--with-gnu-as=/home/arm/bin/arm-elf-as  
--with-cpu=cortex-a8  
--target=arm-elf

Errors:
>>
checking for g++ that supports -ffunction-sections -fdata-sections... yes
configure: error: No support for this host/target combination..
make[1]: *** [configure-target-libstdc++-v3] Error 1
>>

Thank you for your
 help,
Corina.

--- On Sat, 1/16/10, Anton Korobeynikov <anton at korobeynikov.info> wrote:

From: Anton Korobeynikov <anton at korobeynikov.info>
Subject: Re: [LLVMdev] LLVM-gcc for ARM
To: "corina s" <corina_fff at yahoo.com>
Cc: llvmdev at cs.uiuc.edu
Date: Saturday, January 16, 2010, 6:09 PM

Hello

> /tmp/ccm99Neh.s:711: Error: selected
 processor does not support `sxtb r1,r1'
> make[3]: *** [libgcc/thumb/unwind-dw2-fde.o] Error 1
>
> Any ideas?
Yes. LLVM defaults to ARMv5 in codegeneration and does not support
ARMv4. Without any extra option arm-elf-as assumes ARMv4 and thus
gives you these errors. So:

1. If your desired target platform is ARMv4 and not newer - then
you're out of luck
2. Otherwise - add --with-cpu or --with-arch to llvm-gcc configure to
select the processor / arch desired.

It seems that you're interested in Cortex CPUs
("/tmp/arm-cortex-toolchain"), then your desired arch is armv7,
configure with --with-arch=armv7 or e.g. --with-cpu=cortex-a8

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University





      
-----Inline Attachment Follows-----

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



      
-----Inline Attachment Follows-----

_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100117/ddc6a367/attachment.html>


More information about the llvm-dev mailing list