<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 18, 2009, at 11:30 AMPDT, Misha Brukman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Can someone with llvm-gcc/ARM expertise (Dale?) please review Sandeep's patch?  The patch works for me in building an LLVM-based cross-compiler from x86_64/Linux to ARM/Linux.<br>I have been able to build without the patch to the asm file, but several people have reported needing the asm patch on <a href="http://llvm.org/PR2545">http://llvm.org/PR2545</a> .</blockquote><div><br></div><div>Looks OK to me.  The asm file is the only thing I'd have reservations about (that isn't marked as a local change, btw, and I don't think it was), but the parentheses should work fine.</div><br><blockquote type="cite"><div class="gmail_quote">On Thu, Mar 12, 2009 at 8:39 PM, Sandeep Patel <span dir="ltr"><<a href="mailto:deeppatel1987@gmail.com">deeppatel1987@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Attached is the patch I've been building arm-eabi with, which might<br> help with linux-gnueabi. I disable multilib to get around several bugs<br> with thumb. I build cross binutils first, then llvm, then llvm-gcc<br> with newlib merged in.<br> <br> The following bugs need to be addressed for these non-Darwin ARM targets:<br> 1388<br> 2313<br> 2545<br> 2985<br> <br> deep<br> <div><div></div><div class="h5"><br> On Fri, Mar 13, 2009 at 12:30 AM, Misha Brukman <<a href="mailto:brukman@gmail.com">brukman@gmail.com</a>> wrote:<br> > On Thu, Mar 12, 2009 at 6:17 AM, Dietmar Ebner <<a href="mailto:ebner@complang.tuwien.ac.at">ebner@complang.tuwien.ac.at</a>><br> > wrote:<br> >><br> >> On Mar 11, 2009, at 9:44 PM, Misha Brukman wrote:<br> >> > The problem I've had is building an LLVM cross-compiler from Linux/<br> >> > x86 to Linux/ARM (as has another llvm-dev poster).  Someone<br> >> > mentioned to me off-list that he managed to get it to build, but I<br> >> > haven't been able to reproduce the build using his instructions<br> >> > (I'll post my results in another thread).<br> >><br> >> I've been successfully experimenting with an arm-softfloat-linux-gnu<br> >> cross-compiler at the time of llvm 2.1. The easiest way to get this<br> >> working is to use Dan Kegel's crosstool to build a regular gcc<br> >> toolchain. This will give you binutils, libgcc, and glibc, which you<br> >> will need anyway.<br> ><br> > I've been trying to build for the target arm-none-linux-gnueabi, using the<br> > appropriate pre-built CodeSourcery toolchain, hence avoiding building my own<br> > gcc crosstool prior to starting building LLVM and LLVM-GCC.  LLVM builds<br> > just fine, it's building llvm-gcc that gives me this error:<br> ><br> > gcc -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wwrite-strings<br> > -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -DGENERATOR_FILE<br> > -I. -Ibuild -I../../../../src/llvm-gcc4.2-2.5.source/gcc<br> > -I../../../../src/llvm-gcc4.2-2.5.source/gcc/build<br> > -I../../../../src/llvm-gcc4.2-2.5.source/gcc/../include<br> > -I../../../../src/llvm-gcc4.2-2.5.source/gcc/../libcpp/include<br> > -I../../../../src/llvm-gcc4.2-2.5.source/gcc/../libdecnumber<br> > -I../libdecnumber -I/tmp/llvm-project/install/x86_64-arm/llvm/include<br> > -I/tmp/llvm-project/src/llvm-2.5/include -DENABLE_LLVM<br> > -I/tmp/llvm-project/install/x86_64-arm/llvm/include  -D_DEBUG  -D_GNU_SOURCE<br> > -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS   -o build/gencondmd.o<br> > build/gencondmd.c<br> ><br> > ../../../../src/llvm-gcc4.2-2.5.source/gcc/config/arm/<a href="http://arm.md:4788" target="_blank">arm.md:4788</a>: error:<br> > ‘MACHO_DYNAMIC_NO_PIC_P’ undeclared here (not in a function)<br> ><br> > This tells me there are some Darwin-specific bits in <a href="http://arm.md" target="_blank">arm.md</a> which shouldn't<br> > be there (MachO is Mac OS X-specific).  I'm using the attached script<br> > llvm-arm-crosstool.sh to configure/build/install LLVM and LLVM-GCC from the<br> > 2.5 release.  If anyone wants to try it out and see if it works for them,<br> > I'd love to hear their experiences.<br> ><br> > If any ARM/GCC experts know how to fix <a href="http://arm.md" target="_blank">arm.md</a> to not refer to<br> > Darwin-specific macros, that would be great, too.<br> ><br> >> Building llvm-gcc was relatively painless. The only problem I've<br> >> encountered was that my target had no hardware floating point support<br> >> and the endianess for the softfloat implementation (libgcc) differed<br> >> from integer endianess, which required some patches at the llvm side.<br> >> I have not checked if this is still necessary. If you run into the<br> >> same problems, I would be happy to share the patch (which I have<br> >> updated to llvm 2.4 at some point).<br> ><br> > I would be interested in seeing your patch, if you wouldn't mind sharing<br> > it.  Bonus points if you have a script similar to mine above to simplify the<br> > entire process, or your notes/directions that I can convert into an<br> > easy-to-run script.  :-)<br> ><br> > Thanks,<br> > Misha<br> ><br> </div></div><div><div></div><div class="h5">> _______________________________________________<br> > LLVM Developers mailing list<br> > <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br> ><br> ><br> </div></div><br>_______________________________________________<br> LLVM Developers mailing list<br> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br> <br></blockquote></div><br> _______________________________________________<br>LLVM Developers mailing list<br>LLVMdev@cs.uiuc.edu         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></body></html>