lang/mono: port to powerpc64

This commit is contained in:
Piotr Kubaj 2021-10-06 20:52:42 +00:00
parent 925c8e334d
commit eccb97996d
3 changed files with 39 additions and 6 deletions

View file

@ -13,7 +13,7 @@ COMMENT= Open source implementation of .NET Development Framework
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
ONLY_FOR_ARCHS= amd64 armv6 armv7 i386 powerpc
ONLY_FOR_ARCHS= amd64 armv6 armv7 i386 powerpc powerpc64
BUILD_DEPENDS= p5-XML-Parser>=0:textproc/p5-XML-Parser \
bash:shells/bash \
@ -65,7 +65,7 @@ OPTIONS_SLAVE= MONOLITE
.include <bsd.port.options.mk>
.if ${ARCH} == powerpc
.if ${ARCH:Mpowerpc*}
PLIST+= ${.CURDIR}/pkg-plist.powerpc
.else
CONFIGURE_ARGS+= --enable-btls

View file

@ -1,6 +1,6 @@
--- configure.ac.orig 2018-04-18 10:51:42.000000000 +0300
+++ configure.ac 2018-06-24 02:38:19.860780000 +0300
@@ -3271,6 +3271,8 @@
--- configure.ac.orig 2018-08-24 15:19:14 UTC
+++ configure.ac
@@ -3298,6 +3298,8 @@ case "$host" in
BTLS_PLATFORM=i386
;;
openbsd*|freebsd*|kfreebsd-gnu*)
@ -9,7 +9,7 @@
;;
esac
;;
@@ -3295,6 +3297,8 @@
@@ -3322,6 +3324,8 @@ case "$host" in
boehm_supported=false
;;
openbsd*|freebsd*|kfreebsd-gnu*)
@ -18,3 +18,16 @@
;;
mingw*)
;;
@@ -3355,11 +3359,10 @@ case "$host" in
INTL="intl"
;;
macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
- powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc-*-freebsd* )
+ powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc*-*-freebsd* )
if test "x$ac_cv_sizeof_void_p" = "x8"; then
TARGET=POWERPC64;
CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
- CFLAGS="$CFLAGS -mminimal-toc"
else
TARGET=POWERPC;
CPPFLAGS="$CPPFLAGS -D__mono_ppc__"

View file

@ -0,0 +1,20 @@
--- mono/mini/mini-ppc.c.orig 2018-08-24 15:17:13 UTC
+++ mono/mini/mini-ppc.c
@@ -4650,7 +4650,7 @@ mono_arch_register_lowlevel_calls (void)
}
#ifdef __mono_ppc64__
-#ifdef _LITTLE_ENDIAN
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
#define patch_load_sequence(ip,val) do {\
guint16 *__load = (guint16*)(ip); \
g_assert (sizeof (val) == sizeof (gsize)); \
@@ -4659,7 +4659,7 @@ mono_arch_register_lowlevel_calls (void)
__load [6] = (((guint64)(gsize)(val)) >> 16) & 0xffff; \
__load [8] = ((guint64)(gsize)(val)) & 0xffff; \
} while (0)
-#elif defined _BIG_ENDIAN
+#elif G_BYTE_ORDER == G_BIG_ENDIAN
#define patch_load_sequence(ip,val) do {\
guint16 *__load = (guint16*)(ip); \
g_assert (sizeof (val) == sizeof (gsize)); \