aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKito Cheng <kito.cheng@sifive.com>2022-03-08 09:56:25 +0800
committerGitHub <noreply@github.com>2022-03-08 09:56:25 +0800
commit051b9f7ddb7d136777505ea19c70a41926842b96 (patch)
tree4639660a991fbe5ea0f9b48e0154b63754427fd8
parent63f696c8f23f3eebf5f1af97fd8c66f6483a6393 (diff)
parent83630cbcadfba6cff1162f667e411975eea3318d (diff)
downloadriscv-gnu-toolchain-051b9f7ddb7d136777505ea19c70a41926842b96.zip
riscv-gnu-toolchain-051b9f7ddb7d136777505ea19c70a41926842b96.tar.gz
riscv-gnu-toolchain-051b9f7ddb7d136777505ea19c70a41926842b96.tar.bz2
Merge pull request #338 from brucehoult/newlib_use_function_sections2022.03.09
Enable function and data sections for newlib.
-rw-r--r--Makefile.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index 3fe302d..c9a56d9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -571,8 +571,8 @@ stamps/build-newlib: $(NEWLIB_SRCDIR) $(NEWLIB_SRC_GIT) stamps/build-gcc-newlib-
--enable-newlib-io-long-long \
--enable-newlib-io-c99-formats \
--enable-newlib-register-fini \
- CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE $(CFLAGS_FOR_TARGET)" \
- CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE $(CXXFLAGS_FOR_TARGET)"
+ CFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -ffunction-sections -fdata-sections $(CFLAGS_FOR_TARGET)" \
+ CXXFLAGS_FOR_TARGET="-O2 -D_POSIX_MODE -ffunction-sections -fdata-sections $(CXXFLAGS_FOR_TARGET)"
$(MAKE) -C $(notdir $@)
$(MAKE) -C $(notdir $@) install
mkdir -p $(dir $@) && touch $@