Deal with ld's overly eager discarding of globals.

This commit is contained in:
Johny Mattsson 2015-12-17 12:37:01 +11:00
parent 4e8ef87d03
commit 7e02935a27
1 changed files with 6 additions and 1 deletions

View File

@ -86,8 +86,10 @@ COMPONENTS_eagle.app.v6 = \
crypto/libcrypto.a \ crypto/libcrypto.a \
dhtlib/libdhtlib.a \ dhtlib/libdhtlib.a \
tsl2561/tsl2561lib.a \ tsl2561/tsl2561lib.a \
modules/libmodules.a modules/libmodules.a \
# Special consideration for modules to support NODEMCU_MODULE handling
MODULES_LIB = $(filter %modules.a, $(DEP_LIBS_eagle.app.v6))
LINKFLAGS_eagle.app.v6 = \ LINKFLAGS_eagle.app.v6 = \
-Wl,--gc-sections \ -Wl,--gc-sections \
@ -98,6 +100,9 @@ LINKFLAGS_eagle.app.v6 = \
-Wl,--no-check-sections \ -Wl,--no-check-sections \
-Wl,--wrap=_xtos_set_exception_handler \ -Wl,--wrap=_xtos_set_exception_handler \
-Wl,-static \ -Wl,-static \
-Wl,--whole-archive \
$(MODULES_LIB) \
-Wl,--no-whole-archive \
-Wl,--start-group \ -Wl,--start-group \
-lc \ -lc \
-lgcc \ -lgcc \