diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2020-12-23 17:31:11 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2020-12-23 17:54:03 +0300 |
commit | b833f4525987ada40a718970819013d76f1d35d8 (patch) | |
tree | 70b370fbde43081485639b5e009646e106be5df7 /scripts/build/cc | |
parent | 4ae7ed0113910ff175b0c8e00df0ffb2b4ac8735 (diff) | |
download | crosstool-ng-b833f4525987ada40a718970819013d76f1d35d8.tar.gz crosstool-ng-b833f4525987ada40a718970819013d76f1d35d8.tar.bz2 crosstool-ng-b833f4525987ada40a718970819013d76f1d35d8.zip |
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')
-rw-r--r-- | scripts/build/cc/gcc.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 3d4db35b..a3f3af1f 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 |