diff --git a/build.sh b/build.sh index dbd5d21..28f2ff9 100755 --- a/build.sh +++ b/build.sh @@ -189,7 +189,7 @@ if [[ ${FAST} != "fast" ]]; then if [[ "${NACL_GLIBC}" != "1" ]]; then # Do things specific to newlib. - export CXXFLAGS="${CXXFLAGS} -I${INCLUDE_OVERRIDE} -DHAVE_FORKPTY -DHAVE_SYS_UIO_H" + export CXXFLAGS="${CXXFLAGS} -I${INCLUDE_OVERRIDE} -DHAVE_FORKPTY -DHAVE_SYS_UIO_H -O2" fi # Do configure step in a subshell as we need to fake it out a little. ( diff --git a/src/Makefile b/src/Makefile index c9fbeed..202bcd2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -81,7 +81,7 @@ OBJCOPY:=$(TC_PATH)/../$(OSNAME)_x86_newlib/bin/i686-nacl-objcopy # Project Build flags # TODO: Remove --pnacl-exceptions once exceptions are fully supported by PNaCl. override CXXFLAGS+=-pthread $(WARNINGS) -I$(NACL_SDK_ROOT)/include -fno-builtin \ - --pnacl-exceptions=sjlj + --pnacl-exceptions=sjlj -O2 COMPAT_INC:=-I${TC_PATH}/ARCH-nacl/usr/include/glibc-compat NEWLIB_CXXFLAGS:=$(CXXFLAGS) -DUSE_NEWLIB $(COMPAT_INC)