[LLVMdev] Question about compiling LLVM through cross-compiler for ARM

Anton Korobeynikov anton at korobeynikov.info
Wed Nov 21 09:31:49 PST 2012


> It is done. Then, I should copy this version on my image and then boot the image with gem5. The
> problem is when I try to run llvm-commands in gem5, they don't work and said : "cannot execute binary file".
What does "file" says on the binary?

> This means that I couldn't cross-compile the llvm for ARM to work on ARM!
Something is broken on your side. I can definitely cross-compile LLVM to mingw32

On Wed, Nov 21, 2012 at 4:12 PM, Negar Mir <nmiralaei at gmail.com> wrote:
> Hi Anton,
>
> Sorry for the brief description. The problem is:
>
> I am trying to make llvm commands working in my Ubuntu-ARM image within
> gem5.
> After downloading clang+llvm, I tried to build and configure llvm by using
> cross-compiler with the following commands.
>
> ../llvm/configure --host=arm-none-linux-gnueabi --target=arm-none-linux-
> gnueabi --prefix=/path/to/install --with-sysroot=/usr/arm-linux-gnueabi
>
>
> It is done. Then, I should copy this version on my image and then boot the
> image with gem5. The problem is when I try to run llvm-commands in gem5,
> they don't work and said : "cannot execute binary file". This means that I
> couldn't cross-compile the llvm for ARM to work on ARM! I need some guidance
> about how to cross-compile llvm which can be run on the ARM machine. I think
> the version I am making now is host in X86 but generate ARM version. I need
> the host be ARM and the generated code be ARM as well. I hope I could
> describe the problem clearly! Thanks in advance for your help.
>
> Cheers
> Negar
>
>
> On Tue, Nov 20, 2012 at 7:46 PM, Anton Korobeynikov
> <anton at korobeynikov.info> wrote:
>>
>> Hello
>>
>> It will be really great if you'd provide which problems you had. Just
>> "couldn't get" is definitely not enough for any suggestion.
>> Unfortunately, telepathy modules are not mainstream yet ;)
>>
>> On Tue, Nov 20, 2012 at 7:56 PM, Negar Mir <nmiralaei at gmail.com> wrote:
>> > Hi All,
>> >
>> > I'm trying to compile clang+llvm on my desktop with cross-compiler to be
>> > able to work with llvm commands in ubuntu-arm image whithin gem5.
>> > If anybody has done this before I'd be so thankful to know the exact
>> > process
>> > and commands. I tried to configure llvm as follows but I couldn't get
>> > the
>> > arm-arm version correctly. To sum up, I need to cross-compile llvm for
>> > ARM
>> > to work in gem5 through the ubuntu image for ARM systems.
>> >
>> > ../llvm/configure --host=arm-none-linux-gnueabi
>> > --target=arm-none-linux-gnueabi --prefix=/path/to/install
>> > --with-sysroot=/usr/arm-linux-gnueabi
>> >
>> > Best regards
>> > Negar
>> >
>> > _______________________________________________
>> > LLVM Developers mailing list
>> > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>> >
>>
>>
>>
>> --
>> With best regards, Anton Korobeynikov
>> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
>



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



More information about the llvm-dev mailing list