- add support for powerpc

from josh elasser, thanks!
This commit is contained in:
jasper 2010-08-23 14:16:09 +00:00
parent be2e0b37ac
commit 58e5370848
7 changed files with 79 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.14 2010/01/10 13:10:36 kili Exp $
# $OpenBSD: Makefile,v 1.15 2010/08/23 14:16:09 jasper Exp $
# $FreeBSD: ports/devel/ffcall/Makefile,v 1.2 2001/08/31 14:20:18 sobomax Exp $
# Original From: jagapen@home.com
@ -9,6 +9,7 @@ NOT_FOR_ARCHS= arm m68k
COMMENT= foreign function call libraries
DISTNAME= ffcall-1.10
REVISION = 0
SHARED_LIBS= avcall 1.0 \
callback 1.0
CATEGORIES= devel

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-avcall_Makefile_in,v 1.5 2010/08/23 14:16:09 jasper Exp $
--- avcall/Makefile.in.orig Sun Jan 25 09:34:21 2004
+++ avcall/Makefile.in Sat Apr 25 21:42:02 2009
@@ -120,7 +120,7 @@ avcall-rs6000.lo : $(srcdir)/avcall-rs6000-aix.old.s $
case "$(OS)" in \
aix3*) syntax=aix.old;; \
aix*) syntax=aix.new;; \
- linux* | netbsd*) syntax=linux;; \
+ linux* | netbsd* | openbsd*) syntax=linux;; \
macos* | darwin*) syntax=macos;; \
*) syntax=sysv4;; \
esac; \

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-callback_trampoline_r_test1_c,v 1.1 2010/08/23 14:16:09 jasper Exp $
--- callback/trampoline_r/test1.c.orig Sun Apr 26 06:46:30 2009
+++ callback/trampoline_r/test1.c Sun Apr 26 06:46:30 2009
@@ -70,7 +70,7 @@ register void* env __asm__("%r29");
register void* env __asm__("r12");
#endif
#ifdef __rs6000__
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__OpenBSD__)
register void* env __asm__("r13");
#else
register void* env __asm__("r11");

View File

@ -1,6 +1,15 @@
$OpenBSD: patch-callback_trampoline_r_trampoline_c,v 1.1 2010/02/23 20:11:15 jasper Exp $
--- callback/trampoline_r/trampoline.c.orig Fri Feb 12 00:00:27 2010
+++ callback/trampoline_r/trampoline.c Fri Feb 12 00:00:30 2010
$OpenBSD: patch-callback_trampoline_r_trampoline_c,v 1.2 2010/08/23 14:16:09 jasper Exp $
--- callback/trampoline_r/trampoline.c.orig Mon Jan 26 07:00:05 2004
+++ callback/trampoline_r/trampoline.c Sat Jul 31 06:59:02 2010
@@ -21,7 +21,7 @@
#endif
#endif
#if defined(__rs6000__)
-#if defined(__NetBSD__)
+#if defined(__NetBSD__) || defined(__OpenBSD__)
#define __rs6000netbsd__
#else
#if !defined(_AIX)
@@ -196,8 +196,12 @@ extern RETGETPAGESIZETYPE getpagesize ();
#ifdef linux
#include <asm/cachectl.h>

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-callback_vacall_r_Makefile_in,v 1.3 2010/08/23 14:16:09 jasper Exp $
--- callback/vacall_r/Makefile.in.orig Sun Jan 25 06:17:01 2004
+++ callback/vacall_r/Makefile.in Sat Apr 25 21:44:58 2009
@@ -120,7 +120,7 @@ vacall-rs6000.lo : $(srcdir)/vacall-rs6000-aix.old.s $
case "$(OS)" in \
aix3*) syntax=aix.old;; \
aix*) syntax=aix.new;; \
- linux*) syntax=linux;; \
+ linux* | openbsd*) syntax=linux;; \
macos* | darwin*) syntax=macos;; \
*) syntax=sysv4;; \
esac; \

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-callback_vacall_r_vacall-rs6000-linux_s,v 1.1 2010/08/23 14:16:09 jasper Exp $
We're using %r13 like on NetBSD instead of %r11.
--- callback/vacall_r/vacall-rs6000-linux.s.orig Mon Jan 29 13:55:18 2001
+++ callback/vacall_r/vacall-rs6000-linux.s Sun Apr 26 07:01:24 2009
@@ -35,8 +35,8 @@ __vacall_r:
stw 9,20(1)
addi 0,1,48
stw 0,40(1)
- lwz 9,0(11)
- lwz 3,4(11)
+ lwz 9,0(13)
+ lwz 3,4(13)
addi 4,1,8
mtlr 9
blrl

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-vacall_Makefile_in,v 1.3 2010/08/23 14:16:09 jasper Exp $
--- vacall/Makefile.in.orig Sun Jan 25 05:46:00 2004
+++ vacall/Makefile.in Sat Apr 25 21:46:06 2009
@@ -111,7 +111,7 @@ vacall-rs6000.o : $(srcdir)/vacall-rs6000-aix.old.s $(
case "$(OS)" in \
aix3*) syntax=aix.old;; \
aix*) syntax=aix.new;; \
- linux* | netbsd*) syntax=linux;; \
+ linux* | netbsd* | openbsd*) syntax=linux;; \
macos* | darwin*) syntax=macos;; \
*) syntax=sysv4;; \
esac; \