Hello All.
I have posted a guide on my website explaining how to build a cross compiler for gcc on Apple/Darwin platforms:
http://helium.sourceforge.net/bootstrapinggcc.pdf
This needed to be done because the macports version of the gcc cross compiler is outdated (version 3.x), and it does not support v1 MCUs.
-Neil Klingensmith
Helium RTOS Development
I have updated this guide with more comprehensive support for building gcc on Linux systems. The new version is available at:
http://pages.cs.wisc.edu/~klingens/crossgcc.pdf
The rewritten guide is still under revision. Please let me know what parts are not clear. I will gladly accept comments. I would also be interested in hearing success/failure stories for different platforms, particularly Ubuntu and OS X 10.7.
Hi Neil,
Have you tried a single pass build with newlib, mpc, mpfr etc ? If you link these packages into the top level of gcc you can build the whole tool chain in a single pass. You can find an example in the a build-script for the NIOS2 tool chain for RTEMS that I used here http://www.rtems.org/ftp/pub/rtems/people/chrisj/nios2/build-tools.sh.
The mpc and other package can be added in a similar manner and built as part of building gcc. The NIOS2 tool chain is an older version so does not need them. If you have any questions emai on my RTEMS address.
I tried following your instructions but I ran into some compile errors and I'm not sure what to do about them to allow me to continue. I'll be compiling code for the coldfire 54453 with the RTOS MQX. I got this after executing:
cd binutils-2.19.1
sudo mkdir build
cd build
sudo ../configure --target=m68k-elf --prefix=/opt/local/m68k-elftools --enable-interwork --enable-multilib --with-gnu-as --with-gnu-ld --disable-nls
sudo make
cc1: warnings being treated as errors
../../binutils/strings.c: In function ‘strings_file’:
../../binutils/strings.c:407: warning: ‘stat64’ is deprecated (declared at /usr/include/sys/stat.h:465)
make[4]: *** [strings.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-binutils] Error 2
make: *** [all] Error 2
I initially tried using the versions you used in your document but that also gave me errors. I'm running on Snow Leopard 10.6.5 with XCode installed.
Strawbot, did you ever solve your Make errors building GCC for OS X?
I was not able to reproduce this error. I used the current versions of binutils and gcc:
I noticed that if you attempt to copy and paste the configure commands from the PDF file to the command line, the configure script may fail. In order to make it work, you must type the entire command verbatim at the command line. The PDF file has line breaks between each line that will cause bash to interpret each line as a separate command.
Please let me know if you experience further problems with building gcc.