diff options
author | Kévin PETIT <kpet@free.fr> | 2011-08-28 20:12:26 +0200 |
---|---|---|
committer | Kévin PETIT <kpet@free.fr> | 2011-08-28 20:12:26 +0200 |
commit | 1097bea2e005cd220738b0bc76ad11c3ec75f411 (patch) | |
tree | b4072f3d26223bde0664c58b568669a48c65480c | |
parent | 4c1666134b7c5d14c6eeb5bb0a3bf17842d1cde8 (diff) | |
download | crosstool-ng-1097bea2e005cd220738b0bc76ad11c3ec75f411.tar.gz crosstool-ng-1097bea2e005cd220738b0bc76ad11c3ec75f411.tar.bz2 crosstool-ng-1097bea2e005cd220738b0bc76ad11c3ec75f411.zip |
libc/newlib: add a config option allowing to disable builtin syscalls
Allows to choose if one wants to keep or not the syscalls that are provided with
newlib. It passes the --disable-newlib-supplied-syscalls or
--enable-newlib-supplied-syscalls to the configure script. If one chooses to
disable the builtin syscalls, he/she will have to write his/her own. This can
be usefull to port newlib to a new platform/board.
Signed-off-by: Kévin PETIT <kpet@free.fr>
-rw-r--r-- | config/libc/newlib.in.2 | 10 | ||||
-rw-r--r-- | scripts/build/libc/newlib.sh | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2 index 914802f9..fd2a68b2 100644 --- a/config/libc/newlib.in.2 +++ b/config/libc/newlib.in.2 @@ -25,3 +25,13 @@ config LIBC_NEWLIB_IO_LDBL depends on LIBC_NEWLIB_IO_FLOAT help Enable support for IOs on long doubles. + +config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS + bool + prompt "Disable the syscalls supplied with newlib" + help + Disable the syscalls that come with newlib. You + will have to implement your own _sbrk, _read, + _write... If you plan to port newlib to a new + platform/board, say Yes. + diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 012f39c4..289c4dfb 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -79,6 +79,11 @@ do_libc_start_files() { newlib_opts+=( "--disable-newlib-io-float" ) newlib_opts+=( "--disable-newlib-io-long-double" ) fi + if [ "${CT_LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS}" = "y" ]; then + newlib_opts+=( "--disable-newlib-supplied-syscalls" ) + else + newlib_opts+=( "--enable-newlib-supplied-syscalls" ) + fi # Note: newlib handles the build/host/target a little bit differently # than one would expect: |