mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
cmake: enable linker warnings on common symbols
GCC since version 10 uses -fno-common by default and will not emit common symbols. Enable this option to find the occurrences of common symbols in ESP-IDF. Closes https://github.com/espressif/esp-idf/issues/5080
This commit is contained in:

committed by
Anton Maklakov

parent
0ac6a105ef
commit
9720cb72cb
@@ -195,6 +195,7 @@ if(CONFIG_ESP_SYSTEM_USE_EH_FRAME)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
list(APPEND link_options "-fno-lto")
|
list(APPEND link_options "-fno-lto")
|
||||||
|
list(APPEND link_options "-Wl,--warn-common")
|
||||||
|
|
||||||
if(CONFIG_IDF_TARGET_LINUX AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
if(CONFIG_IDF_TARGET_LINUX AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
|
||||||
list(APPEND link_options "-Wl,-dead_strip")
|
list(APPEND link_options "-Wl,-dead_strip")
|
||||||
|
Reference in New Issue
Block a user