summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/libc/newlib.in.210
-rw-r--r--scripts/build/libc/newlib.sh5
2 files changed, 15 insertions, 0 deletions
diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2
index 914802f..fd2a68b 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 012f39c..289c4df 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: