From 370ac66a63f52a0a5f82cec59d30f8584dd7908f Mon Sep 17 00:00:00 2001 From: Alex Duchesne Date: Fri, 25 Jul 2025 23:35:28 -0400 Subject: [PATCH] Add the fix-psram-cache-issue module only for esp32 chip --- launcher/main/CMakeLists.txt | 5 ++++- prboom-go/components/prboom/CMakeLists.txt | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/launcher/main/CMakeLists.txt b/launcher/main/CMakeLists.txt index d2a02312..46c4dc50 100644 --- a/launcher/main/CMakeLists.txt +++ b/launcher/main/CMakeLists.txt @@ -1,7 +1,10 @@ set(COMPONENT_SRCDIRS ".") set(COMPONENT_ADD_INCLUDEDIRS ".") register_component() -rg_setup_compile_options(-O2 -Wno-error=format -Wno-error=char-subscripts -mfix-esp32-psram-cache-issue) +if(IDF_TARGET STREQUAL "esp32") + component_compile_options(-mfix-esp32-psram-cache-issue) +endif() +rg_setup_compile_options(-O2 -Wno-error=format -Wno-error=char-subscripts) # add_custom_command(OUTPUT images.c # COMMAND python ${COMPONENT_DIR}/gen_images.py diff --git a/prboom-go/components/prboom/CMakeLists.txt b/prboom-go/components/prboom/CMakeLists.txt index 3f4b6f83..acb6cb2d 100644 --- a/prboom-go/components/prboom/CMakeLists.txt +++ b/prboom-go/components/prboom/CMakeLists.txt @@ -6,6 +6,9 @@ register_component() # The PSRAM cache bug seems responsible for very odd bugs that I spent way too much time # trying to debug... In retro-go the fix is disabled because of the huge performance overhead # but I guess we'll have to live with it in at least the prboom-go module... +if(IDF_TARGET STREQUAL "esp32") + component_compile_options(-mfix-esp32-psram-cache-issue) +endif() rg_setup_compile_options( -Wno-error=address @@ -13,7 +16,6 @@ rg_setup_compile_options( -Wno-format-overflow -Wno-char-subscripts -Wno-missing-field-initializers - -mfix-esp32-psram-cache-issue -DHAVE_CONFIG_H -O2 )