Add debug macros

- Add 'debug.h' with INFO, WARN and ERROR macros.
- This prints the specified message with the appropriate tag.
- INFO and WARN messages are only displayed when building with
  the DEBUG flag set. Error messages are always printed.

Change-Id: I21835b6063fcc99649b30ac7489387cbd3705bc0
Create local C library implementation (1/2)

- This change is split into two separate patches in order to
  simplify the history as interpreted by 'git'. The split is
  between the move/rename and addition of new files.
- Remove dependency on toolchain C library headers and functions in
  order to ensure behavioural compatibility between toolchains.
- Use FreeBSD as reference for C library implementation.
- Do not let GCC use default library include paths.
- Remove unused definitions in modified headers and implementations.
- Move C library files to 'lib/stdlib' and 'include/stdlib'.
- Break std.c functions out into separate files.

Change-Id: I91cddfb3229775f770ad781589670c57d347a154
Create local C library implementation (2/2)

- This change is split into two separate patches in order to
  simplify the history as interpreted by 'git'. The split is
  between the move/rename and addition of new files.
- Remove dependency on toolchain C library headers and functions in
  order to ensure behavioural compatibility between toolchains.
- Use FreeBSD as reference for C library implementation.
- Do not let GCC use default library include paths.
- Remove unused definitions in modified headers and implementations.
- Move C library files to 'lib/stdlib' and 'include/stdlib'.
- Break std.c functions out into separate files.

Change-Id: I3e3d8d992052264d2a02489034ae4c03bf0f5512
Add strchr() and putchar() to local C library

Change-Id: I3659e119a242f8ef828e32bfdf5d0b4b7ac4f716
Local C library documentation updates

- Update porting guide to describe where files live and how to get
  FreeBSD source code.
- Update change-log to describe relocation and new functions.

Change-Id: Id8f30cc7bafdd1064b3a5c5aae958c5aa3fb79f3
Fix SPSR register size in gp_regs structure

SPSR is a 32-bit register and so its size should be reflected in
the gp_regs structure.  This patch fixes the type of gp_regs.spsr
to use a 32-bit variable.  It also makes the size of the other
register fields more explicit.

Change-Id: I27e0367df1a91cc501d5217c1b3856d4097c60ba