]> granicus.if.org Git - esp-idf/commitdiff
esp32: disable -Wframe-address
authorAnton Maklakov <anton@espressif.com>
Tue, 9 Apr 2019 03:14:31 +0000 (10:14 +0700)
committerIvan Grokhotkov <ivan@espressif.com>
Wed, 10 Apr 2019 05:52:30 +0000 (13:52 +0800)
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.

make/project.mk
tools/cmake/idf_functions.cmake
tools/cmake/toolchain-esp32.cmake

index 06c7e02da211c58e5624dc8e97e68a84736d5e0f..17f07c2cd9339011b02e2dc4b694d7d32db34c71 100644 (file)
@@ -397,6 +397,7 @@ endif #CONFIG_WARN_WRITE_STRINGS
 
 # Flags which control code generation and dependency generation, both for C and C++
 COMMON_FLAGS = \
+       -Wno-frame-address \
        -ffunction-sections -fdata-sections \
        -fstrict-volatile-bitfields \
        -mlongcalls \
index 9da794313ad8694174d9f2ff271935132d11f90e..104144ac13aec4b0c93b12cd4cd82b50528e4eda 100644 (file)
@@ -92,6 +92,8 @@ function(idf_set_global_compile_options)
 
     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 c_compile_options "${CMAKE_C_FLAGS}")
     list(APPEND cxx_compile_options "${CMAKE_CXX_FLAGS}")
index e8fbbef2bdfc1d9658336261a171703fd71918b1..b311d7ab62ab9b3f76da0e8f1f0ec6dda0e518f0 100644 (file)
@@ -5,5 +5,5 @@ set(CMAKE_CXX_COMPILER xtensa-esp32-elf-g++)
 set(CMAKE_ASM_COMPILER xtensa-esp32-elf-gcc)
 
 set(CMAKE_EXE_LINKER_FLAGS "-nostdlib" CACHE STRING "Linker Base Flags")
-set(CMAKE_C_FLAGS "-mlongcalls" CACHE STRING "C Compiler Base Flags")
-set(CMAKE_CXX_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 -Wno-frame-address" CACHE STRING "C++ Compiler Base Flags")