mirror of
https://github.com/apache/nuttx.git
synced 2026-10-03 20:27:53 +00:00
boards: Add --gc-sections for photon and stm32f4discovery
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
parent
d0356bb9ba
commit
1f84f5b0ed
2 changed files with 10 additions and 7 deletions
|
|
@ -43,8 +43,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -fno-builtin
|
||||
ARCHCXXFLAGS = -fno-common -fno-builtin -fno-exceptions -fcheck-new -fno-rtti
|
||||
ARCHCFLAGS = -fno-common -fno-builtin -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-builtin -fno-exceptions -fcheck-new -fno-rtti -ffunction-sections -fdata-sections
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||
|
|
@ -64,6 +64,8 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
|||
LDFLAGS += -g
|
||||
endif
|
||||
|
||||
LDFLAGS += --gc-sections
|
||||
|
||||
ifeq ($(CONFIG_DFU_BINARY),y)
|
||||
|
||||
define FLASH
|
||||
|
|
|
|||
|
|
@ -34,11 +34,10 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
|||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ARCHCFLAGS = -fno-common -fno-builtin
|
||||
ifeq ($(CONFIG_CXX_EXCEPTION),y)
|
||||
ARCHCXXFLAGS = -fno-common -fno-builtin
|
||||
else
|
||||
ARCHCXXFLAGS = -fno-common -fno-builtin -fno-exceptions -fcheck-new
|
||||
ARCHCFLAGS = -fno-common -fno-builtin -ffunction-sections -fdata-sections
|
||||
ARCHCXXFLAGS = -fno-common -fno-builtin -ffunction-sections -fdata-sections
|
||||
ifneq ($(CONFIG_CXX_EXCEPTION),y)
|
||||
ARCHCXXFLAGS = -fno-exceptions -fcheck-new
|
||||
endif
|
||||
|
||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||
|
|
@ -65,6 +64,8 @@ NXFLATLDFLAGS1 = -r -d -warn-common
|
|||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
||||
LDNXFLATFLAGS = -e main -s 2048
|
||||
|
||||
LDFLAGS += --gc-sections
|
||||
|
||||
# Loadable module definitions
|
||||
|
||||
CMODULEFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue