[LLVMdev] LLVM-gcc for ARM

corina s corina_fff at yahoo.com
Mon Jan 18 03:27:32 PST 2010


hi,

So...

I followed the following steps in order to compile the llvm-gcc frontend. The single problem is that mentioned in the previous message: 

llvm-gcc HelloWorld.c
/home/LLVM/install/lib/gcc/arm-elf/4.2.1/../../../../arm-elf/bin/ld: this linker was not configured to use sysroots
collect2: ld returned 1 exit status

1. I have compiled the binutils for the arm-none-eabi target. Options:
--target=arm-none-eabi --enable-multilib --with-gnu-as --with-gnu-ld --disable-nls --disable-libssp 

2. I have compiled the LLVM-gcc source code with the following options:
--target=arm-none-eabi --enable-llvm=path/to/llvm --with-arch=armv7-a --enable-languages=c --enable-multilib --with-newlib --enable-internetwork --without-headers --disable-shared --with-gnu-as --with-gnu-ld --disable-libssp 

3. Next: taken newlib-1.17.0 source code and configured with the following options:
--target=arm-none-eabi --eanble-multilib --with-gnu-as --with-gnu-ld --dlsable-nls --disable-libssp

4. finally have repeated the step 2, but with an extraoption:
--with-sysroot=/home/LLVM/build/arm-none-eabi/newlib/libc.

 
What I am supposed to do next? you said that I have to recompile binutils with --with-sysroot option?

Thank you.


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

From: Anton Korobeynikov <anton at korobeynikov.info>
Subject: Re: [LLVMdev] LLVM-gcc for ARM
To: "Rafael Espindola" <espindola at google.com>
Cc: "corina s" <corina_fff at yahoo.com>, llvmdev at cs.uiuc.edu
Date: Sunday, January 17, 2010, 11:22 PM

>> llvm-gcc HelloWorld.c
>> /home/LLVM/install/lib/gcc/arm-elf/4.2.1/../../../../arm-elf/bin/ld: this linker was not configured to use sysroots
>> collect2: ld returned 1 exit status
>>
>> I would appreciate some help from you.
>
> You have to pass --with-sysroot when building binutils too.
It might be easier just to build newlib during the build of llvm-gcc.
Also, I don't think libc is usable /exists for bare-metal target
(arm-elf/arm-eabi).

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



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


More information about the llvm-dev mailing list