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@korobeynikov.info wrote:
> From: Anton Korobeynikov anton@korobeynikov.info
> Subject: Re: [LLVMdev] LLVM-gcc for ARM
> To: “Rafael Espindola” espindola@google.com
> Cc: “corina s” corina_fff@yahoo.com, llvmdev@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
|
What I am supposed to do next? you said that I have to recompile binutils with --with-sysroot option?
It is not an extra step. You have to add --with-sysroot to step 1.
Thank you.
Cheers,
OK. Now I have obtained some other errors, I think that they are generated due to the operating system.
/home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/bin/ld: ERROR: /home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/lib/crt0.o uses FPA instructions, whereas a.out does not
/home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/bin/ld: ERROR: /home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/lib/crt0…o uses hardware FP, whereas a.out uses software FP
/home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/bin/ld: failed to merge target specific data of file /home/LLVM/install/bin/…/lib/gcc/arm-elf/4…2.1/…/…/…/…/arm-elf/lib/crt0.o
/home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/bin/ld: ERROR: /home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/lib/libc.a(lib_a-atexit.o) uses FPA instructions, whereas a.out does not
/home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/bin/ld: ERROR: /home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/lib/libc.a(lib_a-atexit…o) uses hardware FP, whereas a.out uses software FP
/home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/bin/ld: failed to merge target specific data of file /home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/lib/libc.a(lib_a-atexit.o)
/home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/bin/ld: ERROR: /home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/lib/libc.a(lib_a-exit.o) uses FPA instructions, whereas a.out does not
/home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/bin/ld: ERROR: /home/LLVM/install/bin/…/lib/gcc/arm-elf/4.2.1/…/…/…/…/arm-elf/lib/libc…a(lib_a-exit.o) uses hardware FP, whereas a.out uses software FP
Can you tell me how can I fix this last(hopefully) problem?
Thanks.
— On Mon, 1/18/10, Rafael Espindola espindola@google.com wrote:
> From: Rafael Espindola espindola@google.com
> Subject: Re: [LLVMdev] LLVM-gcc for ARM
> To: “corina s” corina_fff@yahoo.com
> Cc: anton@korobeynikov.info, llvmdev@cs.uiuc.edu
> Date: Monday, January 18, 2010, 4:26 AM
>
> > What I am supposed to do next? you said that I have to recompile binutils with --with-sysroot option?
>
> It is not an extra step. You have to add --with-sysroot to step 1.
>
> > Thank you.
>
> Cheers,
> –
> Rafael Ávila de Espíndola
|