MFH: r469492
emulators/rpcs3: update to 0.0.5.259 - Switch to bundled LLVM 6.0 due to downstream changes Changes:753d8170d...76a1d0d8f
Changes:f1b37feef3...6154c0dcaf
Approved by: ports-secteam (junovitch, implicit for snapshots)
This commit is contained in:
parent
747450d39b
commit
8ca211fc28
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2018Q2/; revision=469494
@ -2,8 +2,8 @@
|
||||
|
||||
PORTNAME= rpcs3
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.0.5-237
|
||||
DISTVERSIONSUFFIX= -g753d8170d
|
||||
DISTVERSION= 0.0.5-259
|
||||
DISTVERSIONSUFFIX= -g76a1d0d8f
|
||||
CATEGORIES= emulators
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
@ -25,6 +25,7 @@ ONLY_FOR_ARCHS_REASON= requires int128 and SSE2
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= RPCS3
|
||||
GH_TUPLE= RPCS3:hidapi:hidapi-0.8.0-rc1-25-gca39ce8:hidapi/3rdparty/hidapi \
|
||||
RPCS3:llvm:6154c0dcaf1:llvm/llvm \
|
||||
RPCS3:yaml-cpp:release-0.5.3-62-g017626a:yamlcpp/Utilities/yaml-cpp \
|
||||
akrzemi1:Optional:f27e790:Optional/3rdparty/Optional \
|
||||
kobalicek:asmjit:673dcef:asmjit/asmjit \
|
||||
@ -32,7 +33,7 @@ GH_TUPLE= RPCS3:hidapi:hidapi-0.8.0-rc1-25-gca39ce8:hidapi/3rdparty/hidapi \
|
||||
USCiLab:cereal:v1.2.0:cereal/3rdparty/cereal \
|
||||
zeux:pugixml:v1.8.1-148-g257fbb4:pugixml/3rdparty/pugixml
|
||||
|
||||
USES= cmake compiler:c++14-lang iconv:wchar_t localbase:ldflags \
|
||||
USES= cmake:outsource compiler:c++14-lang iconv:wchar_t localbase:ldflags \
|
||||
openal:soft pkgconfig
|
||||
USE_GL= gl glew
|
||||
USE_QT5= qmake_build buildtools_build core dbus gui network widgets qml
|
||||
@ -44,7 +45,6 @@ CMAKE_OFF= USE_NATIVE_INSTRUCTIONS
|
||||
CXXFLAGS+= -D_GLIBCXX_USE_C99 # XXX ports/193528
|
||||
CXXFLAGS+= -Wno-macro-redefined # __STDC_*_MACROS sys/cdefs.h vs. llvm-config
|
||||
LDFLAGS+= -Wl,--as-needed # GLU
|
||||
MESA_LLVM_VER?= 50
|
||||
|
||||
OPTIONS_DEFINE= ALSA EVDEV GDB LLVM PULSEAUDIO VULKAN
|
||||
OPTIONS_DEFAULT=ALSA LLVM VULKAN
|
||||
@ -64,8 +64,6 @@ GDB_DESC= GDB remote stub (powerpc64 target)
|
||||
GDB_CMAKE_BOOL= WITH_GDB
|
||||
|
||||
LLVM_DESC= LLVM-based PPU recompiler
|
||||
LLVM_BUILD_DEPENDS= llvm${MESA_LLVM_VER}>0:devel/llvm${MESA_LLVM_VER}
|
||||
LLVM_CMAKE_ON= -DLLVM_DIR:PATH=${LOCALBASE}/llvm${MESA_LLVM_VER}/lib/cmake/llvm
|
||||
LLVM_CMAKE_BOOL_OFF= WITHOUT_LLVM
|
||||
|
||||
PULSEAUDIO_LIB_DEPENDS= libpulse-simple.so:audio/pulseaudio
|
||||
|
@ -1,8 +1,10 @@
|
||||
TIMESTAMP = 1525719847
|
||||
SHA256 (RPCS3-rpcs3-v0.0.5-237-g753d8170d_GH0.tar.gz) = 8e7cc80279e78482501b111eec25532c4f9a8b3eb5ed5ece7baf4ced2c8cfa66
|
||||
SIZE (RPCS3-rpcs3-v0.0.5-237-g753d8170d_GH0.tar.gz) = 4824041
|
||||
TIMESTAMP = 1525898306
|
||||
SHA256 (RPCS3-rpcs3-v0.0.5-259-g76a1d0d8f_GH0.tar.gz) = 8398bb419320cd433add13f3f1d72842d32e1aac4eca5262c24feb89ded990b5
|
||||
SIZE (RPCS3-rpcs3-v0.0.5-259-g76a1d0d8f_GH0.tar.gz) = 4842636
|
||||
SHA256 (RPCS3-hidapi-hidapi-0.8.0-rc1-25-gca39ce8_GH0.tar.gz) = e50e4f4e9035e891e16867e995f44aac87ce734a9dde169f02fc9719b2ce3642
|
||||
SIZE (RPCS3-hidapi-hidapi-0.8.0-rc1-25-gca39ce8_GH0.tar.gz) = 105623
|
||||
SHA256 (RPCS3-llvm-6154c0dcaf1_GH0.tar.gz) = 7623cfb81e587c7ae8db783676689eee1249d8332b7b9a688cbb76763f172127
|
||||
SIZE (RPCS3-llvm-6154c0dcaf1_GH0.tar.gz) = 37831787
|
||||
SHA256 (RPCS3-yaml-cpp-release-0.5.3-62-g017626a_GH0.tar.gz) = 1d4b32443f137c23b68d3cb183ba6fb48eb76be2b0b30016970adff5c770d841
|
||||
SIZE (RPCS3-yaml-cpp-release-0.5.3-62-g017626a_GH0.tar.gz) = 65888
|
||||
SHA256 (akrzemi1-Optional-f27e790_GH0.tar.gz) = d9f81fa3699b724812994897180365b7ee2fdef1549239d5086722bd4552baf1
|
||||
|
@ -1,125 +0,0 @@
|
||||
Based on https://github.com/hcorion/rpcs3/commit/017958c93018
|
||||
|
||||
--- Utilities/JIT.cpp.orig 2018-02-02 08:17:12 UTC
|
||||
+++ Utilities/JIT.cpp
|
||||
@@ -71,7 +71,7 @@ static void* s_next = s_memory;
|
||||
#ifdef _WIN32
|
||||
static std::deque<std::vector<RUNTIME_FUNCTION>> s_unwater;
|
||||
static std::vector<std::vector<RUNTIME_FUNCTION>> s_unwind; // .pdata
|
||||
-#else
|
||||
+#elif LLVM_VERSION_MAJOR < 5
|
||||
static std::deque<std::tuple<u8*, u64, std::size_t>> s_unfire;
|
||||
#endif
|
||||
|
||||
@@ -107,12 +107,16 @@ extern void jit_finalize()
|
||||
}
|
||||
} mem;
|
||||
|
||||
+#if LLVM_VERSION_MAJOR < 5
|
||||
for (auto&& t : s_unfire)
|
||||
{
|
||||
mem.deregisterEHFrames(std::get<0>(t), std::get<1>(t), std::get<2>(t));
|
||||
}
|
||||
|
||||
s_unfire.clear();
|
||||
+#else
|
||||
+ mem.deregisterEHFrames();
|
||||
+#endif // LLVM_VERSION_MAJOR < 5
|
||||
#endif
|
||||
|
||||
utils::memory_decommit(s_memory, s_memory_size);
|
||||
@@ -286,14 +290,18 @@ struct MemoryManager : llvm::RTDyldMemoryManager
|
||||
{
|
||||
s_unwind.emplace_back(std::move(pdata));
|
||||
}
|
||||
-#else
|
||||
+#elif LLVM_VERSION_MAJOR < 5
|
||||
s_unfire.push_front(std::make_tuple(addr, load_addr, size));
|
||||
#endif
|
||||
|
||||
return RTDyldMemoryManager::registerEHFrames(addr, load_addr, size);
|
||||
}
|
||||
|
||||
+#if LLVM_VERSION_MAJOR < 5
|
||||
void deregisterEHFrames(u8* addr, u64 load_addr, std::size_t size) override
|
||||
+#else
|
||||
+ void deregisterEHFrames() override
|
||||
+#endif
|
||||
{
|
||||
}
|
||||
};
|
||||
@@ -380,7 +388,11 @@ class ObjectCache final : public llvm::ObjectCache (pu
|
||||
{
|
||||
if (fs::file cached{path, fs::read})
|
||||
{
|
||||
+#if LLVM_VERSION_MAJOR < 6
|
||||
auto buf = llvm::MemoryBuffer::getNewUninitMemBuffer(cached.size());
|
||||
+#else
|
||||
+ auto buf = llvm::WritableMemoryBuffer::getNewUninitMemBuffer(cached.size());
|
||||
+#endif
|
||||
cached.read(const_cast<char*>(buf->getBufferStart()), buf->getBufferSize());
|
||||
return buf;
|
||||
}
|
||||
--- rpcs3/CMakeLists.txt.orig 2018-02-02 08:17:12 UTC
|
||||
+++ rpcs3/CMakeLists.txt
|
||||
@@ -173,7 +173,7 @@ set(CMAKE_MODULE_PATH "${RPCS3_SRC_DIR}/cmake_modules"
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(OpenAL REQUIRED)
|
||||
if(NOT WITHOUT_LLVM)
|
||||
- find_package(LLVM 4.0 CONFIG)
|
||||
+ find_package(LLVM CONFIG)
|
||||
if(NOT LLVM_FOUND)
|
||||
message("System LLVM was not found, LLVM will be built from the submodule.")
|
||||
|
||||
--- rpcs3/Emu/Cell/PPUTranslator.cpp.orig 2018-02-02 08:17:12 UTC
|
||||
+++ rpcs3/Emu/Cell/PPUTranslator.cpp
|
||||
@@ -16,7 +16,11 @@ PPUTranslator::PPUTranslator(LLVMContext& context, Mod
|
||||
, m_module(module)
|
||||
, m_is_be(false)
|
||||
, m_info(info)
|
||||
+#if LLVM_VERSION_MAJOR < 5
|
||||
, m_pure_attr(AttributeSet::get(m_context, AttributeSet::FunctionIndex, {Attribute::NoUnwind, Attribute::ReadNone}))
|
||||
+#else
|
||||
+ , m_pure_attr(AttributeList::get(m_context,AttributeList::FunctionIndex, AttrBuilder().addAttribute(Attribute::NoUnwind).addAttribute(Attribute::ReadNone)))
|
||||
+#endif
|
||||
{
|
||||
// There is no weak linkage on JIT, so let's create variables with different names for each module part
|
||||
const u32 gsuffix = m_info.name.empty() ? info.funcs[0].addr : info.funcs[0].addr - m_info.segs[0].addr;
|
||||
--- rpcs3/Emu/Cell/PPUTranslator.h.orig 2018-02-02 08:17:12 UTC
|
||||
+++ rpcs3/Emu/Cell/PPUTranslator.h
|
||||
@@ -120,7 +120,11 @@ class PPUTranslator final //: public CPUTranslator
|
||||
std::map<u64, const ppu_reloc*> m_relocs;
|
||||
|
||||
// Attributes for function calls which are "pure" and may be optimized away if their results are unused
|
||||
+#if LLVM_VERSION_MAJOR < 5
|
||||
const llvm::AttributeSet m_pure_attr;
|
||||
+#else
|
||||
+ const llvm::AttributeList m_pure_attr;
|
||||
+#endif
|
||||
|
||||
// IR builder
|
||||
llvm::IRBuilder<>* m_ir;
|
||||
@@ -404,7 +408,11 @@ class PPUTranslator final //: public CPUTranslator
|
||||
|
||||
// Call a function with attribute list
|
||||
template<typename... Args>
|
||||
+#if LLVM_VERSION_MAJOR < 5
|
||||
llvm::CallInst* Call(llvm::Type* ret, llvm::AttributeSet attr, llvm::StringRef name, Args... args)
|
||||
+#else
|
||||
+ llvm::CallInst* Call(llvm::Type* ret, llvm::AttributeList attr, llvm::StringRef name, Args... args)
|
||||
+#endif
|
||||
{
|
||||
// Call the function
|
||||
return m_ir->CreateCall(m_module->getOrInsertFunction(name, llvm::FunctionType::get(ret, {args->getType()...}, false), attr), {args...});
|
||||
@@ -414,7 +422,11 @@ class PPUTranslator final //: public CPUTranslator
|
||||
template<typename... Args>
|
||||
llvm::CallInst* Call(llvm::Type* ret, llvm::StringRef name, Args... args)
|
||||
{
|
||||
+#if LLVM_VERSION_MAJOR < 5
|
||||
return Call(ret, llvm::AttributeSet{}, name, args...);
|
||||
+#else
|
||||
+ return Call(ret, llvm::AttributeList{}, name, args...);
|
||||
+#endif
|
||||
}
|
||||
|
||||
// Handle compilation errors
|
@ -0,0 +1,14 @@
|
||||
/usr/bin/ld: unrecognized option '--color-diagnostics'
|
||||
/usr/bin/ld: use the --help option for usage information
|
||||
c++: error: linker command failed with exit code 1 (use -v to see invocation)
|
||||
|
||||
--- llvm/cmake/modules/HandleLLVMOptions.cmake.orig 2018-05-03 16:52:23 UTC
|
||||
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
|
||||
@@ -717,7 +717,6 @@ endif()
|
||||
# lld doesn't print colored diagnostics when invoked from Ninja
|
||||
if (UNIX AND CMAKE_GENERATOR STREQUAL "Ninja")
|
||||
include(CheckLinkerFlag)
|
||||
- check_linker_flag("-Wl,--color-diagnostics" LINKER_SUPPORTS_COLOR_DIAGNOSTICS)
|
||||
append_if(LINKER_SUPPORTS_COLOR_DIAGNOSTICS "-Wl,--color-diagnostics"
|
||||
CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
|
||||
endif()
|
Loading…
Reference in New Issue
Block a user