From 10ccbcd94da79480a1d5c4cf29f987ff1c8d83be Mon Sep 17 00:00:00 2001 From: Denis Feklushkin Date: Mon, 15 Apr 2024 16:59:47 +0300 Subject: [PATCH 1/2] fix(spiffs): set_source_files_properties uneffective: points to unavailable files --- components/spiffs/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/spiffs/CMakeLists.txt b/components/spiffs/CMakeLists.txt index 142ad9ec29..11a346ce92 100644 --- a/components/spiffs/CMakeLists.txt +++ b/components/spiffs/CMakeLists.txt @@ -19,9 +19,6 @@ idf_component_register(SRCS ${srcs} REQUIRES esp_partition PRIV_REQUIRES ${pr} spi_flash) -if(CMAKE_C_COMPILER_ID MATCHES "GNU") - set_source_files_properties(spiffs/src/spiffs_nucleus.c PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation) -endif() - # Upstream SPIFFS code uses format specifiers in debug logging macros inconsistently +list(TRANSFORM original_srcs PREPEND "${CMAKE_CURRENT_LIST_DIR}/") set_source_files_properties(${original_srcs} PROPERTIES COMPILE_FLAGS -Wno-format) From 41830433f4dc338b29ba1f97c5907bd805a271d8 Mon Sep 17 00:00:00 2001 From: Denis Feklushkin Date: Mon, 15 Apr 2024 18:57:46 +0300 Subject: [PATCH 2/2] fix(spiffs): Compilation with -save-temps fixed --- components/spiffs/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/spiffs/CMakeLists.txt b/components/spiffs/CMakeLists.txt index 11a346ce92..10c041badd 100644 --- a/components/spiffs/CMakeLists.txt +++ b/components/spiffs/CMakeLists.txt @@ -22,3 +22,6 @@ idf_component_register(SRCS ${srcs} # Upstream SPIFFS code uses format specifiers in debug logging macros inconsistently list(TRANSFORM original_srcs PREPEND "${CMAKE_CURRENT_LIST_DIR}/") set_source_files_properties(${original_srcs} PROPERTIES COMPILE_FLAGS -Wno-format) + +get_source_file_property(nucleus_cc_flags "${CMAKE_CURRENT_LIST_DIR}/spiffs/src/spiffs_nucleus.c" COMPILE_FLAGS) +set_source_files_properties("${CMAKE_CURRENT_LIST_DIR}/spiffs/src/spiffs_nucleus.c" PROPERTIES COMPILE_FLAGS "${nucleus_cc_flags} -Wno-tautological-compare")