summaryrefslogtreecommitdiff
path: root/scripts/build/cc/gcc.sh
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2020-12-23 14:31:11 (GMT)
committerAlexey Brodkin <abrodkin@synopsys.com>2020-12-23 14:54:03 (GMT)
commitb833f4525987ada40a718970819013d76f1d35d8 (patch)
tree70b370fbde43081485639b5e009646e106be5df7 /scripts/build/cc/gcc.sh
parent4ae7ed0113910ff175b0c8e00df0ffb2b4ac8735 (diff)
gcc: Make it aware of Newlib nano IO feature
Even though GCC as a compiler has nothing to do with a C library being used it still makes sense to know about Newlib's compact implementation of IO functions: * For targets like MSP430 which require to have such a tuned Newlib if "-mtiny-printf" is passed to the GCC's command-line [1] * For correct compilation of the following GCC's own DejaGnu tests [2]: - gcc/testsuite/gcc.c-torture/execute/920501-8.c - gcc/testsuite/gcc.c-torture/execute/930513-1.c - gcc/testsuite/gcc.dg/torture/builtin-sprintf.c - gcc/testsuite/gcc.c-torture/execute/ieee/920810-1.x [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=02afb6a9321fbfb435452636cedc2cd43f0c4fd2 [2] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=571bbd0d48d5872eacbd0b681fce6e1ae754520b So we add that missing cross-dependency now. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Diffstat (limited to 'scripts/build/cc/gcc.sh')
-rw-r--r--scripts/build/cc/gcc.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 3d4db35..a3f3af1 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -361,6 +361,11 @@ do_gcc_core_backend() {
[ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}")
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
+ # Hint GCC we'll use a bit special version of Newlib
+ if [ "${CT_LIBC_NEWLIB_NANO_FORMATTED_IO}" = "y" ]; then
+ extra_config+=("--enable-newlib-nano-formatted-io")
+ fi
+
if [ "${CT_CC_CXA_ATEXIT}" = "y" ]; then
extra_config+=("--enable-__cxa_atexit")
else