Gentoo Logo



1.  Project Description

Gentoo/FreeBSD (or Gentoo/FBSD, or G/FBSD) is an effort to create a complete FreeBSD-based Gentoo system, sharing the complete administration facilities of Gentoo with the reliability of the FreeBSD kernel and userland.

An experimental, yet incomplete release have been done, and it's possible to install Gentoo/FreeBSD following the install guide.

This project is still in its infancy. If you are interested in working on it, please send an email to the Gentoo/*BSD team.

2.  Developers

Developer Nickname Role
Javier Villavicencio the_paya Lead
Alexis Ballier aballier Member
Naohiro Aota naota Member
Jesus Rivero neurogeek Member

All developers can be reached by e-mail using

3.  Recruitment

We are currently looking for users interested in helping the project with one or more jobs.

To learn more, visit the Staffing Needs page.

4.  Resources

Resources offered by the fbsd project are:

5.  Mini FAQ

1. Is Gentoo/FreeBSD just a portage on top of FreeBSD system?
No, Gentoo/FreeBSD aims to provide a complete FreeBSD-based system using Gentoo design principles. This means that it's going to use the Gentoo init system, administration utilities and toolchain support.

2. Which toolchain is being used to build the system?
Gentoo toolchain is being used. This means that GCC can be chosen between the currently available versions in portage (4.2, 4.3 and 4.4), and the same goes with binutils, for which the needed patch form FreeBSD has already been forwardported (and applied upstream for 2.17 series, currently running well on 2.20).

3. Is Stack Smashing Protection supported?
Yes, as we use Gentoo toolchain we also have GCC patched with Propolice, and since the introduction of FreeBSD-8.0 the base system is patched to support SSP by default. The linkage of local SSP symbols is done using a linker script thanks to the newer binutils available, while on vanilla FreeBSD it's being done directly on the gcc-spec, this method also avoids text relocations making SSP support pretty clean.

6.  Building a Gentoo/FreeBSD crosscompiler


Complementing the DistCC Cross-compiling Guide, this document will explain how to build a Gentoo/FreeBSD crosscompiler, as for now it's not yet entirely automated.

The instruction here given works for building crosscompilers to Gentoo/FreeBSD, as they use the ebuilds currently in portage. They might not work entirely for generic vanilla FreeBSD as there are a few things that change, but you should be okay.

Please if you find a problem with these when building a generic FreeBSD cross compiler don't open a bug report unless you also have a patch, as there're not enough people working on Gentoo/FreeBSD to support vanilla FreeBSD building.

Prerequisites and crossdev

Before going to use crossdev you need to install some prerequisites that are needed to complete the building of a stage4 compiler (C++ compiler). These are needed because crossdev does not merge them before the rest.

The first package you need is virtual/pmake, or directly sys-devel/pmake, that provides a BSD-compatible make command, needed to build headers and the base library for Gentoo/FreeBSD.

The second package is a complement to the above pmake. Although it ships with some files .mk (that contains BSD makefile templates used to build applications using BSD style), they are too barebone to actually build FreeBSD software, so you need to install the file set from FreeBSD. The ebuild is sys-freebsd/freebsd-mk-defs and it's crosscompile aware: when building on a non-FreeBSD system it installs in /usr/share/mk/freebsd and uses GNU syntaxes.

The third package is sys-apps/mtree, that provides the BSD mtree command, needed to build Gentoo/FreeBSD headers.

Note: You might have sys-freebsd/freebsd-mk-defs masked by keyword, please refer to the arch team of your architecture for its keywording.

Then you just need to use sys-devel/crossdev to build the crosscompiler you want. Please note that the version specified in CHOST has to be the same as the one used for freebsd-lib:

Code Listing 6.1: Building a crosscompiler for Gentoo/FreeBSD 6.1

# crossdev -s4 --gcc 4.4.3 --libc '8.0*' --target i686-gentoo-freebsd8.0 --with-headers

The version of libc has to be accorded ot the version of FreeBSD you want to build for, while the --with-headers option to crossdev forces it to build the headers before gcc itself.


Page updated April 6, 2010

Summary: FreeBSD-based Gentoo system

Otavio Rodolfo Piske

Diego Pettenò

Donate to support our development efforts.

Copyright 2001-2015 Gentoo Foundation, Inc. Questions, Comments? Contact us.