Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Other » PC Engine, PC-FX » Developing with GCC HOWTO
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Developing with GCC HOWTO [message #687] Thu, 08 February 2007 19:37
Administrator  [PM]
(WIP, instructions won't work yet!)

Setting up a build environment

If you're setting up the cross-compiler in a 32-bit chroot jail running on a 64-bit Athlon64 Linux system(like me!), you should also pass "--host=i686-pc-linux-gnu" to the configure scripts.

Additionally, putting "env CC=gcc-2.95" before the configure commands may be useful, as newer versions of gcc have problems compiling this old code!

binutils:
tar -jxvf gcc-2.95.2.tar.bz2
cd binutils-2.10
gzip -dc ../binutils-2.10-v810patch1021.gz | patch -p1
./configure --target=v810 --prefix=/usr/local
make
make install


gcc:
tar -jxvf gcc-2.95.2.tar.bz2
cd gcc-2.95.2
gzip -dc ../gcc-2.95.2-v810patch0927.gz | patch -p1
./configure --target=v810 --prefix=/usr/local --with-newlib
make
make install


newlib:
tar -jxvf newlib-1.14.0.tar.bz2
cd newlib-1.14.0
gzip -dc ../newlib-1.14.0-pcfx-patch-feb8-2007.gz | patch -p1
./configure --target=v810 --prefix=/usr/local
make
make install


Compiling your program
I strongly recommend passing "-mbig-switch" to gcc, otherwise gcc will silently generate bad code with large switch statements.

v810-gcc -mbig-switch -O2 -o example.elf example.c -lm
pcfx-cdlink example.elf track.iso



References:

http://hp.vector.co.jp/authors/VA007898/pcfxga/develop/
http://homepage1.nifty.com/hyperclub/

[Updated on: Sat, 17 February 2007 00:56]

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:ADPCM CODEC
Next Topic:New Hsync lib routine for HuC w/ SGX support
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ ]

Current Time: Sun Apr 28 12:06:20 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software