Merged in masayuki2009/nuttx.nuttx/add_gc_sections (pull request #1040)
boards: spresense: Add --gc-sections to LDFLAGS in scripts/Make.defs Also, add -ffunction-sections -fdata-sections to ARCHCFLAGS Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
parent
9673debe2b
commit
30021c4dee
@ -81,7 +81,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-builtin -mabi=aapcs
|
||||
ARCHCFLAGS = -fno-builtin -mabi=aapcs -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti -std=c++98
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
@ -127,6 +127,8 @@ OBJEXT = .o
|
||||
LIBEXT = .a
|
||||
EXEEXT =
|
||||
|
||||
LDFLAGS += --gc-sections
|
||||
|
||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user