Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

2.1.1.  Incorporating Newlib within the Tool Chain Build

Newlib can be linked into the unified source directory in the same fashion. All that is needed is to add newlib to the component directories in the linking script.

#!/bin/bash

component_dirs='binutils-2.18.50 gcc-4.2.2 newlib-1.18.0 gdb-6.8'
unified_src=srcw
...
	  

The configuration command should also specify that this is a build using newlib

mkdir build
cd build
../src/configure --target=or32-elf --enable-languages=c --with-newlib \
                 --prefix=/opt/or32-elf
cd ..
	

Two new targets are needed for newlib, one to build newlib itself, and one to build any board support packages using libgloss (see Chapter 3 for an explanation of how libgloss is used with newlib).

cd build
make all-build all-binutils all-gas all-ld all-gcc all-target-newlib \
     all-target-libgloss all-gdb
cd ..
	

Similarly additional targets are needed for installation.

cd build
make install-build install-binutils install-gas install-ld install-gcc \
     install-target-newlib install-target-libgloss install-gdb
cd ..
	
Embecosm divider strip