View | Details | Raw Unified | Return to bug 229710 | Differences between
and this patch

Collapse All | Expand All

(-)w/lang/mono/Makefile (-2 / +11 lines)
Lines 14-20 COMMENT= Open source implementation of .NET Development Framework Link Here
14
LICENSE=	MIT
14
LICENSE=	MIT
15
LICENSE_FILE=	${WRKSRC}/LICENSE
15
LICENSE_FILE=	${WRKSRC}/LICENSE
16
16
17
ONLY_FOR_ARCHS=		amd64 armv6 armv7 i386 powerpc
17
ONLY_FOR_ARCHS=		amd64 armv6 armv7 aarch64 i386 powerpc
18
18
19
BUILD_DEPENDS=	p5-XML-Parser>=0:textproc/p5-XML-Parser \
19
BUILD_DEPENDS=	p5-XML-Parser>=0:textproc/p5-XML-Parser \
20
		bash:shells/bash \
20
		bash:shells/bash \
Lines 64-69 LOCALBASE?= /usr/local Link Here
64
OPTIONS_SLAVE=	MONOLITE
64
OPTIONS_SLAVE=	MONOLITE
65
.endif
65
.endif
66
66
67
.include <bsd.port.pre.mk>
68
69
.if ${ARCH} == "aarch64"
70
EXTRA_PATCHES=	${FILESDIR}/extra-patch-aarch64-race-workaround
71
PLIST_SUB+=	BOEHM="@comment "
72
.else
73
PLIST_SUB+=	BOEHM=""
74
.endif
75
67
post-extract-MONOLITE-on:
76
post-extract-MONOLITE-on:
68
	${MKDIR} ${WRKSRC}/mcs/class/lib/monolite-linux
77
	${MKDIR} ${WRKSRC}/mcs/class/lib/monolite-linux
69
	${MV} ${WRKDIR}/monolite-linux-${MONOLITE_VERSION}-latest ${WRKSRC}/mcs/class/lib/monolite-linux/${MONOLITE_VERSION}
78
	${MV} ${WRKDIR}/monolite-linux-${MONOLITE_VERSION}-latest ${WRKSRC}/mcs/class/lib/monolite-linux/${MONOLITE_VERSION}
Lines 92-95 post-configure: Link Here
92
post-install:
101
post-install:
93
	${MKDIR} ${STAGEDIR}${PREFIX}/mono
102
	${MKDIR} ${STAGEDIR}${PREFIX}/mono
94
103
95
.include <bsd.port.mk>
104
.include <bsd.port.post.mk>
(-)w/lang/mono/files/extra-patch-aarch64-race-workaround (+24 lines)
Added Link Here
1
Workaround for Roslyn crash: https://github.com/mono/mono/issues/7017
2
3
--- mcs/build/profiles/basic.make.orig	2018-07-12 00:08:27 UTC
4
+++ mcs/build/profiles/basic.make
5
@@ -47,7 +47,7 @@ LIBRARY_COMPILE = $(BOOT_COMPILE)
6
 #
7
 # Copy from rules.make because I don't know how to unset MCS_FLAGS
8
 #
9
-USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
10
+USE_MCS_FLAGS = /codepage:$(CODEPAGE) /parallel- /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
11
12
 .PHONY: profile-check do-profile-check
13
 profile-check:
14
--- mcs/build/rules.make.orig	2018-07-12 00:09:18.508196000 +0000
15
+++ mcs/build/rules.make	2018-07-12 00:12:13.875877000 +0000
16
@@ -34,7 +34,7 @@
17
 endif
18
 endif
19
20
-USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
21
+USE_MCS_FLAGS = /codepage:$(CODEPAGE) /parallel- /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
22
 USE_MBAS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS)
23
 USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS)
24
 CSCOMPILE = $(Q_MCS) $(MCS) $(USE_MCS_FLAGS)
