mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 06:34:34 +02:00
tools: cmake: ignore linker RWX segment warnings
This commit is contained in:
@@ -69,6 +69,7 @@ if(ULP_COCPU_IS_RISCV)
|
||||
target_include_directories(${ULP_APP_NAME} PRIVATE "${IDF_PATH}/components/ulp/ulp_riscv/ulp_core/include"
|
||||
"${IDF_PATH}/components/ulp/ulp_riscv/shared/include")
|
||||
target_link_options(${ULP_APP_NAME} PRIVATE SHELL:-T ${IDF_PATH}/components/ulp/ld/${IDF_TARGET}.peripherals.ld)
|
||||
target_link_options(${ULP_APP_NAME} PRIVATE "-Wl,--no-warn-rwx-segments")
|
||||
target_compile_definitions(${ULP_APP_NAME} PRIVATE IS_ULP_COCPU)
|
||||
|
||||
else()
|
||||
|
@@ -559,6 +559,15 @@ macro(project project_name)
|
||||
target_link_options(${project_elf} PRIVATE "-Wl,--defsym=IDF_TARGET_${idf_target}=0")
|
||||
# Enable map file output
|
||||
target_link_options(${project_elf} PRIVATE "-Wl,--Map=${mapfile}")
|
||||
# Check if linker supports --no-warn-rwx-segments
|
||||
execute_process(COMMAND ${CMAKE_LINKER} "--no-warn-rwx-segments" "--version"
|
||||
RESULT_VARIABLE result
|
||||
OUTPUT_QUIET
|
||||
ERROR_QUIET)
|
||||
if(${result} EQUAL 0)
|
||||
# Do not print RWX segment warnings
|
||||
target_link_options(${project_elf} PRIVATE "-Wl,--no-warn-rwx-segments")
|
||||
endif()
|
||||
unset(idf_target)
|
||||
endif()
|
||||
|
||||
|
Reference in New Issue
Block a user