summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/libc/newlib.in.29
-rw-r--r--scripts/build/libc/newlib.sh2
2 files changed, 11 insertions, 0 deletions
diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2
index 3708384..ef5d076 100644
--- a/config/libc/newlib.in.2
+++ b/config/libc/newlib.in.2
@@ -35,6 +35,15 @@ config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
_write... If you plan to port newlib to a new
platform/board, say Yes.
+config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
+ bool
+ prompt "Optimize newlib for size"
+ default y
+ help
+ Pass --enable-target-optspace to newlib configure.
+
+ This will compile newlib with -Os.
+
config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY
string
prompt "Extra config for newlib"
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index 70a970c..d987477 100644
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -85,6 +85,8 @@ do_libc_start_files() {
newlib_opts+=( "--enable-newlib-supplied-syscalls" )
fi
+ [ "${CT_LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE}" = "y" ] && newlib_opts+=("--enable-target-optspace")
+
# Note: newlib handles the build/host/target a little bit differently
# than one would expect:
# build : not used