In case anyone is interested.... We don't need to compile llvm/clang using gcc anymore for the building of mips hosted llvm compilers. We build a linux mips hosted compiler starting with llvm/clang on x86 linux using the normal configure scripts and then can use that resulting compiler to build further llvm/clang native compilers on the mips linux host. The cross compiler and native compiler driver for Mips works seamlessly (thanks to Simon Atanasyan) just as gcc does. For our build slave that is connected to the llvm build bots, we are using our native clang/llvm (built as above) to built the llc that is used for make check. I'm doing some more work to automate the testing of the recursed compilers and other verification on the mips target.
Reid Kleckner
2014-Mar-27 22:23 UTC
[LLVMdev] using just llvm/clang for building mips llvm
Congrats! On Thu, Mar 27, 2014 at 2:17 PM, reed kotler <rkotler at mips.com> wrote:> In case anyone is interested.... > > We don't need to compile llvm/clang using gcc anymore for the building of > mips hosted llvm compilers. > > We build a linux mips hosted compiler starting with llvm/clang on x86 > linux using the normal configure scripts and > then can use that resulting compiler to build further llvm/clang native > compilers on the mips linux host. > > The cross compiler and native compiler driver for Mips works seamlessly > (thanks to Simon Atanasyan) just as gcc does. > > For our build slave that is connected to the llvm build bots, we are using > our native clang/llvm (built as above) to built the llc > that is used for make check. > > I'm doing some more work to automate the testing of the recursed compilers > and other verification on the mips target. > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140327/e2f2009c/attachment.html>
And of course thanks to Akira Hatanaka for making the mips 32 code generator solid enough for all of this to work. On 03/27/2014 03:23 PM, Reid Kleckner wrote:> Congrats! > > > On Thu, Mar 27, 2014 at 2:17 PM, reed kotler <rkotler at mips.com > <mailto:rkotler at mips.com>> wrote: > > In case anyone is interested.... > > We don't need to compile llvm/clang using gcc anymore for the > building of mips hosted llvm compilers. > > We build a linux mips hosted compiler starting with llvm/clang on > x86 linux using the normal configure scripts and > then can use that resulting compiler to build further llvm/clang > native compilers on the mips linux host. > > The cross compiler and native compiler driver for Mips works > seamlessly (thanks to Simon Atanasyan) just as gcc does. > > For our build slave that is connected to the llvm build bots, we > are using our native clang/llvm (built as above) to built the llc > that is used for make check. > > I'm doing some more work to automate the testing of the recursed > compilers and other verification on the mips target. > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu> > http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140327/94ff2415/attachment.html>
Richard Pennington
2014-Mar-27 22:30 UTC
[LLVMdev] using just llvm/clang for building mips llvm
On 03/27/2014 04:17 PM, reed kotler wrote:> In case anyone is interested.... > > We don't need to compile llvm/clang using gcc anymore for the building > of mips hosted llvm compilers. > > We build a linux mips hosted compiler starting with llvm/clang on x86 > linux using the normal configure scripts and > then can use that resulting compiler to build further llvm/clang > native compilers on the mips linux host. > > The cross compiler and native compiler driver for Mips works > seamlessly (thanks to Simon Atanasyan) just as gcc does. > > For our build slave that is connected to the llvm build bots, we are > using our native clang/llvm (built as above) to built the llc > that is used for make check. > > I'm doing some more work to automate the testing of the recursed > compilers and other verification on the mips target.Hi Reed, Very cool. I'd love to know if my pre-compiled Mips toolchain for ELLCC (http://ellcc.org), downloadable from ftp://ellcc.org/pub, can actually run on a Mips. Any idea where I could find a Mips box to try it on? It was compiled using a clang based x86_64 compiler, by the way. The ARM binaries work just fine, at least on Fedora ARM Linux running under QEMU. -Rich
On 03/27/2014 03:30 PM, Richard Pennington wrote:> On 03/27/2014 04:17 PM, reed kotler wrote: >> In case anyone is interested.... >> >> We don't need to compile llvm/clang using gcc anymore for the >> building of mips hosted llvm compilers. >> >> We build a linux mips hosted compiler starting with llvm/clang on x86 >> linux using the normal configure scripts and >> then can use that resulting compiler to build further llvm/clang >> native compilers on the mips linux host. >> >> The cross compiler and native compiler driver for Mips works >> seamlessly (thanks to Simon Atanasyan) just as gcc does. >> >> For our build slave that is connected to the llvm build bots, we are >> using our native clang/llvm (built as above) to built the llc >> that is used for make check. >> >> I'm doing some more work to automate the testing of the recursed >> compilers and other verification on the mips target. > Hi Reed, > > Very cool. I'd love to know if my pre-compiled Mips toolchain for > ELLCC (http://ellcc.org), downloadable from ftp://ellcc.org/pub, can > actually run on a Mips. Any idea where I could find a Mips box to try > it on? > > It was compiled using a clang based x86_64 compiler, by the way. > The ARM binaries work just fine, at least on Fedora ARM Linux running > under QEMU. > > -RichHi Richard, I could try it on one of ours. I'll take a look over the weekend. Anything special I need to do? There are some fsf machines too that can be used for this purpose. I think that Rafael uses them sometimes. You could ask him how to do that. These edge pro routers are not too expensive and in principle you just need to nfs mount a file system and all should be cool. They run debian. http://www.ubnt.com/edgemax Our 64 bit compiler seems also to be okay but i have not finished verifying everything. I'm using a cavium board with support both 32 and 64 bit executables. Reed
Geting a seg fault. Have not investigted the cause. rkotler at mipsswbrd002:~/richard$ tar vfxz ~/Downloads/ellcc-mips-linux-2014-Mar-24-07-32-26.tgz rkotler at mipsswbrd002:~/richard/ellcc/bin$ gdb ./ecc GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "mips-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/rkotler/richard/ellcc/bin/ecc...done. (gdb) run Starting program: /home/rkotler/richard/ellcc/bin/ecc Program received signal SIGSEGV, Segmentation fault. 0x02ee15dc in __init_tls () (gdb) bt #0 0x02ee15dc in __init_tls () #1 0x02ebde44 in __init_libc () #2 0x02ebdebc in __libc_start_main () #3 0x00416ac4 in _start () (gdb) rkotler at mipsswbrd002:~/richard/ellcc/bin$ ls FileCheck ecc-c++filt ecc-ld.bfd ecc-size ppc-elf-as arm-elf-as ecc-elfedit ecc-nm ecc-strings ppc64-elf-as ecc ecc-embedspu ecc-objcopy ecc-strip sparc-elf-as ecc++ ecc-gdb ecc-objdump i386-elf-as x86_64-elf-as ecc-addr2line ecc-gprof ecc-ranlib microblaze-elf-as ecc-ar ecc-ld ecc-readelf mips-elf-as rkotler at mipsswbrd002:~/richard/ellcc/bin$ ./ecc Segmentation fault rkotler at mipsswbrd002:~/richard/ellcc/bin$ ./ecc-ar Segmentation fault rkotler at mipsswbrd002:~/richard/ellcc/bin$ On 03/27/2014 03:30 PM, Richard Pennington wrote:> On 03/27/2014 04:17 PM, reed kotler wrote: >> In case anyone is interested.... >> >> We don't need to compile llvm/clang using gcc anymore for the >> building of mips hosted llvm compilers. >> >> We build a linux mips hosted compiler starting with llvm/clang on x86 >> linux using the normal configure scripts and >> then can use that resulting compiler to build further llvm/clang >> native compilers on the mips linux host. >> >> The cross compiler and native compiler driver for Mips works >> seamlessly (thanks to Simon Atanasyan) just as gcc does. >> >> For our build slave that is connected to the llvm build bots, we are >> using our native clang/llvm (built as above) to built the llc >> that is used for make check. >> >> I'm doing some more work to automate the testing of the recursed >> compilers and other verification on the mips target. > Hi Reed, > > Very cool. I'd love to know if my pre-compiled Mips toolchain for > ELLCC (http://ellcc.org), downloadable from ftp://ellcc.org/pub, can > actually run on a Mips. Any idea where I could find a Mips box to try > it on? > > It was compiled using a clang based x86_64 compiler, by the way. > The ARM binaries work just fine, at least on Fedora ARM Linux running > under QEMU. > > -Rich