esp_rom: don’t include locale functions when compiling with newlib 3

pull/3317/head^2
Ivan Grokhotkov 2019-03-29 12:37:51 +08:00
rodzic e84b26f531
commit 8c2f2867d8
4 zmienionych plików z 27 dodań i 8 usunięć

Wyświetl plik

@ -27,6 +27,10 @@ else()
target_linker_script(${COMPONENT_TARGET} "esp32/ld/esp32.rom.newlib-nano.ld")
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)
target_linker_script(${COMPONENT_TARGET} "esp32/ld/esp32.rom.spiflash.ld")
endif()

Wyświetl plik

@ -16,6 +16,10 @@ ifdef CONFIG_NEWLIB_NANO_FORMAT
LINKER_SCRIPTS += esp32.rom.newlib-nano.ld
endif
ifneq ($(GCC_NOT_5_2_0), 1)
LINKER_SCRIPTS += esp32.rom.newlib-locale.ld
endif
ifndef CONFIG_SPI_FLASH_ROM_DRIVER_PATCH
LINKER_SCRIPTS += esp32.rom.spiflash.ld
endif

Wyświetl plik

@ -63,12 +63,6 @@ __itoa = 0x40056678;
itoa = 0x400566b4;
labs = 0x40056370;
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_r = 0x400595fc;
longjmp = 0x400562cc;
@ -87,8 +81,6 @@ __sccl = 0x4000c498;
__sclose = 0x400011b8;
__seofread = 0x40001148;
setjmp = 0x40056268;
setlocale = 0x40059568;
_setlocale_r = 0x4005950c;
__sflush_r = 0x400591e0;
__sfmoreglue = 0x40001dc8;
__sfp = 0x40001e90;

Wyświetl plik

@ -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;