Enhance newlib build

Currently newlib build config includes some tools which are targeting
the host and which are not needed for our use-case. As a result:
  - the build is slower
  - it is mandatory to have a compiler toolchain targeting the host
    available. This is an issue for Yocto since in the Yocto environment
    only the cross-compiler is available.
This change updates the newlib build files to remove dependency on
unnecessary components when cross-compiling, and changes newlib build
parameters to correctly turn on cross-compiling mode.

Moreover newlib.cmake is extended to allow passing extra parameters to
newlib build. This is used in Yocto to set the GCC sysroot flag
correctly.

Change-Id: I79aafe5cd6822cf614e94510740d377429e2745c
Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2 files changed