mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
[ESP-IDF5.1] Fix ESP32-classic and -S3 build become larger using LTO
See this explanation about `text-section-literals`: https://stackoverflow.com/questions/19532826/what-does-a-dangerous-relocation-error-mean
This commit is contained in:
@@ -45,6 +45,10 @@ extra_scripts = post:tools/pio/post_esp32.py
|
||||
; fix the platform package to use gcc-ar and gcc-ranlib to enable lto linker plugin
|
||||
; more detail: https://embeddedartistry.com/blog/2020/04/13/prefer-gcc-ar-to-ar-in-your-buildsystems/
|
||||
; pre:tools/pio/apply_patches.py
|
||||
|
||||
; When using LTO, make sure NOT to use -mtext-section-literals
|
||||
; -mtext-section-literals may be required when building large builds
|
||||
; However LTO cannot optimize builds with text section literals and thus will result in quite a lot larger builds (80k - 140k larger)
|
||||
build_unflags = -Wall
|
||||
-fno-lto
|
||||
build_flags = ${core_esp32_IDF5_1__3_0_0.build_flags}
|
||||
@@ -100,9 +104,10 @@ build_unflags = ${esp32_base.build_unflags}
|
||||
[esp32_common_LittleFS]
|
||||
extends = esp32_base_idf5
|
||||
build_flags = ${esp32_base_idf5.build_flags}
|
||||
-mtext-section-literals
|
||||
; -mtext-section-literals
|
||||
-DESP32_CLASSIC
|
||||
-DUSE_LITTLEFS
|
||||
build_unflags = ${esp32_base_idf5.build_unflags}
|
||||
extra_scripts = ${esp32_common.extra_scripts}
|
||||
board_build.filesystem = littlefs
|
||||
lib_ignore = ${esp32_always.lib_ignore}
|
||||
|
||||
@@ -22,7 +22,7 @@ lib_ignore = ${esp32_common_LittleFS.lib_ignore}
|
||||
ESP32_ping
|
||||
${esp32_base_idf5.lib_ignore}
|
||||
build_flags = ${esp32_base_idf5.build_flags}
|
||||
-mtext-section-literals
|
||||
; -mtext-section-literals
|
||||
-DFEATURE_ARDUINO_OTA=1
|
||||
-DUSE_LITTLEFS
|
||||
-DESP32S3
|
||||
|
||||
Reference in New Issue
Block a user