mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-08-06 15:15:15 +08:00
fix(make): fix compiling warning
1. add "-MP" prevents make-level errors when switching IDF versions, as headers may be removed 2. add macro "IS_BOOTLOADER_BUILD" to disable link file generation when compiling bootloader 3. add "<:" to avoid makefile to search it undefined variable
This commit is contained in:
@ -64,12 +64,14 @@ endif # CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef IS_BOOTLOADER_BUILD
|
||||||
LINKER_SCRIPT_TEMPLATE := $(COMPONENT_PATH)/ld/esp8266.project.ld.in
|
LINKER_SCRIPT_TEMPLATE := $(COMPONENT_PATH)/ld/esp8266.project.ld.in
|
||||||
LINKER_SCRIPT_OUTPUT_DIR := $(abspath $(BUILD_DIR_BASE)/esp8266)
|
LINKER_SCRIPT_OUTPUT_DIR := $(abspath $(BUILD_DIR_BASE)/esp8266)
|
||||||
|
|
||||||
# Target to generate linker script generator from fragments presented by each of
|
# Target to generate linker script generator from fragments presented by each of
|
||||||
# the components
|
# the components
|
||||||
$(eval $(call ldgen_process_template,$(LINKER_SCRIPT_TEMPLATE),$(LINKER_SCRIPT_OUTPUT_DIR)/esp8266.project.ld))
|
$(eval $(call ldgen_process_template,$(LINKER_SCRIPT_TEMPLATE),$(LINKER_SCRIPT_OUTPUT_DIR)/esp8266.project.ld))
|
||||||
|
endif
|
||||||
|
|
||||||
# global CFLAGS for ESP8266
|
# global CFLAGS for ESP8266
|
||||||
CFLAGS += -DICACHE_FLASH
|
CFLAGS += -DICACHE_FLASH
|
||||||
|
@ -5,5 +5,8 @@
|
|||||||
COMPONENT_ADD_INCLUDEDIRS := include
|
COMPONENT_ADD_INCLUDEDIRS := include
|
||||||
COMPONENT_SRCDIRS := src
|
COMPONENT_SRCDIRS := src
|
||||||
|
|
||||||
|
# just to remove make compiling warning
|
||||||
|
src/stack_check.o: <:=
|
||||||
|
|
||||||
# disable stack protection in files which are involved in initialization of that feature
|
# disable stack protection in files which are involved in initialization of that feature
|
||||||
src/stack_check.o: CFLAGS := $(filter-out -fstack-protector%, $(CFLAGS))
|
src/stack_check.o: CFLAGS := $(filter-out -fstack-protector%, $(CFLAGS))
|
||||||
|
@ -165,7 +165,7 @@ check-lxdialog := $(SRCDIR)/lxdialog/check-lxdialog.sh
|
|||||||
# Use recursively expanded variables so we do not call gcc unless
|
# Use recursively expanded variables so we do not call gcc unless
|
||||||
# we really need to do so. (Do not call gcc as part of make mrproper)
|
# we really need to do so. (Do not call gcc as part of make mrproper)
|
||||||
CFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
|
CFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
|
||||||
-DLOCALE -MMD
|
-DLOCALE -MMD -MP
|
||||||
|
|
||||||
CFLAGS += -I "." -I "${SRCDIR}"
|
CFLAGS += -I "." -I "${SRCDIR}"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user