mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 19:54:32 +02:00
esp32: disable -Wframe-address
Since the behavior is well defined on Xtensa with Window ABI we can suppress a frame-address warning. Also fix the CMAKE_C*_FLAGS parsing.
This commit is contained in:
committed by
Ivan Grokhotkov
parent
5719cd6fac
commit
2e6c8cdce3
@@ -397,6 +397,7 @@ endif #CONFIG_WARN_WRITE_STRINGS
|
|||||||
|
|
||||||
# Flags which control code generation and dependency generation, both for C and C++
|
# Flags which control code generation and dependency generation, both for C and C++
|
||||||
COMMON_FLAGS = \
|
COMMON_FLAGS = \
|
||||||
|
-Wno-frame-address \
|
||||||
-ffunction-sections -fdata-sections \
|
-ffunction-sections -fdata-sections \
|
||||||
-fstrict-volatile-bitfields \
|
-fstrict-volatile-bitfields \
|
||||||
-mlongcalls \
|
-mlongcalls \
|
||||||
|
@@ -92,6 +92,8 @@ function(idf_set_global_compile_options)
|
|||||||
|
|
||||||
list(APPEND compile_definitions "ESP_PLATFORM" "HAVE_CONFIG_H")
|
list(APPEND compile_definitions "ESP_PLATFORM" "HAVE_CONFIG_H")
|
||||||
|
|
||||||
|
spaces2list(CMAKE_C_FLAGS)
|
||||||
|
spaces2list(CMAKE_CXX_FLAGS)
|
||||||
list(APPEND compile_options "${CMAKE_C_FLAGS}")
|
list(APPEND compile_options "${CMAKE_C_FLAGS}")
|
||||||
list(APPEND c_compile_options "${CMAKE_C_FLAGS}")
|
list(APPEND c_compile_options "${CMAKE_C_FLAGS}")
|
||||||
list(APPEND cxx_compile_options "${CMAKE_CXX_FLAGS}")
|
list(APPEND cxx_compile_options "${CMAKE_CXX_FLAGS}")
|
||||||
|
@@ -5,5 +5,5 @@ set(CMAKE_CXX_COMPILER xtensa-esp32-elf-g++)
|
|||||||
set(CMAKE_ASM_COMPILER xtensa-esp32-elf-gcc)
|
set(CMAKE_ASM_COMPILER xtensa-esp32-elf-gcc)
|
||||||
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-nostdlib" CACHE STRING "Linker Base Flags")
|
set(CMAKE_EXE_LINKER_FLAGS "-nostdlib" CACHE STRING "Linker Base Flags")
|
||||||
set(CMAKE_C_FLAGS "-mlongcalls" CACHE STRING "C Compiler Base Flags")
|
set(CMAKE_C_FLAGS "-mlongcalls -Wno-frame-address" CACHE STRING "C Compiler Base Flags")
|
||||||
set(CMAKE_CXX_FLAGS "-mlongcalls" CACHE STRING "C++ Compiler Base Flags")
|
set(CMAKE_CXX_FLAGS "-mlongcalls -Wno-frame-address" CACHE STRING "C++ Compiler Base Flags")
|
||||||
|
Reference in New Issue
Block a user