reduce executable size (-fdata-sections and -Wl,--gc-sections)
This commit is contained in:
parent
ed8681f956
commit
18a44e7c60
4
Makefile
4
Makefile
|
@ -22,7 +22,7 @@ ifeq ($(OS),Windows_NT)
|
|||
else
|
||||
# It is gcc, may be cygwin
|
||||
# Can we use -fdata-sections?
|
||||
CCFLAGS += -Os -ffunction-sections -fno-jump-tables
|
||||
CCFLAGS += -Os -ffunction-sections -fno-jump-tables -fdata-sections
|
||||
AR = xtensa-lx106-elf-ar
|
||||
CC = xtensa-lx106-elf-gcc
|
||||
NM = xtensa-lx106-elf-nm
|
||||
|
@ -49,7 +49,7 @@ else
|
|||
else
|
||||
ESPPORT = $(COMPORT)
|
||||
endif
|
||||
CCFLAGS += -Os -ffunction-sections -fno-jump-tables
|
||||
CCFLAGS += -Os -ffunction-sections -fno-jump-tables -fdata-sections
|
||||
AR = xtensa-lx106-elf-ar
|
||||
CC = xtensa-lx106-elf-gcc
|
||||
NM = xtensa-lx106-elf-nm
|
||||
|
|
|
@ -86,6 +86,7 @@ COMPONENTS_eagle.app.v6 = \
|
|||
|
||||
LINKFLAGS_eagle.app.v6 = \
|
||||
-L../lib \
|
||||
-Wl,--gc-sections \
|
||||
-Xlinker -Map=mapfile \
|
||||
-nostdlib \
|
||||
-T$(LD_FILE) \
|
||||
|
|
Loading…
Reference in New Issue