Skip to content

Commit fc43b44

Browse files
committed
CMake: Added workaround for GCC 7.5.0 to build esfm.c with MinSizeRel
1 parent 3b7fa79 commit fc43b44

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ function(handle_options targetLib)
393393
${libADLMIDI_SOURCE_DIR}/src/chips/esfmu/esfm_registers.c
394394
${libADLMIDI_SOURCE_DIR}/src/chips/esfmu/esfm.h
395395
)
396+
397+
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CC_COMPILER_VERSION STREQUAL "7.5.0" AND CMAKE_BUILD_TYPE_LOWER STREQUAL "minsizerel")
398+
# Workaround to build on GCC 7.5.0
399+
set_source_files_properties("${libADLMIDI_SOURCE_DIR}/src/chips/esfmu/esfm.c" COMPILE_FLAGS "-fomit-frame-pointer")
400+
endif()
396401
else()
397402
target_compile_definitions(${targetLib} PUBLIC ADLMIDI_DISABLE_ESFMU_EMULATOR)
398403
endif()

0 commit comments

Comments
 (0)