Skip to content

Commit 051b9f7

Browse files
authored
Merge pull request #338 from brucehoult/newlib_use_function_sections
Enable function and data sections for newlib.
2 parents 63f696c + 83630cb commit 051b9f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,8 @@ stamps/build-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-
571571
--enable-newlib-io-long-long \
572572
--enable-newlib-io-c99-formats \
573573
--enable-newlib-register-fini \
574-
CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE $(CFLAGS_FOR_TARGET)" \
575-
CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE $(CXXFLAGS_FOR_TARGET)"
574+
CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -ffunction-sections -fdata-sections $(CFLAGS_FOR_TARGET)" \
575+
CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -ffunction-sections -fdata-sections $(CXXFLAGS_FOR_TARGET)"
576576
$(MAKE) -C $(notdir $@)
577577
$(MAKE) -C $(notdir $@) install
578578
mkdir -p $(dir $@) && touch $@

0 commit comments

Comments
 (0)