welcome to www.hangar-eleven.de - your premier resource for console development





Development Env

Installing Cygwin

Building SH4 toolchain
Making Binutils
Making crossGCC
Making Newlib
Making final crossGCC

Building ARM toolchain
Making Binutils
Making crossGCC

Compiling KallistiOS

Testing KOS and the Compilers
Writing the first program
Compiling the first program
Uploading to the Dreamcast
DC-Tool
Serial Slave

Making a CD

Back to News

 

  Compiling Newlib for SH4 Platform
  Written: February 1st, 2001 @ 20:43 GMT By: Thorsten Titze
 
 

After we successfully built the binutils and the GCC for the SH4 now comes the newlib libraries we may need!

  • Set the needed environment variables in your shell with the following commands:
    (you should have already set them if you're going step-by-step through the SH4 toolchain guide)

    target=sh-elf
    prefix=/usr/local/dc/$target
    binaries=$prefix/bin
    PATH=$binaries:$PATH


  • Change to your BUILD-NEWLIB directory

    cd /gcc/build-newlib

  • Configure your makefile so that it reflects your TARGET and DIRECTORIES

    ../newlib-1.9.0/configure --target=$target --prefix=$prefix

    (and finally here we go with the longest configuration time <g> ;)

  • Without further changes make the project

    make all install \
    CC_FOR_TARGET=$binaries/${target}-gcc \
    AS_FOR_TARGET=$binaries/${target}-as \
    LD_FOR_TARGET=$binaries/${target}-ld \
    AR_FOR_TARGET=$binaries/${target}-ar \
    RANLIB_FOR_TARGET=$binaries/${target}-ranlib

NOTE:
The backslashes just tell the shell that the next line still belongs to the same command. So you may also type it all in one line leaving the backslashes out.

That is was for the compiling part of the SH4 newlib.

 

  Go to the sourceforge homepage of KallistiOS

Back to Dreamcast Development Main


DISCLAIMERS:
Website Design © 2002 by Thorsten Titze / hangar-eleven.de
(the pictures used for the design were taken from a WindowsXP Skin and WindowsXP)
All brand names used on this site are registered trademarks of their respective owners
No copyright infringement is intended
Last updated @ 22-Feb-2002 2:19 PM Contact me via eMail