I want to make cross compile environment for raspberrypi. Now I have VM with qemu-arm based cross compilation environment (based on this article), and it is VERY SLOW.

I think that native i386 compiler can make executables for diffent arch, it needs only toolchain and properly configured make.conf, but I can be wrong.

Maybe someone know how to configure system for cross-building?

  • Host System: freebsd 11 on vm i386
  • Target: freebsd 11 armv6hf

Thanks for answers!

2 Answers 2


There is already a cross compiler available for FreeBSD 11.

You can try the gnatcross-aarch64 port on a i386 or amd64 host.

you may want to compile all the gnatcross bits from ports. There are two items which can be install using pkg. Just do "pkg search gnatcross" it will list them.

There might be a problem using FreeBSD 11 since it is not available for Raspberry PI 3. You will probably need to modify the gnatcross-* kits to use FreeBSD 12 files. I fiddled around and spiked the distfiles cache with the needed v12 files (base.txz). I changed the name of the ports I used. I shortened the names to gx-* instead of gnatcross-*

The gnatcross claim to fame is that it includes the Ada compiler.

There are various tips on creating a cross compiler in the FreeBSD environment. You can try this one.


I've a VPS and I'm using it with poudriere (see here). I think this is the most simple solution.

  • Thanks for answering! But I know that option. What I want is to make compilation without qemu. I've made XDEV environment for armv6hf. Inside it i have cc compiler with needed target and libraries. But when it comes to building configure script cannot pass, because host cannot run arm-executables.
    – Consul
    Commented May 31, 2015 at 5:49
  • Do you know these: wiki.freebsd.org/QemuUserModeHowTo marcelog.github.io/articles/… unix.stackexchange.com/questions/64078/…? I've tried it without qemu but I failed and the poudriere with jails (and with qemu) was the simpliest solution for me - I didn't have time to find the problem.
    – uzsolt
    Commented May 31, 2015 at 9:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .