[LLVMdev] using just llvm/clang for building mips llvm

Richard Pennington rich at pennware.com
Thu Mar 27 15:52:30 PDT 2014


On 03/27/2014 05:46 PM, reed kotler wrote:
> 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
> Hi 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
>
>
Hi Reed,

I'd be happy if you could try:

tar xvfpz ellcc-mips-linux-2014-Mar-24-07-32-26.tgz
ellcc/bin/ecc -target mips-ellcc-linux helloworld.c # Or some small test.
./a.out

Even better would be to follow that up with

svn co http://ellcc.org/svn/ellcc/trunk ellcc
cd ellcc
./build

That should compile itself with itself. I wouldn't expect you to invest 
the time to do that. ;-)

-Rich



More information about the llvm-dev mailing list