From 08aa8141aa9c8f994718d3314a480660a37db731 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 1 Dec 2015 09:44:50 +1100 Subject: [PATCH] Pass linker search paths with -L not -Wl,-L, so they take priority over sysroot This fixes link-time errors where the toolchain used was esp-open-sdk built with the default STANDALONE=y (meaning there are Espressif SDK libs in the sysroot). Closes #74 --- common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 07a84c9..f164689 100644 --- a/common.mk +++ b/common.mk @@ -106,7 +106,7 @@ CFLAGS = $(C_CXX_FLAGS) -std=gnu99 # Flags for C++ only CXXFLAGS = $(C_CXX_FLAGS) -fno-exceptions -fno-rtti -LDFLAGS = -nostdlib -Wl,--no-check-sections -Wl,-L$(BUILD_DIR)sdklib -Wl,-L$(ROOT)lib -u $(ENTRY_SYMBOL) -Wl,-static -Wl,-Map=build/${PROGRAM}.map $(EXTRA_LDFLAGS) +LDFLAGS = -nostdlib -Wl,--no-check-sections -L$(BUILD_DIR)sdklib -L$(ROOT)lib -u $(ENTRY_SYMBOL) -Wl,-static -Wl,-Map=build/${PROGRAM}.map $(EXTRA_LDFLAGS) ifeq ($(SPLIT_SECTIONS),1) C_CXX_FLAGS += -ffunction-sections -fdata-sections