From 80ebb4f3b3b15a5ebb01df7d46dd9ced13d646fd Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 31 Mar 2015 15:24:14 +0000 Subject: Replace nasty global asm with a naked function. Avoids killing libbfd when building with Clang. --- emulators/libretro-mupen64plus/distinfo | 3 ++- .../patches/patch-libretro_libco_armeabi.c | 30 ++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 emulators/libretro-mupen64plus/patches/patch-libretro_libco_armeabi.c (limited to 'emulators') diff --git a/emulators/libretro-mupen64plus/distinfo b/emulators/libretro-mupen64plus/distinfo index 1f7c03028c3..4d2c8c3f4fb 100644 --- a/emulators/libretro-mupen64plus/distinfo +++ b/emulators/libretro-mupen64plus/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.2 2015/02/05 17:42:06 wiz Exp $ +$NetBSD: distinfo,v 1.3 2015/03/31 15:24:14 joerg Exp $ SHA1 (mupen64plus-libretro-20150204.zip) = 85599e878094348163d68fdd704c5bc7edf78e44 RMD160 (mupen64plus-libretro-20150204.zip) = 6c08b86834a8f6d548c85eaa34ca38e779b6a0d2 Size (mupen64plus-libretro-20150204.zip) = 3286777 bytes SHA1 (patch-glide2gl_src_Glide64_Util.h) = d3bceef0ba895af8309bfe9435d701d76ca31a27 +SHA1 (patch-libretro_libco_armeabi.c) = dbce5604b0a160dfbdae82506957e2c852d4ca9d diff --git a/emulators/libretro-mupen64plus/patches/patch-libretro_libco_armeabi.c b/emulators/libretro-mupen64plus/patches/patch-libretro_libco_armeabi.c new file mode 100644 index 00000000000..ad00136acbd --- /dev/null +++ b/emulators/libretro-mupen64plus/patches/patch-libretro_libco_armeabi.c @@ -0,0 +1,30 @@ +$NetBSD: patch-libretro_libco_armeabi.c,v 1.1 2015/03/31 15:24:14 joerg Exp $ + +--- libretro/libco/armeabi.c.orig 2015-03-30 10:10:39.000000000 +0000 ++++ libretro/libco/armeabi.c +@@ -22,19 +22,15 @@ extern "C" { + static thread_local uint32_t co_active_buffer[64]; + static thread_local cothread_t co_active_handle; + +-asm ( ++/* ASM */ ++__attribute__((naked)) ++void co_switch_arm(cothread_t handle, cothread_t current) { ++ asm volatile ( + ".arm\n" +- ".align 4\n" +- ".globl co_switch_arm\n" +- ".globl _co_switch_arm\n" +- "co_switch_arm:\n" +- "_co_switch_arm:\n" + " stmia r1!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, lr}\n" + " ldmia r0!, {r4, r5, r6, r7, r8, r9, r10, r11, sp, pc}\n" +- ); +- +-/* ASM */ +-void co_switch_arm(cothread_t handle, cothread_t current); ++ ); ++} + + static void crash(void) + { -- cgit v1.2.3