From c19bb63286eea1c78338db12903f8cc48146924c Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Mon, 31 Aug 2015 16:56:16 +1000 Subject: [PATCH] Reorder library arguments so component libraries come first This allows components to override weak linked symbols in the core or the SDK libraries, without needing to force symbol discovery. Will help with #24, for instance. --- common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 323d13d..1c2424f 100644 --- a/common.mk +++ b/common.mk @@ -80,7 +80,7 @@ OBJDUMP = $(CROSS)objdump # Source components to compile and link. Each of these are subdirectories # of the root, with a 'component.mk' file. -COMPONENTS ?= core FreeRTOS lwip axtls $(EXTRA_COMPONENTS) +COMPONENTS ?= $(EXTRA_COMPONENTS) FreeRTOS lwip axtls core # binary esp-iot-rtos SDK libraries to link. These are pre-processed prior to linking. SDK_LIBS ?= main net80211 phy pp wpa @@ -318,7 +318,7 @@ $(LD_DIR)%.ld: $(ROOT)ld/%.ld | $(LD_DIR) # final linking step to produce .elf $(PROGRAM_OUT): $(COMPONENT_ARS) $(SDK_PROCESSED_LIBS) $(LINKER_SCRIPTS_PROCESSED) $(vecho) "LD $@" - $(Q) $(LD) $(LDFLAGS) -Wl,--start-group $(LIB_ARGS) $(SDK_LIB_ARGS) $(COMPONENT_ARS) -Wl,--end-group -o $@ + $(Q) $(LD) $(LDFLAGS) -Wl,--start-group $(COMPONENT_ARS) $(LIB_ARGS) $(SDK_LIB_ARGS) -Wl,--end-group -o $@ $(BUILD_DIR) $(FW_BASE) $(BUILD_DIR)sdklib $(LD_DIR): $(Q) mkdir -p $@