pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/ffcall Rename the patch for powerpc on NetBSD.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cdd763e71972
branches:  trunk
changeset: 367730:cdd763e71972
user:      he <he%pkgsrc.org@localhost>
date:      Wed Sep 06 08:21:00 2017 +0000

description:
Rename the patch for powerpc on NetBSD.
Make a workaround to make it build without multiple definition error
on NetBSD/powerpc.
No PKGREVISION bump, build fix only for NetBSD/powerpc.

diffstat:

 devel/ffcall/distinfo                                          |   4 +-
 devel/ffcall/patches/patch-ad                                  |  53 --------
 devel/ffcall/patches/patch-callback_trampoline__r_trampoline.c |  66 ++++++++++
 3 files changed, 68 insertions(+), 55 deletions(-)

diffs (152 lines):

diff -r d887902e8b84 -r cdd763e71972 devel/ffcall/distinfo
--- a/devel/ffcall/distinfo     Tue Sep 05 18:39:07 2017 +0000
+++ b/devel/ffcall/distinfo     Wed Sep 06 08:21:00 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.14 2017/07/13 12:21:39 wiz Exp $
+$NetBSD: distinfo,v 1.15 2017/09/06 08:21:00 he Exp $
 
 SHA1 (ffcall-1.10.tar.gz) = 6b4fdc7bd38b434bbf3d65508a3d117fc8b349f3
 RMD160 (ffcall-1.10.tar.gz) = 910af54fae0b992ceb5620f155e301827d2e03c5
@@ -6,7 +6,6 @@
 Size (ffcall-1.10.tar.gz) = 914870 bytes
 SHA1 (patch-aa) = 208e3fe1d186e845e14c3623ac5b173923b113e9
 SHA1 (patch-ab) = 7e4b587a080af5530c7bd883a71b614162522320
-SHA1 (patch-ad) = 4cfba7c4ce9fb709d1e857433c5caad293ca9c29
 SHA1 (patch-ae) = 091132edde5d4360cdc3f0e72cc58833c6487181
 SHA1 (patch-af) = bec1789b42136929742e7bbaa73b88aaf102da6d
 SHA1 (patch-ag) = b21d51fc1d78d81a4f7a99183ca1033675ff04ac
@@ -15,6 +14,7 @@
 SHA1 (patch-aj) = 8db7daeb150db176dfb2f59ad9b4854cb1f895fd
 SHA1 (patch-avcall_avcall-x86__64.s) = a41ec9d5f2f6b64e8dca77d29cf82fa025ab954f
 SHA1 (patch-callback_Makefile.in) = d27730ed485f405c5287b1af7b76cfbeb122c85d
+SHA1 (patch-callback_trampoline__r_trampoline.c) = ea7f0e93640f5424d2309698f20df805135d1fb4
 SHA1 (patch-callback_vacall__r_vacall-x86_64.c) = 2e7e6cc3bd32461e905cb48a3bd470517c90bfb8
 SHA1 (patch-callback_vacall__r_vacall-x86__64.s) = eee81d24f58a57c1ef8164b9c8c70b0e086bda29
 SHA1 (patch-vacall_vacall-x86_64.c) = 299a34fe8530c6bf926b97d0d018a8b850b35a97
diff -r d887902e8b84 -r cdd763e71972 devel/ffcall/patches/patch-ad
--- a/devel/ffcall/patches/patch-ad     Tue Sep 05 18:39:07 2017 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-$NetBSD: patch-ad,v 1.2 2004/03/02 16:05:01 adam Exp $
-
---- callback/trampoline_r/trampoline.c.orig    2004-01-26 15:00:05.000000000 +0000
-+++ callback/trampoline_r/trampoline.c
-@@ -283,7 +283,7 @@ extern void __TR_clear_cache();
- #define TRAMP_LENGTH 32
- #define TRAMP_ALIGN 4
- #endif
--#ifdef __rs6000sysv4__
-+#if defined(__rs6000sysv4__) || defined(__rs6000netbsd__)
- #define TRAMP_LENGTH 24
- #define TRAMP_ALIGN 4
- #endif
-@@ -878,6 +878,39 @@ __TR_function alloc_trampoline_r (addres
- #define tramp_data(function)  \
-   hilo(*(unsigned short *) (function + 2), *(unsigned short *) (function + 6))
- #endif
-+#ifdef __rs6000netbsd__
-+  /* function:
-+   *    {liu|lis} 13,hi16(<data>)              3D A0 hi16(<data>)
-+   *    {oril|ori} 13,13,lo16(<data>)          61 AD lo16(<data>)
-+   *    {liu|lis} 0,hi16(<address>)            3C 00 hi16(<address>)
-+   *    {oril|ori} 0,0,lo16(<address>)         60 00 lo16(<address>)
-+   *    mtctr 0                                        7C 09 03 A6
-+   *    bctr                                   4E 80 04 20
-+   */
-+  *(short *) (function + 0) = 0x3DA0;
-+  *(short *) (function + 2) = (unsigned long) data >> 16;
-+  *(short *) (function + 4) = 0x61AD;
-+  *(short *) (function + 6) = (unsigned long) data & 0xffff;
-+  *(short *) (function + 8) = 0x3C00;
-+  *(short *) (function +10) = (unsigned long) address >> 16;
-+  *(short *) (function +12) = 0x6000;
-+  *(short *) (function +14) = (unsigned long) address & 0xffff;
-+  *(long *)  (function +16) = 0x7C0903A6;
-+  *(long *)  (function +20) = 0x4E800420;
-+#define is_tramp(function)  \
-+  *(unsigned short *) (function + 0) == 0x3DA0 && \
-+  *(unsigned short *) (function + 4) == 0x61AD && \
-+  *(unsigned short *) (function + 8) == 0x3C00 && \
-+  *(unsigned short *) (function +12) == 0x6000 && \
-+  *(unsigned long *)  (function +16) == 0x7C0903A6 && \
-+  *(unsigned long *)  (function +20) == 0x4E800420
-+#define hilo(hiword,loword)  \
-+  (((unsigned long) (hiword) << 16) | (unsigned long) (loword))
-+#define tramp_address(function)  \
-+  hilo(*(unsigned short *) (function +10), *(unsigned short *) (function +14))
-+#define tramp_data(function)  \
-+  hilo(*(unsigned short *) (function + 2), *(unsigned short *) (function + 6))
-+#endif
- #ifdef __rs6000aix__
-   /* function:
-    *    .long .tramp_r
diff -r d887902e8b84 -r cdd763e71972 devel/ffcall/patches/patch-callback_trampoline__r_trampoline.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ffcall/patches/patch-callback_trampoline__r_trampoline.c    Wed Sep 06 08:21:00 2017 +0000
@@ -0,0 +1,66 @@
+$NetBSD: patch-callback_trampoline__r_trampoline.c,v 1.1 2017/09/06 08:21:00 he Exp $
+
+Add NetBSD bits for powerpc ("rs6000").
+Avoid multiple definition due to cache-rs6000 also being compiled separately.
+
+--- callback/trampoline_r/trampoline.c.orig    2004-01-26 15:00:05.000000000 +0000
++++ callback/trampoline_r/trampoline.c
+@@ -219,7 +219,9 @@ extern inline
+ #include "cache-hppa.c"
+ #endif
+ #ifdef __rs6000__
++#ifndef __NetBSD__
+ #include "cache-rs6000.c"
++#endif /* __NetBSD__ -- compiled separately from .s file, leads to multiple definition error */
+ #endif
+ #ifdef __convex__
+ #include "cache-convex.c"
+@@ -283,7 +285,7 @@ extern void __TR_clear_cache();
+ #define TRAMP_LENGTH 32
+ #define TRAMP_ALIGN 4
+ #endif
+-#ifdef __rs6000sysv4__
++#if defined(__rs6000sysv4__) || defined(__rs6000netbsd__)
+ #define TRAMP_LENGTH 24
+ #define TRAMP_ALIGN 4
+ #endif
+@@ -878,6 +880,39 @@ __TR_function alloc_trampoline_r (addres
+ #define tramp_data(function)  \
+   hilo(*(unsigned short *) (function + 2), *(unsigned short *) (function + 6))
+ #endif
++#ifdef __rs6000netbsd__
++  /* function:
++   *    {liu|lis} 13,hi16(<data>)              3D A0 hi16(<data>)
++   *    {oril|ori} 13,13,lo16(<data>)          61 AD lo16(<data>)
++   *    {liu|lis} 0,hi16(<address>)            3C 00 hi16(<address>)
++   *    {oril|ori} 0,0,lo16(<address>)         60 00 lo16(<address>)
++   *    mtctr 0                                        7C 09 03 A6
++   *    bctr                                   4E 80 04 20
++   */
++  *(short *) (function + 0) = 0x3DA0;
++  *(short *) (function + 2) = (unsigned long) data >> 16;
++  *(short *) (function + 4) = 0x61AD;
++  *(short *) (function + 6) = (unsigned long) data & 0xffff;
++  *(short *) (function + 8) = 0x3C00;
++  *(short *) (function +10) = (unsigned long) address >> 16;
++  *(short *) (function +12) = 0x6000;
++  *(short *) (function +14) = (unsigned long) address & 0xffff;
++  *(long *)  (function +16) = 0x7C0903A6;
++  *(long *)  (function +20) = 0x4E800420;
++#define is_tramp(function)  \
++  *(unsigned short *) (function + 0) == 0x3DA0 && \
++  *(unsigned short *) (function + 4) == 0x61AD && \
++  *(unsigned short *) (function + 8) == 0x3C00 && \
++  *(unsigned short *) (function +12) == 0x6000 && \
++  *(unsigned long *)  (function +16) == 0x7C0903A6 && \
++  *(unsigned long *)  (function +20) == 0x4E800420
++#define hilo(hiword,loword)  \
++  (((unsigned long) (hiword) << 16) | (unsigned long) (loword))
++#define tramp_address(function)  \
++  hilo(*(unsigned short *) (function +10), *(unsigned short *) (function +14))
++#define tramp_data(function)  \
++  hilo(*(unsigned short *) (function + 2), *(unsigned short *) (function + 6))
++#endif
+ #ifdef __rs6000aix__
+   /* function:
+    *    .long .tramp_r



Home | Main Index | Thread Index | Old Index