[compat] openbsd port fixes (#273)

Signed-off-by: lizzie <lizzie@eden-emu.dev>
Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: #273
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie 2025-09-08 00:54:48 +02:00 committed by crueter
parent 10dd003d0f
commit 43c41e4db5
Signed by: crueter
GPG key ID: 425ACD2D4830EBC6
10 changed files with 39 additions and 14 deletions

View file

@ -7,7 +7,7 @@
#include <boost/asio.hpp>
#include <boost/version.hpp>
#if BOOST_VERSION > 108300 && (!defined(_WINDOWS) && !defined(ANDROID)) || defined(YUZU_BOOST_v1)
#if BOOST_VERSION > 108400 && (!defined(_WINDOWS) && !defined(ANDROID)) || defined(YUZU_BOOST_v1)
#define USE_BOOST_v1
#endif

View file

@ -14,12 +14,24 @@ endif()
# Dynarmic project options
option(DYNARMIC_ENABLE_CPU_FEATURE_DETECTION "Turning this off causes dynarmic to assume the host CPU doesn't support anything later than SSE3" ON)
option(DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT "Enables support for systems that require W^X" OFF)
if (PLATFORM_OPENBSD)
option(DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT "Enables support for systems that require W^X" ON)
else()
option(DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT "Enables support for systems that require W^X" OFF)
endif()
option(DYNARMIC_FATAL_ERRORS "Errors are fatal" OFF)
option(DYNARMIC_IGNORE_ASSERTS "Ignore asserts" OFF)
option(DYNARMIC_TESTS_USE_UNICORN "Enable fuzzing tests against unicorn" OFF)
option(DYNARMIC_USE_LLVM "Support disassembly of jitted x86_64 code using LLVM" OFF)
option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
if (PLATFORM_OPENBSD)
option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF)
else()
option(DYNARMIC_USE_PRECOMPILED_HEADERS "Use precompiled headers" ON)
endif()
option(DYNARMIC_INSTALL "Install dynarmic headers and CMake files" OFF)
option(DYNARMIC_USE_BUNDLED_EXTERNALS "Use all bundled externals (useful when e.g. cross-compiling)" OFF)
option(DYNARMIC_WARNINGS_AS_ERRORS "Warnings as errors" ${MASTER_PROJECT})

View file

@ -60,13 +60,6 @@ AddJsonPackage(
# endif()
# endif()
# unordered_dense
# AddJsonPackage(
# NAME unordered-dense
# BUNDLED_PACKAGE ${DYNARMIC_USE_BUNDLED_EXTERNALS}
# )
# xbyak
# uncomment if in an independent repo

View file

@ -225,8 +225,14 @@ bool IsUnderRosetta() {
} // anonymous namespace
#ifdef DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT
static const auto default_cg_mode = Xbyak::DontSetProtectRWE;
#else
static const auto default_cg_mode = nullptr; //Allow RWE
#endif
BlockOfCode::BlockOfCode(RunCodeCallbacks cb, JitStateInfo jsi, size_t total_code_size, std::function<void(BlockOfCode&)> rcp)
: Xbyak::CodeGenerator(total_code_size, nullptr, &s_allocator)
: Xbyak::CodeGenerator(total_code_size, default_cg_mode, &s_allocator)
, cb(std::move(cb))
, jsi(jsi)
, constant_pool(*this, CONSTANT_POOL_SIZE)

View file

@ -37,7 +37,7 @@ namespace {
struct SpinLockImpl {
void Initialize();
Xbyak::CodeGenerator code;
Xbyak::CodeGenerator code = Xbyak::CodeGenerator(4096, Xbyak::DontSetProtectRWE);
void (*lock)(volatile int*);
void (*unlock)(volatile int*);