Compiling devkitPro on FreeBSD

Yes it’s possible to compile devkitPro/devkitARM on FreeBSD. It does require a bit of tweaking though. Below are some notes I took while compiling devkitARM release 42 and associated libraries on FreeBSD 10.0-STABLE. It’s a lot of quick hacks, but that worked out for having a fully working libga based environment.

-> replace /bin/bash with more portable /usr/bin/env bash -> portmaster math/gmp -> problem files need manual editing pointing to the full path of the header, for instance /usr/local/include/gmp.h -> -I/usr/local/include -L/usr/local/lib needs to be added in .devkitARM/arm-none-eabi/gcc/gcc/Makefile -> I removed the duplicate lines OK something is definitively wrong with the distribution of this source, or one of the scripts. I ended up `for ... do`-ing a lot of mv commands. -> portmaster graphics/freeimage -> configure/configure.ac modified to skip test and -I/usr/local/include -L/usr/local/lib -> relevant .h and .cpp files edited to  include /usr/local/include/FreeImage.h  -> add '-f -' to relevant Makefile: bzip2 -cd libnds-$(VERSION).tar.bz2 | \ tar -x -f - -C $(DEVKITPRO)/libnds ->replace @make with gmake in maxmod.mak -> the Makefile needs editing to replace @make with gmake
 * bash script does not work
 * GNU MP is needed
 * gmp header files not found while GCC is compiled
 * linker cannot find -lmpc at the end of stage 1 GCC build
 * abort defined twice in a row in libsysbase abort.c
 * same with iosupport.c ?
 * same with close.c, environ.c, execve.c, etc
 * libfreeimage missing for building grit-0.8.12
 * grit configure cannot find libfreeimage
 * grit fails to compile because cannot find FreeImage.h
 * tar tap error with libnds, libmirko, and maybe another one
 * Maxmod fails to build
 * Examples installed manually
 * when compiling projects, clang is used, fails

It’s very rough, but should give enough hints.

There is a small thread on the DevkitPro/DevkitARM forum on the matter: http://devkitpro.org/viewtopic.php?f=2&t=3203