FreeBSD Bugzilla – Attachment 195063 Details for
Bug 229710
lang/mono5.20: port to aarch64
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mono-aarch64.patch
mono-aarch64.patch (text/plain), 10.39 KB, created by
Val Packett
on 2018-07-12 01:45:30 UTC
(
hide
)
Description:
mono-aarch64.patch
Filename:
MIME Type:
Creator:
Val Packett
Created:
2018-07-12 01:45:30 UTC
Size:
10.39 KB
patch
obsolete
>diff --git c/lang/mono/Makefile i/lang/mono/Makefile >index d3859b4eba59..3061b15f94b7 100644 >--- c/lang/mono/Makefile >+++ i/lang/mono/Makefile >@@ -14,7 +14,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 aarch64 i386 powerpc > > BUILD_DEPENDS= p5-XML-Parser>=0:textproc/p5-XML-Parser \ > bash:shells/bash \ >@@ -60,6 +60,15 @@ LOCALBASE?= /usr/local > OPTIONS_SLAVE= MONOLITE > .endif > >+.include <bsd.port.pre.mk> >+ >+.if ${ARCH} == "aarch64" >+EXTRA_PATCHES= ${FILESDIR}/extra-patch-aarch64-race-workaround >+PLIST_SUB+= BOEHM="@comment " >+.else >+PLIST_SUB+= BOEHM="" >+.endif >+ > post-extract-MONOLITE-on: > ${MKDIR} ${WRKSRC}/mcs/class/lib/monolite-linux > ${MV} ${WRKDIR}/monolite-linux-${MONOLITE_VERSION}-latest ${WRKSRC}/mcs/class/lib/monolite-linux/${MONOLITE_VERSION} >@@ -88,4 +97,4 @@ post-configure: > post-install: > ${MKDIR} ${STAGEDIR}${PREFIX}/mono > >-.include <bsd.port.mk> >+.include <bsd.port.post.mk> >diff --git c/lang/mono/files/extra-patch-aarch64-race-workaround i/lang/mono/files/extra-patch-aarch64-race-workaround >new file mode 100644 >index 000000000000..b4cb34fea9c4 >--- /dev/null >+++ i/lang/mono/files/extra-patch-aarch64-race-workaround >@@ -0,0 +1,24 @@ >+Workaround for Roslyn crash: https://github.com/mono/mono/issues/7017 >+ >+--- mcs/build/profiles/basic.make.orig 2018-07-12 00:08:27 UTC >++++ mcs/build/profiles/basic.make >+@@ -47,7 +47,7 @@ LIBRARY_COMPILE = $(BOOT_COMPILE) >+ # >+ # Copy from rules.make because I don't know how to unset MCS_FLAGS >+ # >+-USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS) >++USE_MCS_FLAGS = /codepage:$(CODEPAGE) /parallel- /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS) >+ >+ .PHONY: profile-check do-profile-check >+ profile-check: >+--- mcs/build/rules.make.orig 2018-07-12 00:09:18.508196000 +0000 >++++ mcs/build/rules.make 2018-07-12 00:12:13.875877000 +0000 >+@@ -34,7 +34,7 @@ >+ endif >+ endif >+ >+-USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS) >++USE_MCS_FLAGS = /codepage:$(CODEPAGE) /parallel- /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS) >+ USE_MBAS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS) >+ USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS) >+ CSCOMPILE = $(Q_MCS) $(MCS) $(USE_MCS_FLAGS) >diff --git c/lang/mono/files/patch-configure.ac i/lang/mono/files/patch-configure.ac >index 280b4da2ddb1..0d7238ebc78b 100644 >--- c/lang/mono/files/patch-configure.ac >+++ i/lang/mono/files/patch-configure.ac >@@ -1,6 +1,21 @@ >---- 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 @@ >+armv8-a+crypto: Obtained from: upstream https://github.com/mono/mono/commit/a81e5afce53b9dcde82376d770222123fee0aa69 >+ >+--- configure.ac.orig 2018-04-18 07:51:42 UTC >++++ configure.ac >+@@ -202,6 +202,12 @@ case "$host" in >+ libgc_threads=pthreads >+ use_sigposix=yes >+ has_dtrace=yes >++ case "$host" in >++ aarch64-*) >++ support_boehm=no >++ with_gc=sgen >++ ;; >++ esac >+ with_sgen_default_concurrent=yes >+ ;; >+ *-*-*openbsd*) >+@@ -3271,6 +3277,8 @@ case "$host" in > BTLS_PLATFORM=i386 > ;; > openbsd*|freebsd*|kfreebsd-gnu*) >@@ -9,7 +24,7 @@ > ;; > esac > ;; >-@@ -3295,6 +3297,8 @@ >+@@ -3295,6 +3303,8 @@ case "$host" in > boehm_supported=false > ;; > openbsd*|freebsd*|kfreebsd-gnu*) >@@ -18,3 +33,11 @@ > ;; > mingw*) > ;; >+@@ -4398,6 +4408,7 @@ if test "x$enable_btls" = "xyes"; then >+ ;; >+ aarch64) >+ btls_arch=aarch64 >++ btls_cflags="-march=armv8-a+crypto" >+ ;; >+ android-armv5) >+ BTLS_CMAKE_ARGS="-DANDROID_ABI=\"armeabi\" -DANDROID_NATIVE_API_LEVEL=14" >diff --git c/lang/mono/files/patch-external_boringssl_crypto_cpu-aarch64-linux.c i/lang/mono/files/patch-external_boringssl_crypto_cpu-aarch64-linux.c >new file mode 100644 >index 000000000000..e5f957800c84 >--- /dev/null >+++ i/lang/mono/files/patch-external_boringssl_crypto_cpu-aarch64-linux.c >@@ -0,0 +1,45 @@ >+Obtained from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223019 >+ >+--- external/boringssl/crypto/cpu-aarch64-linux.c.orig 2018-04-18 07:47:16 UTC >++++ external/boringssl/crypto/cpu-aarch64-linux.c >+@@ -16,7 +16,40 @@ >+ >+ #if defined(OPENSSL_AARCH64) && !defined(OPENSSL_STATIC_ARMCAP) >+ >+-#include <sys/auxv.h> >++#if defined(__FreeBSD__) >++#include <sys/param.h> >++#include <sys/sysctl.h> >++#include <elf.h> >++#include <errno.h> >++#include <unistd.h> >++ >++#ifndef AT_HWCAP >++#define AT_HWCAP 25 >++#endif >++ >++static unsigned long getauxval(unsigned long type) { >++ Elf_Auxinfo auxv[AT_COUNT]; >++ size_t len = sizeof(auxv); >++ int mib[] = { >++ CTL_KERN, >++ KERN_PROC, >++ KERN_PROC_AUXV, >++ getpid(), >++ }; >++ >++ if (sysctl(mib, nitems(mib), auxv, &len, NULL, 0) != -1) { >++ for (size_t i = 0; i < nitems(auxv); i++) >++ if ((unsigned long)auxv[i].a_type == type) >++ return auxv[i].a_un.a_val; >++ >++ errno = ENOENT; >++ } >++ return 0; >++} >++#else >++#define AT_HWCAP 16 >++#define getauxval(x) 0 >++#endif /* <sys/auxv.h> */ >+ >+ #include <openssl/arm_arch.h> >diff --git c/lang/mono/files/patch-mono_sgen_sgen-archdep.h i/lang/mono/files/patch-mono_sgen_sgen-archdep.h >new file mode 100644 >index 000000000000..e46d7a1ccf04 >--- /dev/null >+++ i/lang/mono/files/patch-mono_sgen_sgen-archdep.h >@@ -0,0 +1,11 @@ >+--- mono/sgen/sgen-archdep.h.orig 2018-07-11 23:55:34 UTC >++++ mono/sgen/sgen-archdep.h >+@@ -45,7 +45,7 @@ >+ >+ #elif defined(TARGET_ARM64) >+ >+-#ifdef __linux__ >++#if defined(__linux__) || defined(__FreeBSD__) >+ #define REDZONE_SIZE 0 >+ #elif defined(__APPLE__) >+ #define REDZONE_SIZE 128 >diff --git c/lang/mono/files/patch-mono_utils_mono-sigcontext.h i/lang/mono/files/patch-mono_utils_mono-sigcontext.h >new file mode 100644 >index 000000000000..d021fe548ad4 >--- /dev/null >+++ i/lang/mono/files/patch-mono_utils_mono-sigcontext.h >@@ -0,0 +1,16 @@ >+--- mono/utils/mono-sigcontext.h.orig 2018-07-11 23:51:16 UTC >++++ mono/utils/mono-sigcontext.h >+@@ -460,6 +460,13 @@ typedef struct ucontext { >+ #define UCONTEXT_REG_SP(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__sp) >+ #define UCONTEXT_REG_R0(ctx) (((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__x [ARMREG_R0]) >+ #define UCONTEXT_GREGS(ctx) (&(((ucontext64_t*)(ctx))->uc_mcontext64->__ss.__x)) >++#elif defined(__FreeBSD__) >++#include <ucontext.h> >++ /* https://lists.freebsd.org/pipermail/freebsd-arm/2017-February/015611.html */ >++ #define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_elr) >++ #define UCONTEXT_REG_SP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_sp) >++ #define UCONTEXT_REG_R0(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_x [ARMREG_R0]) >++ #define UCONTEXT_GREGS(ctx) (&(((ucontext_t*)(ctx))->uc_mcontext.mc_gpregs.gp_x)) >+ #else >+ #include <ucontext.h> >+ #define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.pc) >diff --git c/lang/mono/pkg-plist i/lang/mono/pkg-plist >index 3e8efa72e0a7..1f579dd15ec3 100644 >--- c/lang/mono/pkg-plist >+++ i/lang/mono/pkg-plist >@@ -41,7 +41,7 @@ bin/mod > bin/mono > bin/mono-api-html > bin/mono-api-info >-bin/mono-boehm >+%%BOEHM%%bin/mono-boehm > bin/mono-cil-strip > bin/mono-configuration-crypto > bin/mono-find-provides >@@ -166,10 +166,10 @@ lib/libmono-profiler-log.a > lib/libmono-profiler-log.so > lib/libmono-profiler-log.so.0 > lib/libmono-profiler-log.so.0.0.0 >-lib/libmonoboehm-2.0.a >-lib/libmonoboehm-2.0.so >-lib/libmonoboehm-2.0.so.1 >-lib/libmonoboehm-2.0.so.1.0.0 >+%%BOEHM%%lib/libmonoboehm-2.0.a >+%%BOEHM%%lib/libmonoboehm-2.0.so >+%%BOEHM%%lib/libmonoboehm-2.0.so.1 >+%%BOEHM%%lib/libmonoboehm-2.0.so.1.0.0 > lib/libmonosgen-2.0.a > lib/libmonosgen-2.0.so > lib/libmonosgen-2.0.so.1 >@@ -2937,38 +2937,38 @@ man/man1/xbuild.1.gz > man/man1/xsd.1.gz > man/man5/mdoc.5.gz > man/man5/mono-config.5.gz >-share/libgc-mono/README >-share/libgc-mono/README.DGUX386 >-share/libgc-mono/README.Mac >-share/libgc-mono/README.MacOSX >-share/libgc-mono/README.OS2 >-share/libgc-mono/README.amiga >-share/libgc-mono/README.arm.cross >-share/libgc-mono/README.autoconf >-share/libgc-mono/README.changes >-share/libgc-mono/README.contributors >-share/libgc-mono/README.cords >-share/libgc-mono/README.darwin >-share/libgc-mono/README.dj >-share/libgc-mono/README.environment >-share/libgc-mono/README.ews4800 >-share/libgc-mono/README.hp >-share/libgc-mono/README.linux >-share/libgc-mono/README.macros >-share/libgc-mono/README.rs6000 >-share/libgc-mono/README.sgi >-share/libgc-mono/README.solaris2 >-share/libgc-mono/README.uts >-share/libgc-mono/README.win32 >-share/libgc-mono/barrett_diagram >-share/libgc-mono/debugging.html >-share/libgc-mono/gc.man >-share/libgc-mono/gcdescr.html >-share/libgc-mono/gcinterface.html >-share/libgc-mono/leak.html >-share/libgc-mono/scale.html >-share/libgc-mono/simple_example.html >-share/libgc-mono/tree.html >+%%BOEHM%%share/libgc-mono/README >+%%BOEHM%%share/libgc-mono/README.DGUX386 >+%%BOEHM%%share/libgc-mono/README.Mac >+%%BOEHM%%share/libgc-mono/README.MacOSX >+%%BOEHM%%share/libgc-mono/README.OS2 >+%%BOEHM%%share/libgc-mono/README.amiga >+%%BOEHM%%share/libgc-mono/README.arm.cross >+%%BOEHM%%share/libgc-mono/README.autoconf >+%%BOEHM%%share/libgc-mono/README.changes >+%%BOEHM%%share/libgc-mono/README.contributors >+%%BOEHM%%share/libgc-mono/README.cords >+%%BOEHM%%share/libgc-mono/README.darwin >+%%BOEHM%%share/libgc-mono/README.dj >+%%BOEHM%%share/libgc-mono/README.environment >+%%BOEHM%%share/libgc-mono/README.ews4800 >+%%BOEHM%%share/libgc-mono/README.hp >+%%BOEHM%%share/libgc-mono/README.linux >+%%BOEHM%%share/libgc-mono/README.macros >+%%BOEHM%%share/libgc-mono/README.rs6000 >+%%BOEHM%%share/libgc-mono/README.sgi >+%%BOEHM%%share/libgc-mono/README.solaris2 >+%%BOEHM%%share/libgc-mono/README.uts >+%%BOEHM%%share/libgc-mono/README.win32 >+%%BOEHM%%share/libgc-mono/barrett_diagram >+%%BOEHM%%share/libgc-mono/debugging.html >+%%BOEHM%%share/libgc-mono/gc.man >+%%BOEHM%%share/libgc-mono/gcdescr.html >+%%BOEHM%%share/libgc-mono/gcinterface.html >+%%BOEHM%%share/libgc-mono/leak.html >+%%BOEHM%%share/libgc-mono/scale.html >+%%BOEHM%%share/libgc-mono/simple_example.html >+%%BOEHM%%share/libgc-mono/tree.html > share/locale/de/LC_MESSAGES/mcs.mo > share/locale/es/LC_MESSAGES/mcs.mo > share/locale/ja/LC_MESSAGES/mcs.mo
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 229710
:
195063
|
195945
|
200579