From 946d3fdd4f0b5dc1e5a3cadde25691d6f34e30dc Mon Sep 17 00:00:00 2001 From: hathach Date: Sat, 24 Jun 2023 21:17:40 +0700 Subject: [PATCH] fix iar with make --- examples/device/cdc_msc_freertos/Makefile | 2 +- examples/device/hid_composite_freertos/Makefile | 2 +- tools/make/toolchain/arm_gcc_rules.mk | 2 +- tools/make/toolchain/arm_iar.mk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/device/cdc_msc_freertos/Makefile b/examples/device/cdc_msc_freertos/Makefile index 5b5e513ad..0bee668b7 100644 --- a/examples/device/cdc_msc_freertos/Makefile +++ b/examples/device/cdc_msc_freertos/Makefile @@ -43,6 +43,6 @@ CFLAGS_GCC += -Wno-error=redundant-decls CFLAGS_GCC += -Wno-error=cast-qual # FreeRTOS (lto + Os) linker issue -LDFLAGS += -Wl,--undefined=vTaskSwitchContext +LDFLAGS_GCC += -Wl,--undefined=vTaskSwitchContext include ../../rules.mk diff --git a/examples/device/hid_composite_freertos/Makefile b/examples/device/hid_composite_freertos/Makefile index cc1526cfe..a892e7d1d 100644 --- a/examples/device/hid_composite_freertos/Makefile +++ b/examples/device/hid_composite_freertos/Makefile @@ -42,6 +42,6 @@ CFLAGS_GCC += -Wno-error=redundant-decls CFLAGS_GCC += -Wno-error=cast-qual # FreeRTOS (lto + Os) linker issue -LDFLAGS += -Wl,--undefined=vTaskSwitchContext +LDFLAGS_GCC += -Wl,--undefined=vTaskSwitchContext include ../../rules.mk diff --git a/tools/make/toolchain/arm_gcc_rules.mk b/tools/make/toolchain/arm_gcc_rules.mk index 2e8b9f911..f3482b9a8 100644 --- a/tools/make/toolchain/arm_gcc_rules.mk +++ b/tools/make/toolchain/arm_gcc_rules.mk @@ -21,7 +21,7 @@ ifneq ($(CFLAGS_SKIP),) CFLAGS := $(filter-out $(CFLAGS_SKIP),$(CFLAGS)) endif -LDFLAGS += $(CFLAGS) +LDFLAGS += $(CFLAGS) $(LDFLAGS_GCC) ifdef LD_FILE LDFLAGS += -Wl,-T,$(TOP)/$(LD_FILE) diff --git a/tools/make/toolchain/arm_iar.mk b/tools/make/toolchain/arm_iar.mk index f1850add7..04c9f22b3 100644 --- a/tools/make/toolchain/arm_iar.mk +++ b/tools/make/toolchain/arm_iar.mk @@ -8,4 +8,4 @@ SIZE = size CFLAGS += -e --debug --silent # silent mode -ASFLAGS += -S +ASFLAGS += -S $(addprefix -I,$(INC))