Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Oct 2014 01:31:09 +0100
From:      Ben Morrow <ben@morrow.me.uk>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-mips@freebsd.org
Subject:   Cross-building mips binaries
Message-ID:  <20141021003108.GD12023@anubis.morrow.me.uk>
In-Reply-To: <3A1572B8-1CCE-49FD-BA08-476D0B9D8AB2@bsdimp.com>
References:  <20141018225950.GA12023@anubis.morrow.me.uk> <CAJ-Vmon5yFb7z5gDAZ4StAOY%2B05dBjd8w9u1PWZHR_ihynk9Ow@mail.gmail.com> <20141019223447.GB12023@anubis.morrow.me.uk> <3A1572B8-1CCE-49FD-BA08-476D0B9D8AB2@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh <imp@bsdimp.com> wrote:
> On Oct 19, 2014, at 4:34 PM, Ben Morrow <ben@morrow.me.uk> wrote:
> > 
[ mips64 under qemu ]
> >
> > Thank you, that works. (Good God, it's slow... I wonder how hard it
> > would be to replace cc with something that runs a cross-compiler on the
> > host? Maybe I can do something with distcc...)
> 
> I’ve been helping Sean Bruno do exactly this, but I think for mips32.
> You build a chroot with the full world, then you build x86 binaries to
> produce mips32/64 output and replace the cc, et al, in the chroot with
> those. Makes things quite a bit faster. Still not quite as fast as a
> full native cross build, but much faster than pure user mode and more
> reliable than the current state of the art in cross building.

This is a huge improvement (thank you to Juli and Alexander for pointing
me in the direction of qemu-user-static). I've now got a poudriere jail
with a mips64 world, amd64->mips64 cross-tools and imgact_binmisc to
invoke the emulator, and after a bit of fuss setting up the jail it all
appears to Just Work.

The new time hog seems to be xz and bz2 untarring distfiles and building
packages. Presumably a static amd64 tar binary would work without
problems; does anyone know if there are endianness issues with sqlite
which would upset an amd64 pkg-static binary?

Ben




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141021003108.GD12023>