From 2fcd38c2bc7d8f1cc8c621a28315dcdb4808cc9e Mon Sep 17 00:00:00 2001 From: Aurora Date: Tue, 8 Aug 2017 16:11:47 +0200 Subject: [PATCH] Reduce the zero-page size on macOS, so that PPUThread works --- rpcs3/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index a8cad9c333..aaf10a7cf9 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -104,7 +104,11 @@ if(NOT MSVC) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # This fixes 'some' of the st11range issues. See issue #2516 - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -image-base=0x10000") + if(APPLE) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-image_base,0x10000 -Wl,-pagezero_size,0x10000") + else() + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -image-base=0x10000") + endif() endif() # Some distros have the compilers set to use PIE by default, but RPCS3 doesn't work with PIE, so we need to disable it.