This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] libc/newlib: Add optspace config for newlib


# HG changeset patch
# User Zhenqiang Chen <zhenqiang.chen@linaro.org>
# Date 1321942694 -28800
# Node ID b28457252771ed67373226ced85317a6c03aac74
# Parent  a6c68712024f406df7d2da4af377f51982615833
libc/newlib: Add LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE (-Os) other than -O to
control CFLAGS.

Reviewed-by: Michael Hope
Signed-off-by: Zhenqiang Chen <zhenqiang.chen@linaro.org>

diff --git a/config/libc/newlib.in.2 b/config/libc/newlib.in.2
--- a/config/libc/newlib.in.2
+++ b/config/libc/newlib.in.2
@@ -35,3 +35,11 @@
          _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.
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -85,6 +85,8 @@
         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

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]