5 download
ftp://sources.redhat.com
/pub
/newlib
$newlibdist.
tar.gz
6 rm -rf $builddir-newlib
7 mkdir
-p $builddir-newlib
11 tar -xzf $GNUsrc/$newlibdist.
tar.gz
13 # Copy over our changes
14 tar -C $srcroot/newlib
-cvf - .|
tar -C $newlibdist -xvf -
16 # Build newlib-1.16.0, available from RedHat:
17 # http://sourceware.org/newlib/
19 # As for now, yari does not support floating point operations as well as the
20 # special lw{l,r}, sw{l,r} instructions. Therefore some additional configure
21 # options are required for newlib to work correctly.
23 # Dynamic execution count with different newlib options
24 # tictactoe: 6588425 (enable-target-optspace)
25 # tictactoe: 6498234 (disable-newlib-io-float enable-target-optspace)
26 # tictactoe: 4959017 ()
27 # tictactoe: 4899002 (disable-newlib-io-float)
28 # Clearly we're paying dearly at execution time for saving space
30 # Configure and make the static C lib
33 ..
/$newlibdist/configure \
34 --prefix=$install_prefix \
36 --enable-target-optspace
46 int main(int c, char**v)
48 printf("%s: Hi, I'm YARI.\n", *v);
51 $target-gcc -O -Tyari.ld hw.c
-o hw
57 # // now the tricky bit building the c++ compiler
60 # ../gcc3.3/configure --enable-languages=c++
61 # --enable-multilib=no
64 # --target=mips-mips-elf
65 # --prefix=$prefix --with-gnu-as