devkitARM built from source on FreeBSD

support for the ARM toolchain
Post Reply
Faelys
Posts: 3
Joined: Wed Aug 08, 2012 10:02 pm

devkitARM built from source on FreeBSD

Post by Faelys » Wed Aug 08, 2012 10:29 pm

Hello,

I have been trying to compile devkitPro on my FreeBSD computer, hoping to eventually develop stuff for my Nintendo DS lite. I have just finished compilation, but I haven't tested yet whether the cross-compiler is correct.

In the process I have found several issues with the build scripts, so I was wondering how much interest there is in my detailing the issues and the solutions I have found.

I guess some of them will not be of any interest (for example, FreeBSD has no libdl and the dl_* functions are in libc, so -ldl has to be removed from binutils build), but others are genuine problems in the build scripts (for example, libgba not being built but expected by maxmod) and/or in the packages (for example, maxmod calling arm-eabi-strip when it has been replaced by arm-none-eabi-strip), and still others are nitpicking (for example, bzip2 -cd $archive | tar -x -C $targetdir, relies on tar reading standard input by default, which is not guaranteed (it tries to read first tape device on FreeBSD, even when there is no tape device), so adding a -f- switch make it sounder).

So, should I put together a list of such issues, along with patches, or should I just keep all that to myself?


Thanks a lot for the nice toolchain,
Natasha

ultrageranium
Posts: 1
Joined: Thu Jun 05, 2014 8:30 am

Re: devkitARM built from source on FreeBSD

Post by ultrageranium » Wed Jun 25, 2014 2:46 pm

Hello,

I'm also reporting success on building DevkitARM (libgba) on FreeBSD 10.0-STABLE. I'm sharing my very rough notes in the hope it will be useful for someone else. This very thread motivated me to try as it was, as far as I could tell, the only relatively recent confirmation that it was possible.

Code: Select all

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

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests