From 125e85d73b4bbd8abefe7c13f5ae1f0b7357fd4e Mon Sep 17 00:00:00 2001 From: meepingsnesroms Date: Mon, 13 May 2019 12:38:42 -0700 Subject: [PATCH] Got Mac RetroArch build working with ARM emulator Hopefully dident break ARM emulator on Windows. --- libretroBuildSystem/build/Makefile.common | 10 ++++++++-- libretroBuildSystem/jni/Android.mk | 2 ++ libretroBuildSystem/jni/Application.mk | 1 + src/armv5te/cpu.cpp | 11 +++-------- src/makefile.all | 2 +- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/libretroBuildSystem/build/Makefile.common b/libretroBuildSystem/build/Makefile.common index 4bed5a5..d316e72 100644 --- a/libretroBuildSystem/build/Makefile.common +++ b/libretroBuildSystem/build/Makefile.common @@ -34,10 +34,10 @@ else ifneq (,$(findstring armv,$(platform))) EMU_SUPPORT_PALM_OS5 = 1 EMU_ARCH := armv7 EMU_OS := linux -else ifneq (,$(filter unix osx linux_x86 linux_x86_64 linux-portable_x86 linux-portable_x86_64,$(platform))) +else ifneq (,$(filter unix osx osx_x86 osx_x86_64 linux_x86 linux_x86_64 linux-portable_x86 linux-portable_x86_64,$(platform))) # x86_* Linux EMU_SUPPORT_PALM_OS5 = 1 - ifneq (,$(findstring x64,$(platform))) + ifneq (,$(filter osx osx_x86_64 linux_x86_64 linux-portable_x86_64,$(platform))) EMU_ARCH := x86_64 else EMU_ARCH := x86_32 @@ -53,6 +53,12 @@ else ifeq ($(platform), osx) endif endif +ifeq ($(EMU_SUPPORT_PALM_OS5), 1) + ifneq ($(platform), android_jni) + CXXFLAGS += -std=c++11 + endif +endif + include $(EMU_PATH)/makefile.all COREDEFINES += $(EMU_DEFINES) diff --git a/libretroBuildSystem/jni/Android.mk b/libretroBuildSystem/jni/Android.mk index 7b153f5..485914e 100644 --- a/libretroBuildSystem/jni/Android.mk +++ b/libretroBuildSystem/jni/Android.mk @@ -4,6 +4,8 @@ CORE_DIR := $(LOCAL_PATH)/.. GIT_VERSION := " $(shell git rev-parse --short HEAD || echo unknown)" +platform = android_jni + # Palm OS 5 support EMU_SUPPORT_PALM_OS5 = 1 EMU_OS := linux diff --git a/libretroBuildSystem/jni/Application.mk b/libretroBuildSystem/jni/Application.mk index 6dcff3d..13266c2 100644 --- a/libretroBuildSystem/jni/Application.mk +++ b/libretroBuildSystem/jni/Application.mk @@ -1,2 +1,3 @@ APP_ABI := all APP_PLATFORM := android-18 +APP_CPPFLAGS += -std=c++11 diff --git a/src/armv5te/cpu.cpp b/src/armv5te/cpu.cpp index aca22f0..4281016 100644 --- a/src/armv5te/cpu.cpp +++ b/src/armv5te/cpu.cpp @@ -203,17 +203,12 @@ void * FASTCALL read_instruction(uint32_t addr) #endif } -/*void cpu_thumb_loop() -{ - //TODO - assert(false); -}*/ - // Update cpu_events void cpu_int_check() { - static std::mutex mut; - std::lock_guard lg(mut); + //events arnt threaded like this in Mu, plus this breaks the RetroArch build, some undefined reference thing + //static std::mutex mut; + //std::lock_guard lg(mut); if (arm.interrupts & ~arm.cpsr_low28 & 0x80) cpu_events |= EVENT_IRQ; diff --git a/src/makefile.all b/src/makefile.all index 0cef45b..29aaed7 100644 --- a/src/makefile.all +++ b/src/makefile.all @@ -21,7 +21,7 @@ EMU_SOURCES_CXX := EMU_SOURCES_ASM := ifeq ($(EMU_SUPPORT_PALM_OS5), 1) - EMU_DEFINES += -std=c++11 # ARM emulator uses C++11 + # ARM emulator uses C++11 so it must be supported and enabled if Palm OS 5 support is enabled EMU_DEFINES += -DEMU_SUPPORT_PALM_OS5 EMU_DEFINES += -DSUPPORT_LINUX # forces the dynarec to use accurate mode and disable Nspire OS hacks EMU_SOURCES_C += $(EMU_PATH)/pxa255/pxa255_mem.c \