(-)w/lang/mono/files/patch-configure.ac (-4 / +27 lines)
Lines 1-6 Link Here
1
--- configure.ac.orig	2018-04-18 10:51:42.000000000 +0300
1
armv8-a+crypto: Obtained from: upstream https://github.com/mono/mono/commit/a81e5afce53b9dcde82376d770222123fee0aa69
2
+++ configure.ac	2018-06-24 02:38:19.860780000 +0300
2
3
@@ -3271,6 +3271,8 @@
3
--- configure.ac.orig	2018-04-18 07:51:42 UTC
4
+++ configure.ac
5
@@ -202,6 +202,12 @@ case "$host" in
6
		libgc_threads=pthreads
7
		use_sigposix=yes
8
		has_dtrace=yes
9
+		case "$host" in
10
+		aarch64-*)
11
+			support_boehm=no
12
+			with_gc=sgen
13
+			;;
14
+		esac
15
		with_sgen_default_concurrent=yes
16
		;;
17
	*-*-*openbsd*)
18
@@ -3271,6 +3277,8 @@ case "$host" in
4
 			BTLS_PLATFORM=i386
19
 			BTLS_PLATFORM=i386
5
 			;;
20
 			;;
6
 		  openbsd*|freebsd*|kfreebsd-gnu*)
21
 		  openbsd*|freebsd*|kfreebsd-gnu*)
Lines 9-15 Link Here
9
 		        ;;
24
 		        ;;
10
 		esac
25
 		esac
11
 		;;
26
 		;;
12
@@ -3295,6 +3297,8 @@
27
@@ -3295,6 +3303,8 @@ case "$host" in
13
 			boehm_supported=false
28
 			boehm_supported=false
14
 			;;
29
 			;;
15
 		  openbsd*|freebsd*|kfreebsd-gnu*)
30
 		  openbsd*|freebsd*|kfreebsd-gnu*)
Lines 18-20 Link Here
18
 			;;
33
 			;;
19
 		  mingw*)
34
 		  mingw*)
20
 			;;
35
 			;;
36
@@ -4398,6 +4408,7 @@ if test "x$enable_btls" = "xyes"; then
37
		;;
38
	aarch64)
39
		btls_arch=aarch64
40
+		btls_cflags="-march=armv8-a+crypto"
41
		;;
42
	android-armv5)
43
		BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14"
(-)w/lang/mono/files/patch-external_boringssl_crypto_cpu-aarch64-linux.c (+42 lines)
Added Link Here
1
--- external/boringssl/crypto/cpu-aarch64-linux.c.orig	2018-08-24 17:17:16.000000000 +0200
2
+++ external/boringssl/crypto/cpu-aarch64-linux.c	2018-12-25 17:59:46.408294000 +0100
3
@@ -25,7 +25,32 @@
4
 
5
 extern uint32_t OPENSSL_armcap_P;
6
 
