libretro-mupen64plus: remove package

This commit is contained in:
CvH 2021-02-17 17:03:39 +01:00 committed by Matthias Reichl
parent 14ca662f42
commit 456c9cdd72
3 changed files with 0 additions and 177 deletions

View File

@ -1,52 +0,0 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="libretro-mupen64plus"
PKG_VERSION="b21e3292e6ff7afb954d4871362ab6e6473d680f"
PKG_SHA256="2bc4424ac80ee03d248d261908a857dc1e0ae919704830e1629cd111a9acc91e"
PKG_LICENSE="GPLv2"
PKG_SITE="https://github.com/libretro/mupen64plus-libretro"
PKG_URL="https://github.com/libretro/mupen64plus-libretro/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain kodi-platform"
PKG_LONGDESC="game.libretro.mupen64plus: Mupen64Plus for Kodi"
PKG_LIBNAME="mupen64plus_libretro.so"
PKG_LIBPATH="$PKG_LIBNAME"
PKG_LIBVAR="MUPEN64PLUS_LIB"
make_target() {
if target_has_feature neon; then
export HAVE_NEON=1
fi
if [ -z "$DEVICE" ]; then
PKG_DEVICE_NAME=$PROJECT
else
PKG_DEVICE_NAME=$DEVICE
fi
case $PKG_DEVICE_NAME in
RPi|RPi2)
make platform=${PKG_DEVICE_NAME,,}
;;
Generic)
make WITH_DYNAREC=x86_64
;;
*)
if [[ "$TARGET_CPU" = "cortex-a9" ]] || [[ "$TARGET_CPU" = *"cortex-a53" ]] || [[ "$TARGET_CPU" = "cortex-a17" ]]; then
if [ "$TARGET_ARCH" = "aarch64" ]; then
make platform=aarch64
else
make platform=linux-gles FORCE_GLES=1 WITH_DYNAREC=arm
fi
fi
;;
esac
}
makeinstall_target() {
mkdir -p $SYSROOT_PREFIX/usr/lib/cmake/$PKG_NAME
cp $PKG_LIBPATH $SYSROOT_PREFIX/usr/lib/$PKG_LIBNAME
echo "set($PKG_LIBVAR $SYSROOT_PREFIX/usr/lib/$PKG_LIBNAME)" > $SYSROOT_PREFIX/usr/lib/cmake/$PKG_NAME/$PKG_NAME-config.cmake
}

View File

@ -1,104 +0,0 @@
diff -Naur a/libretro-common/libco/amd64.c b/libretro-common/libco/amd64.c
--- a/libretro-common/libco/amd64.c 2016-05-08 08:20:29.000000000 -0700
+++ b/libretro-common/libco/amd64.c 2016-05-10 14:58:50.221637488 -0700
@@ -5,7 +5,7 @@
*/
#define LIBCO_C
-#include <libco.h>
+#include "libco.h"
#include <assert.h>
#include <stdlib.h>
@@ -21,6 +21,8 @@
static thread_local cothread_t co_active_handle = 0;
#ifndef CO_USE_INLINE_ASM
static void (*co_swap)(cothread_t, cothread_t) = 0;
+#else
+void co_swap(cothread_t, cothread_t);
#endif
#ifdef _WIN32
@@ -81,7 +83,7 @@
sizeof(co_swap_function), PAGE_EXECUTE_READWRITE, &old_privileges);
}
#else
-/* ABI: SystemV */
+//ABI: SystemV
#ifndef CO_USE_INLINE_ASM
static unsigned char co_swap_function[] = {
0x48, 0x89, 0x26, /* mov [rsi],rsp */
@@ -113,7 +115,29 @@
mprotect((void*)base, size, PROT_READ | PROT_WRITE | PROT_EXEC);
}
#else
-void co_init(void) {}
+__asm__(
+".intel_syntax noprefix\n"
+".globl co_swap \n"
+"co_swap: \n"
+".globl _co_swap \n" /* OSX ABI is different from Linux. */
+"_co_swap: \n"
+"mov [rsi],rsp \n"
+"mov [rsi+0x08],rbp \n"
+"mov [rsi+0x10],rbx \n"
+"mov [rsi+0x18],r12 \n"
+"mov [rsi+0x20],r13 \n"
+"mov [rsi+0x28],r14 \n"
+"mov [rsi+0x30],r15 \n"
+"mov rsp,[rdi] \n"
+"mov rbp,[rdi+0x08] \n"
+"mov rbx,[rdi+0x10] \n"
+"mov r12,[rdi+0x18] \n"
+"mov r13,[rdi+0x20] \n"
+"mov r14,[rdi+0x28] \n"
+"mov r15,[rdi+0x30] \n"
+"ret \n"
+".att_syntax \n"
+);
#endif
#endif
@@ -162,42 +186,11 @@
free(handle);
}
-#ifndef CO_USE_INLINE_ASM
void co_switch(cothread_t handle)
{
register cothread_t co_previous_handle = co_active_handle;
co_swap(co_active_handle = handle, co_previous_handle);
}
-#else
-#ifdef __APPLE__
-#define ASM_PREFIX "_"
-#else
-#define ASM_PREFIX ""
-#endif
-__asm__(
-".intel_syntax noprefix \n"
-".globl " ASM_PREFIX "co_switch \n"
-ASM_PREFIX "co_switch: \n"
-"mov rsi, [rip+" ASM_PREFIX "co_active_handle]\n"
-"mov [rsi],rsp \n"
-"mov [rsi+0x08],rbp \n"
-"mov [rsi+0x10],rbx \n"
-"mov [rsi+0x18],r12 \n"
-"mov [rsi+0x20],r13 \n"
-"mov [rsi+0x28],r14 \n"
-"mov [rsi+0x30],r15 \n"
-"mov [rip+" ASM_PREFIX "co_active_handle], rdi\n"
-"mov rsp,[rdi] \n"
-"mov rbp,[rdi+0x08] \n"
-"mov rbx,[rdi+0x10] \n"
-"mov r12,[rdi+0x18] \n"
-"mov r13,[rdi+0x20] \n"
-"mov r14,[rdi+0x28] \n"
-"mov r15,[rdi+0x30] \n"
-"ret \n"
-".att_syntax \n"
-);
-#endif
#ifdef __cplusplus
}

View File

@ -1,21 +0,0 @@
diff -Naur a/Makefile b/Makefile
--- a/Makefile 2016-05-08 08:20:29.000000000 -0700
+++ b/Makefile 2016-05-10 15:08:05.548597094 -0700
@@ -304,6 +304,17 @@
CPUFLAGS += -mfloat-abi=hard
endif
+# aarch64
+else ifneq (,$(findstring aarch64,$(platform)))
+ TARGET := $(TARGET_NAME)_libretro.so
+ LDFLAGS += -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined
+ fpic := -fPIC
+# CPUFLAGS += -DNO_ASM -DARM -D__arm__ -DARM_ASM -DNOSSE
+ WITH_DYNAREC=arm64
+# PLATCFLAGS += -DARM
+ GLES = 1
+ GL_LIB := -lGLESv2
+
# emscripten
else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_emscripten.bc