Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ set(WAVE_CORE_SOURCES
Source/WaveParameters.h)

add_library(WaveCore STATIC ${WAVE_CORE_SOURCES})
# Both libraries contain thread-local state and are linked into shared plugins.
set_target_properties(WaveCore WaveM68k PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(WaveCore PUBLIC Source)
target_link_libraries(WaveCore
PUBLIC
Expand Down
10 changes: 10 additions & 0 deletions cmake/PrepareMusashi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ function(wave_prepare_musashi source destination)
default_pc_changed_callback_data default_set_fc_callback_data)
foreach(filename m68kcpu.c m68kcpu.h)
file(READ "${source}/${filename}" contents)
if(filename STREQUAL "m68kcpu.c")
# Upstream repeats this tentative definition in an indented block.
# Thread-local definitions cannot be repeated with GCC 16; retain
# the first definition and make the later declarations extern.
foreach(trap_type sigjmp_buf jmp_buf)
string(REPLACE "\t${trap_type} m68ki_aerr_trap;"
"\textern ${trap_type} m68ki_aerr_trap;"
contents "${contents}")
endforeach()
endif()
foreach(symbol IN LISTS execution_state)
# Capture the whole prefix, which always participates in the match.
# CMake < 4.1 rejects a backreference to an unmatched optional group.
Expand Down
Loading