Browse Source

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
pull/466/head
Kito Cheng 7 years ago
parent
commit
cefbba5992
  1. 4
      Makefile.in

4
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 $@

Loading…
Cancel
Save