build: add option COMPILER_DISABLE_GCC12_WARNINGS

pull/10856/head
Alexey Lapshin 2023-02-15 15:01:52 +07:00
rodzic 2ef6215621
commit 0da15a7a19
3 zmienionych plików z 17 dodań i 0 usunięć

Wyświetl plik

@ -179,6 +179,11 @@ if(NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS 8.0.0)
endif()
endif()
if(CONFIG_COMPILER_DISABLE_GCC12_WARNINGS)
list(APPEND compile_options "-Wno-address"
"-Wno-use-after-free")
endif()
# GCC-specific options
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
list(APPEND compile_options "-fstrict-volatile-bitfields"

Wyświetl plik

@ -505,6 +505,13 @@ mainmenu "Espressif IoT Development Framework Configuration"
This option can be enabled for RISC-V targets only.
config COMPILER_DISABLE_GCC12_WARNINGS
bool "Disable new warnings introduced in GCC 12"
default "n"
help
Enable this option if use GCC 12 or newer, and want to disable warnings which don't appear with
GCC 11.
config COMPILER_DUMP_RTL_FILES
bool "Dump RTL files during compilation"
help

Wyświetl plik

@ -294,3 +294,8 @@
-
re: "Error: libusb_open\\(\\) failed with LIBUSB_ERROR_ACCESS"
hint: "OpenOCD process does not have permissions to access the USB JTAG/serial device. Please use 'LIBUSB_DEBUG=1 idf.py openocd' to find out the device name and check its access rights."
-
re: "(-Werror=address|-Werror=use-after-free)"
hint: "The warning(s) '{}' may appear after compiler update above GCC-12\nTo suppress these warnings use 'idf.py menuconfig' to enable configure option 'Compiler options' -> 'Disable new warnings introduced in GCC 12'\nPlease note that this is not a permanent solution, and this option will be removed in a future update of the ESP-IDF.\nIt is strongly recommended to fix all warnings, as they may indicate potential issues!"
match_to_output: True