KallistiOS: Newlib info




As of August 6, 2004, KOS uses Newlib instead of its own libc/libm. This means you will need to patch Newlib and build it properly instead of just haphazardly using the defaults (which are quite broken for KOS).

The patch you need to apply can be found here. You can do this by grabbing the Newlib 1.12.0 archives, changing to that dir, and executing "patch -p1 < newlib-1.12.0-kos.patch" (or whereever you put the file). Alternatively you can grab a pre-patched Newlib here (zip) or here (bz2).

Also if you are not using the standard "-ml -m4-single-only" target on the DC, or you are using alternate compilation flags from "-fno-crossjumping" and "-fno-optimize-sibling-calls", you may need to edit the patch to suit your needs; but I assume that if you are not using those defaults then you know how to handle that on your own.

Once that's done you can compile Newlib per normal. If you already had a tool chain and you're just updating Newlib for all this new crazy stuff, then here are the directions:

cd ${builddir}
${srcs}/configure --target=sh-elf --prefix=${compilerpath}
make all install CC_FOR_TARGET=sh-elf-gcc AS_FOR_TARGET=sh-elf-as \
	LD_FOR_TARGET=sh-elf-ld AR_FOR_TARGET=sh-elf-ar \
	RANLIB_FOR_TARGET=sh-elf-ranlib

...where ${builddir} is a random dir you made to build Newlib, ${srcs} is the dir containing your Newlib sources, and ${compilerpath} is where your compiler is installed.

I have put a precompiled copy of Newlib online, built with my GCC 3.3.3 snapshot. It may or may not work for you but it will probably be easier to try it first if you already have a setup. Grab it here (zip) or here (bz2). Both archives have the same contents and are meant to be extracted inside your compiler target dir (though again if it's not sh-elf, you'll need to mess with paths).



Gamedev Home

KallistiOS

Home
The "Scene"
Download
Documentation (v2.0.0)
Roadmap
Installation
FAQ
Lists/Forums/etc



Hosted by:
SourceForge.net Logo


Cryptic Allusion Game Dev © 2002,2003,2004 Dan Potter (design and information); © 2010-2016 Lawrence Sebald (information only); please see About CA Game Dev for further trademark and copyright info. This site has nothing to do with game mods, piracy, or other illegal or potentially illegal activities. It also has no relation whatsoever to SEGA, Ltd. It is intended strictly for the use of homebrew developers.