Porting newlib to xbox

Craig Edwards craig@haenterprises.com.au
Thu Jun 24 11:05:00 GMT 2004

I want to use newlib to provide libc functionality for an open source SDK  
for the XBOX and just want to confirm a couple of things...

The XBOX kernel provides a number of predefined functions (much like  
Win32) such as NTCreateFile, KeQuerySystemTime, ExAllocatePool, etc.  My  
plan is to implement newlib to call those pre-existing functions.

 From reading Jeff Johnston's post from a month ago about porting newlib  
(summarised below), I believe I can skip steps 1, 2, 3, and 4 (because the  
base instruction set is i386).  I then need to add a few lines to  
configure.host (as per the fr30 example), and then add an xbox directory  
to the libgloss directory.  In this directory I put my code that calls the  
XBOX kernel functions (plus my local configure.in/makefile.in).  Add an  
entry to the base configure.in to include my xbox target, re-configure  
using --target=xbox, and away I go.  Is that right?  Have I missed  
anything?  Cheers...

<!-- snip -->
1. Add a subdirectory to the newlib/libc/machine directory for your  
2. Edit newlib/libc/include/machine/ieeefp.h
3. Edit newlib/libc/include/machine/setjmp.h
4. Edit newlib/libc/include/sys/config.h
5. Edit configure.host
6. Add a machine subdirectory to libgloss
7. Possibly override header files
<!-- snip -->

Craig Edwards

More information about the Newlib mailing list