aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@sifive.com>2019-07-10 01:54:14 -0700
committerKito Cheng <kito.cheng@sifive.com>2019-07-10 03:46:15 -0700
commitcefbba59925a01248b63ed85e0d0f96bfd1fed13 (patch)
tree372db396143f501799863a87302e4cbeea8bb2eb /Makefile.in
parent0964df608baed5e71da6a89a5c17338a852fd112 (diff)
downloadriscv-gnu-toolchain-cefbba59925a01248b63ed85e0d0f96bfd1fed13.zip
riscv-gnu-toolchain-cefbba59925a01248b63ed85e0d0f96bfd1fed13.tar.gz
riscv-gnu-toolchain-cefbba59925a01248b63ed85e0d0f96bfd1fed13.tar.bz2
Build newlib with POSIX mode
- newlib was default to XOPEN MODE before 2018/12/6[1], but newlib decide to remove XOPEN mode SVID3 mode, and change the default IEEE mode. - The problem is IEEE won't set errno on several math function, so build with POSIX mode would be better for newlib. - For newlib nano, we might able to build with _IEEE_LIBM in future to reduce code size, and improve performance. [1] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=b14a879d85b171960df789ac8ba2332004f838e0
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index c7938b7..12e3934 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -477,8 +477,8 @@ stamps/build-newlib: $(srcdir)/riscv-newlib stamps/build-gcc-newlib-stage1
--enable-newlib-io-long-long \
--enable-newlib-io-c99-formats \
--enable-newlib-register-fini \
- CFLAGS_FOR_TARGET="-O2 $(CFLAGS_FOR_TARGET)" \
- CXXFLAGS_FOR_TARGET="-O2 $(CXXFLAGS_FOR_TARGET)"
+ CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE $(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE $(CXXFLAGS_FOR_TARGET)"
$(MAKE) -C $(notdir $@)
$(MAKE) -C $(notdir $@) install
mkdir -p $(dir $@) && touch $@