Compile FreeBSD on linux/MacOS
Alexander Richardson
arichardson at freebsd.org
Sun Sep 2 15:31:53 UTC 2018
Once Fri, 31 Aug 2018, 14:11 Alexandru Elisei, <alexandru.elisei at gmail.com>
wrote:
> Hello,
>
> I know there is a project about compiling FreeBSD on linux or MacOS.
>
> Where can I find more information about the project? Has it been submitted
> for review?
>
Hi Alexandru,
I have been working on this for the past few months. I have a
work-in-progress branch on GitHub <
https://github.com/arichardson/freebsd/tree/crossbuild-aug2018> (warning: I
rebase this branch whenever I commit one of my changes) but I haven't
written up anything about the current state.
I have a few pending patches on phabricator and some committed changes but
the rest of the changes still needs some clean-up before it can be
submitted. Most of the changes are just allowing to build one of the
bootstrap tools on non-FreeBSD but there are also two bigger changes
(D16815 and D14316) to provide the basic cross-OS building infrastructure.
It currently works fine for me on MacOS and Linux when compiling with the
CHERI fork of llvm/clang/lld (<https://github.com/CTSRD-CHERI/clang>) but
in order to compile with upstream clang you will have to delete the builtin
std* headers from the clang install since they are incompatible with the
FreeBSD stddef.h/stdio.h/etc. headers.
If you want to try it out you should to use the script tools/build/make.py
instead of make and if you're lucky `make.py buildworld` might succeed.
I've tested building for mips64 and amd64 but other architectures might
also be fine.
Alex
Best regards,
> Alexandru Elisei
> _______________________________________________
> freebsd-arch at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arch
>
More information about the freebsd-arch
mailing list