pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/emulators/libretro-mupen64plus Replace nasty global as...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/56d389604415
branches:  trunk
changeset: 649072:56d389604415
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Mar 31 15:24:14 2015 +0000

description:
Replace nasty global asm with a naked function. Avoids killing libbfd
when building with Clang.

diffstat:

 emulators/libretro-mupen64plus/distinfo                               |   3 +-
 emulators/libretro-mupen64plus/patches/patch-libretro_libco_armeabi.c |  30 ++++++++++
 2 files changed, 32 insertions(+), 1 deletions(-)

diffs (46 lines):

diff -r e8f895a8e24d -r 56d389604415 emulators/libretro-mupen64plus/distinfo
--- a/emulators/libretro-mupen64plus/distinfo   Tue Mar 31 15:22:40 2015 +0000
+++ b/emulators/libretro-mupen64plus/distinfo   Tue Mar 31 15:24:14 2015 +0000
@@ -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 -r e8f895a8e24d -r 56d389604415 emulators/libretro-mupen64plus/patches/patch-libretro_libco_armeabi.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/libretro-mupen64plus/patches/patch-libretro_libco_armeabi.c     Tue Mar 31 15:24:14 2015 +0000
@@ -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)
+ {



Home | Main Index | Thread Index | Old Index