mirror of
https://github.com/nodemcu/nodemcu-firmware.git
synced 2025-02-06 21:18:25 +08:00
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
|
else
|
||||||
# It is gcc, may be cygwin
|
# It is gcc, may be cygwin
|
||||||
# Can we use -fdata-sections?
|
# 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
|
AR = xtensa-lx106-elf-ar
|
||||||
CC = xtensa-lx106-elf-gcc
|
CC = xtensa-lx106-elf-gcc
|
||||||
NM = xtensa-lx106-elf-nm
|
NM = xtensa-lx106-elf-nm
|
||||||
@ -49,7 +49,7 @@ else
|
|||||||
else
|
else
|
||||||
ESPPORT = $(COMPORT)
|
ESPPORT = $(COMPORT)
|
||||||
endif
|
endif
|
||||||
CCFLAGS += -Os -ffunction-sections -fno-jump-tables
|
CCFLAGS += -Os -ffunction-sections -fno-jump-tables -fdata-sections
|
||||||
AR = xtensa-lx106-elf-ar
|
AR = xtensa-lx106-elf-ar
|
||||||
CC = xtensa-lx106-elf-gcc
|
CC = xtensa-lx106-elf-gcc
|
||||||
NM = xtensa-lx106-elf-nm
|
NM = xtensa-lx106-elf-nm
|
||||||
|
@ -86,6 +86,7 @@ COMPONENTS_eagle.app.v6 = \
|
|||||||
|
|
||||||
LINKFLAGS_eagle.app.v6 = \
|
LINKFLAGS_eagle.app.v6 = \
|
||||||
-L../lib \
|
-L../lib \
|
||||||
|
-Wl,--gc-sections \
|
||||||
-Xlinker -Map=mapfile \
|
-Xlinker -Map=mapfile \
|
||||||
-nostdlib \
|
-nostdlib \
|
||||||
-T$(LD_FILE) \
|
-T$(LD_FILE) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user