rom: fix newlib time ROM functions being regardless of CONFIG_SPIRAM_CACHE_WORKAROUND

On ESP32 ROM functions are not compatible with CONFIG_SPIRAM_CACHE_WORKAROUND.
This were handled correctly in cmake, but not in make.
This commit is contained in:
Marius Vikhammer 2023-03-30 16:19:38 +08:00 committed by BOT
parent 33b3db35d7
commit e3d109dd1d

View File

@ -24,12 +24,6 @@ ifdef CONFIG_NEWLIB_NANO_FORMAT
LINKER_SCRIPTS += esp32.rom.newlib-nano.ld
endif
endif #CONFIG_SPIRAM_CACHE_WORKAROUND
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
LINKER_SCRIPTS += esp32.rom.spiflash.ld
endif
ifndef CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS
# If SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS option is defined
# then all time functions from the ROM memory will not be linked.
@ -37,6 +31,13 @@ ifndef CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS
LINKER_SCRIPTS += esp32.rom.newlib-time.ld
endif
endif #CONFIG_SPIRAM_CACHE_WORKAROUND
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
LINKER_SCRIPTS += esp32.rom.spiflash.ld
endif
COMPONENT_ADD_LDFLAGS += -L $(COMPONENT_PATH)/esp32/ld \
$(addprefix -T ,$(LINKER_SCRIPTS)) \
-l$(COMPONENT_NAME) -Wl,--wrap=longjmp \