Kernel/World/Ports compilation within jails; targeting many platforms.

Jason Birch jbirch at
Mon Oct 28 09:17:38 UTC 2013

Thanks for your response, illoai.

I think you're getting at what I really need -- jails aren't needed because
I'm not really worried about isolation of services or processes, I just
want to logically separate some code such that compilations are repeatable
and performed similarly.

Whether I do this in chroots that make all compilations look the same, or
just keep separate source trees for each of my builds, is then just a
matter of taste, I guess.

On Sun, Oct 27, 2013 at 7:45 AM, illoai at <illoai at> wrote:

> On 26 October 2013 06:53, Jason Birch <jbirch at> wrote:
> > Is it considered 'good form' to do compilation for other machines,
> > architectures, and FreeBSD versions within jails?
> >
> > As a concrete example, my 'main' system is a FreeBSD 9.1-RELEASE amd64
> > system, and I would like to compile FreeBSD 11-CURRENT for my BeagleBone
> > Black (ARMv7). Does it make more sense to create a jail environment on my
> > 9.1-RELEASE machine to do all compilation and 'staging' for the
> BeagleBlack?
> >
> > Originally I had just compiled gcc targeting arm and checked out sources
> > into a location that wasn't /usr/src/. This is simple enough for one
> > different target, but I'm wondering if I'll be a little bit more sane if
> > I've got a jail for each individual target I'm compiling for. Each jail
> can
> > then be set up with one, consistent compiler and source tree in the same
> > location -- even if the compiler (GCC/Clang) and source (X-RELEASE vs
> > Y-STABLE vs CURRENT) differ between targets?
> >
> > Are this a sane thing to be doing? For those of you that have several
> > FreeBSD targets but do most of your set up on a single machine, how do
> you
> > logically separate your 'worlds'?
> Your system sounds a bit involved.  FreeBSD is designed to be
> cross compiled fairly easily.
> For building wine on amd64, I just created an i386 chroot.
> A jail is targeted at running services within a chroot-like
> environment, I suppose it could be used to cross compile.
> You can cross build with:
> # make buildworld TARGET=arm (you may need to specify TARGET_ARCH=
> as well with ARM, I don't know)
> You might have to specify CC= CXX= & CPP=
> In the case of TARGET=i386 it places the object files under
> /usr/obj/i386.i386/, I'd assume something similar for ARM.
> You'll also have to build a kernel.  You'll have to do other stuff, too.
> There's stuff here:
> --
> --

More information about the freebsd-questions mailing list