diff options
| author | Ha Thach <[email protected]> | 2022-01-25 22:29:05 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-25 22:29:05 +0700 |
| commit | 7de166390ed6125e851af9a3e8221fbd3f3a773b (patch) | |
| tree | 7b32328cf010b7641c4b513f441ccae5a1710b92 /examples/rules.mk | |
| parent | c5d2c82cbbabf02cef16c2da565867f63900f69b (diff) | |
| parent | a59228207999329eb16fddbeb6286dfc36f4c0bd (diff) | |
Merge branch 'master' into master
Diffstat (limited to 'examples/rules.mk')
| -rw-r--r-- | examples/rules.mk | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/examples/rules.mk b/examples/rules.mk index 55e39f4ed..97f6956fa 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -12,8 +12,10 @@ ifeq (,$(findstring $(FAMILY),esp32s2 esp32s3 rp2040)) # Compiler Flags # --------------------------------------- +LIBS_GCC ?= -lgcc -lm -lnosys + # libc -LIBS += -lgcc -lm -lnosys +LIBS += $(LIBS_GCC) ifneq ($(BOARD), spresense) LIBS += -lc @@ -49,7 +51,11 @@ ifeq ($(NO_LTO),1) CFLAGS := $(filter-out -flto,$(CFLAGS)) endif -LDFLAGS += $(CFLAGS) -Wl,-T,$(TOP)/$(LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections +ifneq ($(LD_FILE),) +LDFLAGS_LD_FILE ?= -Wl,-T,$(TOP)/$(LD_FILE) +endif + +LDFLAGS += $(CFLAGS) $(LDFLAGS_LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections ifneq ($(SKIP_NANOLIB), 1) LDFLAGS += -specs=nosys.specs -specs=nano.specs endif |
