kopia lustrzana https://github.com/espressif/esp-idf
esp_rom: don’t include locale functions when compiling with newlib 3
rodzic
e84b26f531
commit
8c2f2867d8
|
@ -27,6 +27,10 @@ else()
|
||||||
target_linker_script(${COMPONENT_TARGET} "esp32/ld/esp32.rom.newlib-nano.ld")
|
target_linker_script(${COMPONENT_TARGET} "esp32/ld/esp32.rom.newlib-nano.ld")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT GCC_NOT_5_2_0)
|
||||||
|
target_linker_script(${COMPONENT_TARGET} "esp32/ld/esp32.rom.newlib-locale.ld")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT CONFIG_SPI_FLASH_ROM_DRIVER_PATCH)
|
if(NOT CONFIG_SPI_FLASH_ROM_DRIVER_PATCH)
|
||||||
target_linker_script(${COMPONENT_TARGET} "esp32/ld/esp32.rom.spiflash.ld")
|
target_linker_script(${COMPONENT_TARGET} "esp32/ld/esp32.rom.spiflash.ld")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -16,6 +16,10 @@ ifdef CONFIG_NEWLIB_NANO_FORMAT
|
||||||
LINKER_SCRIPTS += esp32.rom.newlib-nano.ld
|
LINKER_SCRIPTS += esp32.rom.newlib-nano.ld
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(GCC_NOT_5_2_0), 1)
|
||||||
|
LINKER_SCRIPTS += esp32.rom.newlib-locale.ld
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
|
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
|
||||||
LINKER_SCRIPTS += esp32.rom.spiflash.ld
|
LINKER_SCRIPTS += esp32.rom.spiflash.ld
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -63,12 +63,6 @@ __itoa = 0x40056678;
|
||||||
itoa = 0x400566b4;
|
itoa = 0x400566b4;
|
||||||
labs = 0x40056370;
|
labs = 0x40056370;
|
||||||
ldiv = 0x40056378;
|
ldiv = 0x40056378;
|
||||||
__locale_charset = 0x40059540;
|
|
||||||
__locale_cjk_lang = 0x40059558;
|
|
||||||
localeconv = 0x4005957c;
|
|
||||||
_localeconv_r = 0x40059560;
|
|
||||||
__locale_mb_cur_max = 0x40059548;
|
|
||||||
__locale_msgcharset = 0x40059550;
|
|
||||||
localtime = 0x400595dc;
|
localtime = 0x400595dc;
|
||||||
localtime_r = 0x400595fc;
|
localtime_r = 0x400595fc;
|
||||||
longjmp = 0x400562cc;
|
longjmp = 0x400562cc;
|
||||||
|
@ -87,8 +81,6 @@ __sccl = 0x4000c498;
|
||||||
__sclose = 0x400011b8;
|
__sclose = 0x400011b8;
|
||||||
__seofread = 0x40001148;
|
__seofread = 0x40001148;
|
||||||
setjmp = 0x40056268;
|
setjmp = 0x40056268;
|
||||||
setlocale = 0x40059568;
|
|
||||||
_setlocale_r = 0x4005950c;
|
|
||||||
__sflush_r = 0x400591e0;
|
__sflush_r = 0x400591e0;
|
||||||
__sfmoreglue = 0x40001dc8;
|
__sfmoreglue = 0x40001dc8;
|
||||||
__sfp = 0x40001e90;
|
__sfp = 0x40001e90;
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
/* These are the locale-related newlib functions present in ESP32 ROM.
|
||||||
|
ESP32 ROM contains newlib version 2.2.0, and these functions should not be
|
||||||
|
used when compiling with newlib version 3, since locale implementation is
|
||||||
|
different there.
|
||||||
|
|
||||||
|
Unlike other ROM functions which are exported using PROVIDE, which declares
|
||||||
|
weak symbols, newlib related functions are exported using assignment,
|
||||||
|
which declares strong symbols. This is done so that ROM functions are always
|
||||||
|
used instead of the ones provided by libc.a.
|
||||||
|
*/
|
||||||
|
|
||||||
|
__locale_charset = 0x40059540;
|
||||||
|
__locale_cjk_lang = 0x40059558;
|
||||||
|
localeconv = 0x4005957c;
|
||||||
|
_localeconv_r = 0x40059560;
|
||||||
|
__locale_mb_cur_max = 0x40059548;
|
||||||
|
__locale_msgcharset = 0x40059550;
|
||||||
|
setlocale = 0x40059568;
|
||||||
|
_setlocale_r = 0x4005950c;
|
Ładowanie…
Reference in New Issue