7
+#if defined(__FreeBSD__)
8
+#include <sys/types.h>
9
+#include <machine/armreg.h>
10
+
11
 void OPENSSL_cpuid_setup(void) {
12
+  uint64_t id_aa64isar0;
13
+
14
+  id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1);
15
+
16
+  OPENSSL_armcap_P |= ARMV7_NEON;
17
+
18
+  if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_BASE) {
19
+    OPENSSL_armcap_P |= ARMV8_AES;
20
+  }
21
+  if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) {
22
+    OPENSSL_armcap_P |= ARMV8_PMULL;
23
+  }
24
+  if (ID_AA64ISAR0_SHA1(id_aa64isar0) == ID_AA64ISAR0_SHA1_BASE) {
25
+    OPENSSL_armcap_P |= ARMV8_SHA1;
26
+  }
27
+  if(ID_AA64ISAR0_SHA2(id_aa64isar0) == ID_AA64ISAR0_SHA2_BASE) {
28
+    OPENSSL_armcap_P |= ARMV8_SHA256;
29
+  }
30
+}
31
+#else // linux
32
+void OPENSSL_cpuid_setup(void) {
33
   unsigned long hwcap = getauxval(AT_HWCAP);
34
 
35
   /* See /usr/include/asm/hwcap.h on an aarch64 installation for the source of
36
@@ -57,5 +82,6 @@ void OPENSSL_cpuid_setup(void) {
37
     OPENSSL_armcap_P |= ARMV8_SHA256;
38
   }
39
 }
40
+#endif
41
 
42
 #endif /* OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP */
(-)w/lang/mono/files/patch-mono_sgen_sgen-archdep.h (+11 lines)
Added Link Here
1
--- mono/sgen/sgen-archdep.h.orig	2018-07-11 23:55:34 UTC
2
+++ mono/sgen/sgen-archdep.h
3
@@ -45,7 +45,7 @@
4
5
 #elif defined(TARGET_ARM64)
6
7
-#ifdef __linux__
8
+#if defined(__linux__) || defined(__FreeBSD__)
9
 #define REDZONE_SIZE    0
10
 #elif defined(__APPLE__)
11
 #define REDZONE_SIZE	128
(-)w/lang/mono/files/patch-mono_utils_mono-sigcontext.h (+16 lines)
Added Link Here
1
--- mono/utils/mono-sigcontext.h.orig	2018-07-11 23:51:16 UTC
2
+++ mono/utils/mono-sigcontext.h
3
@@ -460,6 +460,13 @@ typedef struct ucontext {
4
	#define UCONTEXT_REG_SP(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__sp)
5
	#define UCONTEXT_REG_R0(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__x [ARMREG_R0])
6
	#define UCONTEXT_GREGS(ctx) (&(((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__x))
7
+#elif defined(__FreeBSD__)
8
+#include <ucontext.h>
9
+	/* https://lists.freebsd.org/pipermail/freebsd-arm/2017-February/015611.html */
10
+	#define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_elr)
11
+	#define UCONTEXT_REG_SP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_sp)
12
+	#define UCONTEXT_REG_R0(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_x [ARMREG_R0])
13
+	#define UCONTEXT_GREGS(ctx) (&(((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_x))
14
 #else
15
 #include <ucontext.h>
16
	#define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.pc)
(-)w/lang/mono/pkg-plist (-37 / +37 lines)
Lines 41-47 bin/mod Link Here
41
bin/mono
41
bin/mono
42
bin/mono-api-html
42
bin/mono-api-html
43
bin/mono-api-info
43
bin/mono-api-info
44
bin/mono-boehm
44
%%BOEHM%%bin/mono-boehm
45
bin/mono-cil-strip
45
bin/mono-cil-strip
46
bin/mono-configuration-crypto
46
bin/mono-configuration-crypto
47
bin/mono-find-provides
47
bin/mono-find-provides
Lines 166-175 lib/libmono-profiler-log.a Link Here
166
lib/libmono-profiler-log.so
166
lib/libmono-profiler-log.so
167
lib/libmono-profiler-log.so.0
167
lib/libmono-profiler-log.so.0
168
lib/libmono-profiler-log.so.0.0.0
168
lib/libmono-profiler-log.so.0.0.0
169
lib/libmonoboehm-2.0.a
169
%%BOEHM%%lib/libmonoboehm-2.0.a
170
lib/libmonoboehm-2.0.so
170
%%BOEHM%%lib/libmonoboehm-2.0.so
171
lib/libmonoboehm-2.0.so.1
171
%%BOEHM%%lib/libmonoboehm-2.0.so.1
172
lib/libmonoboehm-2.0.so.1.0.0
172
%%BOEHM%%lib/libmonoboehm-2.0.so.1.0.0
173
lib/libmonosgen-2.0.a
173
lib/libmonosgen-2.0.a
174
lib/libmonosgen-2.0.so
174
lib/libmonosgen-2.0.so
175
lib/libmonosgen-2.0.so.1
175
lib/libmonosgen-2.0.so.1
Lines 2940-2977 man/man1/xbuild.1.gz Link Here
2940
man/man1/xsd.1.gz
2940
man/man1/xsd.1.gz
2941
man/man5/mdoc.5.gz
2941
man/man5/mdoc.5.gz
2942
man/man5/mono-config.5.gz
2942
man/man5/mono-config.5.gz
2943
share/libgc-mono/README
2943
%%BOEHM%%share/libgc-mono/README
2944
share/libgc-mono/README.DGUX386
2944
%%BOEHM%%share/libgc-mono/README.DGUX386
2945
share/libgc-mono/README.Mac
2945
%%BOEHM%%share/libgc-mono/README.Mac
2946
share/libgc-mono/README.MacOSX
2946
%%BOEHM%%share/libgc-mono/README.MacOSX
2947
share/libgc-mono/README.OS2
2947
%%BOEHM%%share/libgc-mono/README.OS2
2948
share/libgc-mono/README.amiga
2948
%%BOEHM%%share/libgc-mono/README.amiga
2949
share/libgc-mono/README.arm.cross
2949
%%BOEHM%%share/libgc-mono/README.arm.cross
2950
share/libgc-mono/README.autoconf
2950
%%BOEHM%%share/libgc-mono/README.autoconf
2951
share/libgc-mono/README.changes
2951
%%BOEHM%%share/libgc-mono/README.changes
2952
share/libgc-mono/README.contributors
2952
%%BOEHM%%share/libgc-mono/README.contributors
2953
share/libgc-mono/README.cords
2953
%%BOEHM%%share/libgc-mono/README.cords
2954
share/libgc-mono/README.darwin
2954
%%BOEHM%%share/libgc-mono/README.darwin
2955
share/libgc-mono/README.dj
2955
%%BOEHM%%share/libgc-mono/README.dj
2956
share/libgc-mono/README.environment
2956
%%BOEHM%%share/libgc-mono/README.environment
2957
share/libgc-mono/README.ews4800
2957
%%BOEHM%%share/libgc-mono/README.ews4800
2958
share/libgc-mono/README.hp
2958
%%BOEHM%%share/libgc-mono/README.hp
2959
share/libgc-mono/README.linux
2959
%%BOEHM%%share/libgc-mono/README.linux
2960
share/libgc-mono/README.macros
2960
%%BOEHM%%share/libgc-mono/README.macros
2961
share/libgc-mono/README.rs6000
2961
%%BOEHM%%share/libgc-mono/README.rs6000
2962
share/libgc-mono/README.sgi
2962
%%BOEHM%%share/libgc-mono/README.sgi
2963
share/libgc-mono/README.solaris2
2963
%%BOEHM%%share/libgc-mono/README.solaris2
2964
share/libgc-mono/README.uts
2964
%%BOEHM%%share/libgc-mono/README.uts
2965
share/libgc-mono/README.win32
2965
%%BOEHM%%share/libgc-mono/README.win32
2966
share/libgc-mono/barrett_diagram
2966
%%BOEHM%%share/libgc-mono/barrett_diagram
2967
share/libgc-mono/debugging.html
2967
%%BOEHM%%share/libgc-mono/debugging.html
2968
share/libgc-mono/gc.man
2968
%%BOEHM%%share/libgc-mono/gc.man
2969
share/libgc-mono/gcdescr.html
2969
%%BOEHM%%share/libgc-mono/gcdescr.html
2970
share/libgc-mono/gcinterface.html
2970
%%BOEHM%%share/libgc-mono/gcinterface.html
2971
share/libgc-mono/leak.html
2971
%%BOEHM%%share/libgc-mono/leak.html
2972
share/libgc-mono/scale.html
2972
%%BOEHM%%share/libgc-mono/scale.html
2973
share/libgc-mono/simple_example.html
2973
%%BOEHM%%share/libgc-mono/simple_example.html
2974
share/libgc-mono/tree.html
2974
%%BOEHM%%share/libgc-mono/tree.html
2975
%%NLS%%share/locale/de/LC_MESSAGES/mcs.mo
2975
%%NLS%%share/locale/de/LC_MESSAGES/mcs.mo
2976
%%NLS%%share/locale/es/LC_MESSAGES/mcs.mo
2976
%%NLS%%share/locale/es/LC_MESSAGES/mcs.mo
2977
%%NLS%%share/locale/ja/LC_MESSAGES/mcs.mo
2977
%%NLS%%share/locale/ja/LC_MESSAGES/mcs.mo

Return to bug 229710