Negar Mir
2012-Nov-20 15:56 UTC
[LLVMdev] Question about compiling LLVM through cross-compiler for ARM
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121120/6fca0327/attachment.html>
Anton Korobeynikov
2012-Nov-20 19:46 UTC
[LLVMdev] Question about compiling LLVM through cross-compiler for ARM
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
Anton Korobeynikov
2012-Nov-21 17:31 UTC
[LLVMdev] Question about compiling LLVM through cross-compiler for ARM
> 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
Anton Korobeynikov
2012-Nov-21 20:02 UTC
[LLVMdev] Question about compiling LLVM through cross-compiler for ARM
>> > 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.> 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 -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Negar Mir
2012-Nov-21 20:14 UTC
[LLVMdev] Question about compiling LLVM through cross-compiler for ARM
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 >Cheers Negar -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121121/4fccef1a/attachment.html>
Maybe Matching Threads
- [LLVMdev] Question about compiling LLVM through cross-compiler for ARM
- [LLVMdev] Question about compiling LLVM through cross-compiler for ARM
- [LLVMdev] Question about compiling LLVM through cross-compiler for ARM
- [LLVMdev] Running cross compiled binaries for ARM on gem5
- [LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?