Index: files/patch-build_premake_premake5.lua =================================================================== --- files/patch-build_premake_premake5.lua (revision 566819) +++ files/patch-build_premake_premake5.lua (working copy) @@ -1,5 +1,14 @@ ---- build/premake/premake5.lua.orig 2021-02-06 00:32:37 UTC +--- build/premake/premake5.lua.orig 2021-02-28 23:45:14 UTC +++ build/premake/premake5.lua +@@ -87,6 +87,8 @@ else + arch = "aarch64" + elseif string.find(machine, "e2k") == 1 then + arch = "e2k" ++ elseif string.find(machine, "ppc64") == 1 or string.find(machine, "powerpc64") == 1 then ++ arch = "ppc64" + else + print("WARNING: Cannot determine architecture from GCC, assuming x86") + end @@ -365,7 +365,7 @@ function project_set_build_flags() if os.istarget("linux") or os.istarget("bsd") then @@ -9,3 +18,12 @@ end -- To use our local shared libraries, they need to be found in the +@@ -865,6 +867,8 @@ function setup_all_libs () + table.insert(source_dirs, "lib/sysdep/arch/aarch64"); + elseif arch == "e2k" then + table.insert(source_dirs, "lib/sysdep/arch/e2k"); ++ elseif arch == "ppc64" then ++ table.insert(source_dirs, "lib/sysdep/arch/ppc64"); + end + + -- OS-specific Index: files/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp =================================================================== --- files/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp (nonexistent) +++ files/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp (working copy) @@ -0,0 +1,12 @@ +--- libraries/source/nvtt/src/src/nvcore/Debug.cpp.orig 2021-02-28 23:45:14 UTC ++++ libraries/source/nvtt/src/src/nvcore/Debug.cpp +@@ -628,6 +628,9 @@ namespace + # elif NV_CPU_X86 + ucontext_t * ucp = (ucontext_t *)secret; + return (void *)ucp->uc_mcontext.mc_eip; ++# elif NV_CPU_PPC ++ ucontext_t * ucp = (ucontext_t *)secret; ++ return (void *)ucp->uc_mcontext.mc_srr0; + # else + # error "Unknown CPU" + # endif Property changes on: files/patch-libraries_source_nvtt_src_src_nvcore_Debug.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-source_lib_byte__order.h =================================================================== --- files/patch-source_lib_byte__order.h (nonexistent) +++ files/patch-source_lib_byte__order.h (working copy) @@ -0,0 +1,11 @@ +--- source/lib/byte_order.h.orig 2021-02-28 23:45:13 UTC ++++ source/lib/byte_order.h +@@ -33,7 +33,7 @@ + #ifndef BYTE_ORDER + # define LITTLE_ENDIAN 0x4321 + # define BIG_ENDIAN 0x1234 +-# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || defined(__LITTLE_ENDIAN__) ++# if ARCH_IA32 || ARCH_IA64 || ARCH_AMD64 || ARCH_ALPHA || ARCH_ARM || ARCH_AARCH64 || ARCH_MIPS || ARCH_E2K || ARCH_PPC64 || defined(__LITTLE_ENDIAN__) + # define BYTE_ORDER LITTLE_ENDIAN + # else + # define BYTE_ORDER BIG_ENDIAN Property changes on: files/patch-source_lib_byte__order.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-source_lib_sysdep_arch.h =================================================================== --- files/patch-source_lib_sysdep_arch.h (nonexistent) +++ files/patch-source_lib_sysdep_arch.h (working copy) @@ -0,0 +1,18 @@ +--- source/lib/sysdep/arch.h.orig 2021-02-28 23:45:13 UTC ++++ source/lib/sysdep/arch.h +@@ -76,9 +76,14 @@ + #else + # define ARCH_E2K 0 + #endif ++#if defined(__PPC64__) ++# define ARCH_PPC64 1 ++#else ++# define ARCH_PPC64 0 ++#endif + + // ensure exactly one architecture has been detected +-#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_E2K) != 1 ++#if (ARCH_IA32+ARCH_IA64+ARCH_AMD64+ARCH_ALPHA+ARCH_ARM+ARCH_AARCH64+ARCH_MIPS+ARCH_E2K+ARCH_PPC64) != 1 + # error "architecture not correctly detected (either none or multiple ARCH_* defined)" + #endif + Property changes on: files/patch-source_lib_sysdep_arch.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp =================================================================== --- files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp (nonexistent) +++ files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp (working copy) @@ -0,0 +1,53 @@ +--- source/lib/sysdep/arch/ppc64/ppc64.cpp.orig 2021-02-28 23:47:02 UTC ++++ source/lib/sysdep/arch/ppc64/ppc64.cpp +@@ -0,0 +1,50 @@ ++/* Copyright (C) 2012 Wildfire Games ++ * Copyright (C) 2018 Raptor Engineering, LLC ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining ++ * a copy of this software and associated documentation files (the ++ * "Software"), to deal in the Software without restriction, including ++ * without limitation the rights to use, copy, modify, merge, publish, ++ * distribute, sublicense, and/or sell copies of the Software, and to ++ * permit persons to whom the Software is furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ++ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++/* ++ * routines specific to POWER ++ */ ++ ++#include "precompiled.h" ++ ++#include "lib/sysdep/cpu.h" ++ ++intptr_t cpu_AtomicAdd(volatile intptr_t* location, intptr_t increment) ++{ ++ return __sync_fetch_and_add(location, increment); ++} ++ ++bool cpu_CAS(volatile intptr_t* location, intptr_t expected, intptr_t newValue) ++{ ++ return __sync_bool_compare_and_swap(location, expected, newValue); ++} ++ ++bool cpu_CAS64(volatile i64* location, i64 expected, i64 newValue) ++{ ++ return __sync_bool_compare_and_swap(location, expected, newValue); ++} ++ ++const char* cpu_IdentifierString() ++{ ++ return "IBM POWER"; // TODO ++} Property changes on: files/patch-source_lib_sysdep_arch_ppc64_ppc64.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: files/patch-source_ps_GameSetup_HWDetect.cpp =================================================================== --- files/patch-source_ps_GameSetup_HWDetect.cpp (nonexistent) +++ files/patch-source_ps_GameSetup_HWDetect.cpp (working copy) @@ -0,0 +1,10 @@ +--- source/ps/GameSetup/HWDetect.cpp.orig 2021-02-28 23:45:13 UTC ++++ source/ps/GameSetup/HWDetect.cpp +@@ -124,6 +124,7 @@ void RunHardwareDetection() + scriptInterface.SetProperty(settings, "arch_arm", ARCH_ARM); + scriptInterface.SetProperty(settings, "arch_aarch64", ARCH_AARCH64); + scriptInterface.SetProperty(settings, "arch_e2k", ARCH_E2K); ++ scriptInterface.SetProperty(settings, "arch_ppc64", ARCH_PPC64); + + #ifdef NDEBUG + scriptInterface.SetProperty(settings, "build_debug", 0); Property changes on: files/patch-source_ps_GameSetup_HWDetect.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property