Developing OS under Mac OS X

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Developing OS under Mac OS X

Post by Combuster »

Read the tutorial: there are known issues with GCC 3.3.x

If you want an older GCC version, try 3.4.4 or 3.4.6
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
GlassX
Posts: 3
Joined: Mon Jan 19, 2009 1:39 pm

Re: Developing OS under Mac OS X

Post by GlassX »

I just built a static GCC cross compiler in OSX with great success. All I had to do was copy the newlib and libgloss folders (from newlib-1.17.0.tar.bz2) into gcc-4.3.2/newlib and gcc-4.3.2/libgloss and the GCC source folder, and extract the GMP and MPFR sources into gcc-4.3.2/gmp and gcc-4.3.2/mpfr.

Here's my configure command:

Code: Select all

../gcc-4.3.2/configure --prefix=/gcc-arm --target=arm-elf --with-newlib --with-gnu-as --with-gnu-ld --without-headers --disable-shared --disable-nls --enable-languages=c --enable-mpfr --enable-gmp --enable-static
If you want to build a non-static version, you can compile GMP (I used version 4.2.4) then MPFR (version 2.3.2 here), but use the parameter ABI=32 (without the -- before it) if you're using Leopard, or GCC will complain when building MPFR. Point to their locations using --with-gmp= and --with-mpfr= when you build GCC.

Hope it helps! :)
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: Developing OS under Mac OS X

Post by quok »

Srowen wrote:i've got some problem with the mac ports.
Hmm, I tried to build the i386-elf cross-tools in macports over the weekend. It seems they're broken currently and have been for a number of weeks. There's various workarounds to build them, but what is the point of having to work around things that should build fine in macports? :)
Post Reply