ankur jain
2010-Dec-06 06:52 UTC
[LLVMdev] wxGTK sample app compiled by llvm crashes on arm
Thanx for a prompt reply. I will definitely try llvm 2.8 as per your suggestion. However Step 1 and Step 2 are working for me in case of a simple hello world program on arm processor . Similarly I am able to run a GTK application on arm. However while running wxGTKwidget app it crashes while allocation of memory. As I mentioned earlier, If I explicitly allocate memory using new operation then everything works fine. Please let me know why do we actually fail without using new, that to a arbitrary pointer which is never used in the program. On Fri, Dec 3, 2010 at 6:31 PM, Anton Korobeynikov <anton at korobeynikov.info>wrote:> > I am using llvm-2.7 to run a native(executable) on a arm processor. > ARM was pretty much broken in 2.7. Consider using at least 2.8 > > > ../llvm-gcc-4.2-2.7.source/configure --prefix=/home//gcc-disable-shared > --enable-languages=c++,c --enable-checking --enable-llvm=/home/ llvm-objects > --disable-bootstrap --disable-multilib > You have to configure llvm-gcc as cross-arm compiler. > > > Step 1. llvm-gcc -O3 -emit-llvm minimal.cpp -c -o minimal.bc `wxconfig > –cxxflags` > > Step 2. llc minimal.bc –march=arm –o minimal.s (for generating arm > assembly code) > This won't work. You're trying to codegen x86 IR for ARM. > > -- > 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/20101206/86a4904f/attachment.html>
Anton Korobeynikov
2010-Dec-06 08:12 UTC
[LLVMdev] wxGTK sample app compiled by llvm crashes on arm
> memory. As I mentioned earlier, If I explicitly allocate memory using new > operation then everything works fine. Please let me know why do we actually > fail without using new, that to a arbitrary pointer which is never used in > the program.x86 and ARM have different ABIs, so you was just lucky. You can read e.g. http://llvm.org/docs/FAQ.html#platformindependent for more information. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
ankur jain
2010-Dec-06 08:56 UTC
[LLVMdev] wxGTK sample app compiled by llvm crashes on arm
Thanx again .. By the way I wanted to tell you that we have the same platform(linux) on host and target. On Mon, Dec 6, 2010 at 1:42 PM, Anton Korobeynikov <anton at korobeynikov.info>wrote:> > memory. As I mentioned earlier, If I explicitly allocate memory using > new > > operation then everything works fine. Please let me know why do we > actually > > fail without using new, that to a arbitrary pointer which is never used > in > > the program. > x86 and ARM have different ABIs, so you was just lucky. You can read > e.g. http://llvm.org/docs/FAQ.html#platformindependent for more > information. > > -- > 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/20101206/01185eca/attachment.html>
Anton Korobeynikov
2010-Dec-06 10:47 UTC
[LLVMdev] wxGTK sample app compiled by llvm crashes on arm
> You said that, You have to configure llvm-gcc as cross-arm compiler. > I am not clear what does it actually mean ?? > For us , intel is the host machine and arm is the target machine .For this you need the cross-compiler (same as for normal gcc). So, basically configure llvm-gcc as a cross-compiler for your target platform the same way as you're doing this with the ordinary gcc. -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Anton Korobeynikov
2010-Dec-08 13:31 UTC
[LLVMdev] Fwd: wxGTK sample app compiled by llvm crashes on arm
---------- Forwarded message ---------- From: Anton Korobeynikov <anton at korobeynikov.info> Date: Wed, Dec 8, 2010 at 16:31 Subject: Re: [LLVMdev] wxGTK sample app compiled by llvm crashes on arm To: ankur jain <samyak3 at gmail.com> Hello,> I still have a query. Using llvm-gcc as cross-arm compiler will generate > bytecode specific to arm. > These bytecodes will work only on arm based platforms.Is it so ??Yes, as you already checked for x86 bytecode on ARM :)> This would > mean that we cannot have platform independent bytecodes as found in case of > java. We would be grateful to you for any comment on this.That's correct. C/C++ are not target neutral languages. You can read http://llvm.org/docs/FAQ.html#platformindependent for some more info. -- 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
Seemingly Similar Threads
- [LLVMdev] wxGTK sample app compiled by llvm crashes on arm
- [LLVMdev] wxGTK sample app compiled by llvm crashes on arm
- [LLVMdev] Fwd: wxGTK sample app compiled by llvm crashes on arm
- [LLVMdev] wxGTK sample app compiled by llvm crashes on arm
- [LLVMdev] wxGTK sample app compiled by llvm crashes on arm