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

Negar Mir nmiralaei at gmail.com
Wed Nov 21 12:14:09 PST 2012

On Wed, Nov 21, 2012 at 8:02 PM, Anton Korobeynikov <anton at korobeynikov.info
> wrote:

> >> > 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?
> > when I use commands like : "#arm-linux-gnueabi-clang test.c -o test" or
> any
> > other commands like lli, clang++, ... the error occurs.
> Sorry,  I won't be able to help you if you won't show the output as I
> requested.

Alright, the attached file is a photo of two terminals. the left hand side
is the error after I tried to cross-compile llvm with the mentioned
command. And, the right one is the error when I just used --host and
--target without considering the sys-root:
../llvm/configure --host=arm-none-linux-gnueabi --target=arm-none-linux-
gnueabi --prefix=/path/to/install

 I hope it will help.

> > Could you tell me how did you cross-compiled LLVM to mingw32? I mean the
> > command which you used for. So, I can compare it with mine and maybe find
> > something useful!
> Just straight --host / --target configure

> PS: There is "Reply All" button, please reply to the list as well
You're right, thank you.

> --
> 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/20121121/4fccef1a/attachment.html>

More information about the llvm-dev mailing list