Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
18a44e7c
Commit
18a44e7c
authored
Feb 02, 2015
by
devsaurus
Browse files
reduce executable size (-fdata-sections and -Wl,--gc-sections)
parent
ed8681f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
18a44e7c
...
@@ -22,7 +22,7 @@ ifeq ($(OS),Windows_NT)
...
@@ -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
...
@@ -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
...
...
app/Makefile
View file @
18a44e7c
...
@@ -86,6 +86,7 @@ COMPONENTS_eagle.app.v6 = \
...
@@ -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)
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment