mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-13 08:48:38 +02:00
merge
This commit is contained in:
parent
eb6d2ca272
commit
60caf00787
9 changed files with 90 additions and 15 deletions
|
|
@ -3,15 +3,17 @@
|
||||||
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
# SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
cat << EOF >"ps4-toolchain.cmake"
|
OO_PS4_TOOLCHAIN="/home/xerix/src/ps4-sdk/prefix"
|
||||||
|
|
||||||
|
[ -f "ps4-toolchain.cmake" ] || cat << EOF >"ps4-toolchain.cmake"
|
||||||
set(CMAKE_SYSROOT "$OO_PS4_TOOLCHAIN")
|
set(CMAKE_SYSROOT "$OO_PS4_TOOLCHAIN")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "-D_LIBCPP_HAS_MUSL_LIBC=1 -D_GNU_SOURCE=1 --target=x86_64-pc-freebsd12-elf -funwind-tables -isystem $OO_PS4_TOOLCHAIN/include -isystem $OO_PS4_TOOLCHAIN/include/c++/v1")
|
set(CMAKE_C_FLAGS "-D_LIBCPP_HAS_MUSL_LIBC=1 -D_GNU_SOURCE=1 --target=x86_64-pc-freebsd12-elf -mtune=x86-64 -march=x86-64 -funwind-tables -nostdinc -isystem $OO_PS4_TOOLCHAIN/include/c++/v1 -isystem $OO_PS4_TOOLCHAIN/include")
|
||||||
set(CMAKE_CXX_FLAGS "-D_LIBCPP_HAS_MUSL_LIBC=1 -D_GNU_SOURCE=1 --target=x86_64-pc-freebsd12-elf -funwind-tables -isystem $OO_PS4_TOOLCHAIN/include -isystem $OO_PS4_TOOLCHAIN/include/c++/v1")
|
set(CMAKE_CXX_FLAGS "-D_LIBCPP_HAS_MUSL_LIBC=1 -D_GNU_SOURCE=1 --target=x86_64-pc-freebsd12-elf -mtune=x86-64 -march=x86-64 -funwind-tables -nostdinc -isystem $OO_PS4_TOOLCHAIN/include/c++/v1 -isystem $OO_PS4_TOOLCHAIN/include")
|
||||||
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-m elf_x86_64 -pie --script $OO_PS4_TOOLCHAIN/link.x --eh-frame-hdr -L$OO_PS4_TOOLCHAIN/lib -lc -lkernel -lc++ -lSceUserService -lSceVideoOut -lSceAudioOut -lScePad -lSceSysmodule -lSceFreeType $OO_PS4_TOOLCHAIN/lib/crt1.o")
|
set(CMAKE_EXE_LINKER_FLAGS "-m elf_x86_64 -pie --script $OO_PS4_TOOLCHAIN/link.x --eh-frame-hdr -L$OO_PS4_TOOLCHAIN/lib")
|
||||||
set(CMAKE_C_LINK_FLAGS "-m elf_x86_64 -pie --script $OO_PS4_TOOLCHAIN/link.x --eh-frame-hdr -L$OO_PS4_TOOLCHAIN/lib -lc -lkernel -lSceUserService -lSceVideoOut -lSceAudioOut -lScePad -lSceSysmodule -lSceFreeType $OO_PS4_TOOLCHAIN/lib/crt1.o")
|
set(CMAKE_C_LINK_FLAGS "-lc -lkernel -lSceUserService -lSceVideoOut -lSceAudioOut -lScePad -lSceSysmodule -lSceFreeType $OO_PS4_TOOLCHAIN/lib/crt1.o")
|
||||||
set(CMAKE_CXX_LINK_FLAGS "-m elf_x86_64 -pie --script $OO_PS4_TOOLCHAIN/link.x --eh-frame-hdr -L$OO_PS4_TOOLCHAIN/lib -lc -lkernel -lc++ -lSceUserService -lSceVideoOut -lSceAudioOut -lScePad -lSceSysmodule -lSceFreeType $OO_PS4_TOOLCHAIN/lib/crt1.o")
|
set(CMAKE_CXX_LINK_FLAGS "<CMAKE_C_LINK_FLAGS> -lc++")
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER clang)
|
set(CMAKE_C_COMPILER clang)
|
||||||
set(CMAKE_CXX_COMPILER clang++)
|
set(CMAKE_CXX_COMPILER clang++)
|
||||||
|
|
@ -36,9 +38,7 @@ fi
|
||||||
# Normally a platform has a package manager
|
# Normally a platform has a package manager
|
||||||
# PS4 does not, atleast not in the normal sense
|
# PS4 does not, atleast not in the normal sense
|
||||||
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
export EXTRA_CMAKE_FLAGS=("${EXTRA_CMAKE_FLAGS[@]}" $@)
|
||||||
mkdir -p build
|
cmake -S . -B build -G Ninja \
|
||||||
cd build
|
|
||||||
cmake .. -G Ninja \
|
|
||||||
-DCMAKE_TOOLCHAIN_FILE="ps4-toolchain.cmake" \
|
-DCMAKE_TOOLCHAIN_FILE="ps4-toolchain.cmake" \
|
||||||
-DENABLE_QT_TRANSLATION=OFF \
|
-DENABLE_QT_TRANSLATION=OFF \
|
||||||
-DENABLE_CUBEB=OFF \
|
-DENABLE_CUBEB=OFF \
|
||||||
|
|
@ -54,4 +54,4 @@ cmake .. -G Ninja \
|
||||||
-DYUZU_USE_EXTERNAL_FFMPEG=ON \
|
-DYUZU_USE_EXTERNAL_FFMPEG=ON \
|
||||||
-DYUZU_USE_CPM=ON \
|
-DYUZU_USE_CPM=ON \
|
||||||
"${EXTRA_CMAKE_FLAGS[@]}" || exit
|
"${EXTRA_CMAKE_FLAGS[@]}" || exit
|
||||||
ninja -j${NPROC} || exit
|
cmake --build build --parallel
|
||||||
|
|
|
||||||
17
.patch/boost/0004-openorbis.patch
Normal file
17
.patch/boost/0004-openorbis.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
diff --git a/libs/asio/include/boost/asio/detail/impl/socket_ops.ipp b/libs/asio/include/boost/asio/detail/impl/socket_ops.ipp
|
||||||
|
index 0129511c..10fc9b04 100644
|
||||||
|
--- a/libs/asio/include/boost/asio/detail/impl/socket_ops.ipp
|
||||||
|
+++ b/libs/asio/include/boost/asio/detail/impl/socket_ops.ipp
|
||||||
|
@@ -15,6 +15,12 @@
|
||||||
|
# pragma once
|
||||||
|
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
|
||||||
|
|
||||||
|
+// hacky fix for ps4
|
||||||
|
+#if defined(_LIBCPP_HAS_MUSL_LIBC)
|
||||||
|
+# define FIONBIO 0
|
||||||
|
+# define FIONREAD 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#include <boost/asio/detail/config.hpp>
|
||||||
|
|
||||||
|
#include <cctype>
|
||||||
13
.patch/enet/0001-openorbis.patch
Normal file
13
.patch/enet/0001-openorbis.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/unix.c b/unix.c
|
||||||
|
index 6669216..86a2faa 100644
|
||||||
|
--- a/unix.c
|
||||||
|
+++ b/unix.c
|
||||||
|
@@ -53,7 +53,7 @@
|
||||||
|
#include <poll.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if !defined(HAS_SOCKLEN_T) && !defined(__socklen_t_defined)
|
||||||
|
+#if !defined(_LIBCPP_HAS_MUSL_LIBC) && !defined(HAS_SOCKLEN_T) && !defined(__socklen_t_defined)
|
||||||
|
typedef int socklen_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
13
.patch/mbedtls/0002-aesni-fix.patch
Normal file
13
.patch/mbedtls/0002-aesni-fix.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
diff --git a/library/aesni.h b/library/aesni.h
|
||||||
|
index 754c984c79..59e27afd3e 100644
|
||||||
|
--- a/library/aesni.h
|
||||||
|
+++ b/library/aesni.h
|
||||||
|
@@ -35,7 +35,7 @@
|
||||||
|
/* GCC-like compilers: currently, we only support intrinsics if the requisite
|
||||||
|
* target flag is enabled when building the library (e.g. `gcc -mpclmul -msse2`
|
||||||
|
* or `clang -maes -mpclmul`). */
|
||||||
|
-#if (defined(__GNUC__) || defined(__clang__)) && defined(__AES__) && defined(__PCLMUL__)
|
||||||
|
+#if (defined(__GNUC__) || defined(__clang__)) && !defined(_LIBCPP_HAS_MUSL_LIBC)
|
||||||
|
#define MBEDTLS_AESNI_HAVE_INTRINSICS
|
||||||
|
#endif
|
||||||
|
/* For 32-bit, we only support intrinsics */
|
||||||
25
.patch/spirv-tools/0003-openorbis.patch
Normal file
25
.patch/spirv-tools/0003-openorbis.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
diff --git a/source/opt/loop_dependence.cpp b/source/opt/loop_dependence.cpp
|
||||||
|
index e41c044..a51b53b 100644
|
||||||
|
--- a/source/opt/loop_dependence.cpp
|
||||||
|
+++ b/source/opt/loop_dependence.cpp
|
||||||
|
@@ -12,6 +12,12 @@
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
+// PS4: issue?
|
||||||
|
+#ifdef __PS4__
|
||||||
|
+#pragma clang diagnostic ignored "-Wabsolute-value"
|
||||||
|
+#pragma clang diagnostic ignored "-Wshorten-64-to-32"
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#include "source/opt/loop_dependence.h"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
@@ -19,6 +25,7 @@
|
||||||
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
+#include <cstdlib>
|
||||||
|
|
||||||
|
#include "source/opt/instruction.h"
|
||||||
|
#include "source/opt/scalar_analysis_nodes.h"
|
||||||
|
|
@ -17,7 +17,8 @@
|
||||||
"version": "1.57",
|
"version": "1.57",
|
||||||
"find_args": "CONFIG OPTIONAL_COMPONENTS headers context system fiber filesystem",
|
"find_args": "CONFIG OPTIONAL_COMPONENTS headers context system fiber filesystem",
|
||||||
"patches": [
|
"patches": [
|
||||||
"0001-clang-cl.patch"
|
"0001-clang-cl.patch",
|
||||||
|
"0004-openorbis.patch"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"fmt": {
|
"fmt": {
|
||||||
|
|
|
||||||
5
externals/cpmfile.json
vendored
5
externals/cpmfile.json
vendored
|
|
@ -100,7 +100,10 @@
|
||||||
"hash": "a0d2fa8c957704dd49e00a726284ac5ca034b50b00d2b20a94fa1bbfbb80841467834bfdc84aa0ed0d6aab894608fd6c86c3b94eee46343f0e6d9c22e391dbf9",
|
"hash": "a0d2fa8c957704dd49e00a726284ac5ca034b50b00d2b20a94fa1bbfbb80841467834bfdc84aa0ed0d6aab894608fd6c86c3b94eee46343f0e6d9c22e391dbf9",
|
||||||
"version": "1.3",
|
"version": "1.3",
|
||||||
"git_version": "1.3.18",
|
"git_version": "1.3.18",
|
||||||
"find_args": "MODULE"
|
"find_args": "MODULE",
|
||||||
|
"patches": [
|
||||||
|
"0001-openorbis.patch"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"spirv-headers": {
|
"spirv-headers": {
|
||||||
"package": "SPIRV-Headers",
|
"package": "SPIRV-Headers",
|
||||||
|
|
|
||||||
5
externals/ffmpeg/CMakeLists.txt
vendored
5
externals/ffmpeg/CMakeLists.txt
vendored
|
|
@ -240,7 +240,10 @@ else()
|
||||||
--enable-pic
|
--enable-pic
|
||||||
--cc="${FFmpeg_CC}"
|
--cc="${FFmpeg_CC}"
|
||||||
--cxx="${FFmpeg_CXX}"
|
--cxx="${FFmpeg_CXX}"
|
||||||
${FFmpeg_CROSS_COMPILE_FLAG}
|
--ld="${CMAKE_LINKER}"
|
||||||
|
--ldflags="${CMAKE_C_LINK_FLAGS}"
|
||||||
|
--cflags="${CMAKE_C_FLAGS}"
|
||||||
|
--cxxflags="${CMAKE_CXX_FLAGS}"
|
||||||
${FFmpeg_HWACCEL_FLAGS}
|
${FFmpeg_HWACCEL_FLAGS}
|
||||||
${FFmpeg_CROSS_COMPILE_FLAGS}
|
${FFmpeg_CROSS_COMPILE_FLAGS}
|
||||||
WORKING_DIRECTORY
|
WORKING_DIRECTORY
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
// clang-format on
|
// clang-format on
|
||||||
#else
|
#else
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
#if defined(__APPLE__) || (defined(__FreeBSD__) && !defined(_LIBCPP_HAS_MUSL_LIBC))
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
|
|
@ -43,7 +43,7 @@ static MemoryInfo Detect() {
|
||||||
sysctlbyname("vm.swapusage", &vmusage, &sizeof_vmusage, nullptr, 0);
|
sysctlbyname("vm.swapusage", &vmusage, &sizeof_vmusage, nullptr, 0);
|
||||||
mem_info.TotalPhysicalMemory = ramsize;
|
mem_info.TotalPhysicalMemory = ramsize;
|
||||||
mem_info.TotalSwapMemory = vmusage.xsu_total;
|
mem_info.TotalSwapMemory = vmusage.xsu_total;
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__) && !defined(_LIBCPP_HAS_MUSL_LIBC)
|
||||||
u_long physmem, swap_total;
|
u_long physmem, swap_total;
|
||||||
std::size_t sizeof_u_long = sizeof(u_long);
|
std::size_t sizeof_u_long = sizeof(u_long);
|
||||||
// sysctlbyname(const char *, void *, size_t *, const void *, size_t);
|
// sysctlbyname(const char *, void *, size_t *, const void *, size_t);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue