diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2013-08-18 09:42:31 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2013-08-18 09:42:31 +0000 |
commit | 61a2a283080a566752b431c335df93dc224cab09 (patch) | |
tree | b7e72dfc4cfcf408a7c2be256e84d03ff7df8647 /lang/mono | |
parent | 2108622d2fc2fd8866a50f3e5c97e5b99c138630 (diff) | |
download | pkgsrc-61a2a283080a566752b431c335df93dc224cab09.tar.gz |
Some NetBSD arm build fixes. Still doesn't build yet.
Diffstat (limited to 'lang/mono')
-rw-r--r-- | lang/mono/Makefile | 5 | ||||
-rw-r--r-- | lang/mono/distinfo | 7 | ||||
-rw-r--r-- | lang/mono/patches/patch-ab | 29 | ||||
-rw-r--r-- | lang/mono/patches/patch-ad | 33 | ||||
-rw-r--r-- | lang/mono/patches/patch-mono_mini_mini-arm.c | 63 |
5 files changed, 126 insertions, 11 deletions
diff --git a/lang/mono/Makefile b/lang/mono/Makefile index 99b1e82de7d..abfbdf2ae31 100644 --- a/lang/mono/Makefile +++ b/lang/mono/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.140 2013/06/17 12:44:54 wiz Exp $ +# $NetBSD: Makefile,v 1.141 2013/08/18 09:42:31 jmcneill Exp $ DISTNAME= mono-3.0.10 PKGREVISION= 2 @@ -139,6 +139,9 @@ CONFIGURE_ENV+= ac_cv_func_getdomainname=no CONFIGURE_ENV+= ac_cv_func_setdomainname=no ULIMIT_CMD_datasize= ulimit -d 262144 ULIMIT_CMD_stacksize= ulimit -s 10240 +.elif ${OPSYS} == "NetBSD" && ${MACHINE_ARCH:M*arm*} +CONFIGURE_ARGS+= --with-mcs-docs=no +CONFIGURE_ARGS+= --disable-parallel-mark .else PLIST.monodoc= yes .endif diff --git a/lang/mono/distinfo b/lang/mono/distinfo index b85063df457..9f2fdd4928d 100644 --- a/lang/mono/distinfo +++ b/lang/mono/distinfo @@ -1,12 +1,12 @@ -$NetBSD: distinfo,v 1.91 2013/06/05 17:03:55 jperkin Exp $ +$NetBSD: distinfo,v 1.92 2013/08/18 09:42:31 jmcneill Exp $ SHA1 (mono-3.0.10.tar.bz2) = 7646d3ecb2dc2e7fd12c7fc661e7a500b9833e64 RMD160 (mono-3.0.10.tar.bz2) = d2c4dc64b233f51f6ec8be4ee1f3ef08f0099057 Size (mono-3.0.10.tar.bz2) = 81844036 bytes SHA1 (patch-aa) = 688e02cd43716476f3f1baae9116a6aa7e186b2b -SHA1 (patch-ab) = 47e3e90674e757fc662455f8a7cdf0ac6d3ecc5b +SHA1 (patch-ab) = 439b4362353e8409047f26d3ebde7f1eaebddfe3 SHA1 (patch-ac) = 9666a8e30aedacf46d4817161cc0036fa59b12d8 -SHA1 (patch-ad) = 27a75f7f4a8db6ecfd6bea420dacd911d123a1ae +SHA1 (patch-ad) = d990e10f91f108aa5f13e2479b3407636f7dd634 SHA1 (patch-ae) = 6431e119a26f89c691c27858d64c8ccc7f8c0e31 SHA1 (patch-af) = 1a7d763836dd4c6abfdd31d7072e77352e23df7d SHA1 (patch-ah) = 88a42b5482c8eca562178c0cb575fa56cb1aae60 @@ -44,6 +44,7 @@ SHA1 (patch-dn) = e451f01452869be5a42fafe9b547fa298a1c4b3b SHA1 (patch-do) = 6cd2e8c6d9321243a1fd9462aef992e1f33daef9 SHA1 (patch-man_mprof-report.1) = fccadd7c284a3ce50919534b6dacb2da002edef8 SHA1 (patch-mono_io-layer_sockets.c) = 8c4f5fbc3469831a1c03680ed493b96c3b50199c +SHA1 (patch-mono_mini_mini-arm.c) = 6103c1594f46ed4734242184d1f6efaa1bcd337f SHA1 (patch-mono_profiler_proflog.c) = 23e43af9d35d9fcb41a3d79b01d5494169fa15c2 SHA1 (patch-mono_utils_mono-compiler.h) = 76822de9dde03bac11a16c4cc687728566d98235 SHA1 (patch-mono_utils_mono-mmap.c) = 24a4bff061db6e5f6722a933b7f5cf843610e5f1 diff --git a/lang/mono/patches/patch-ab b/lang/mono/patches/patch-ab index 4246f6e0ffd..0eac29eb0d8 100644 --- a/lang/mono/patches/patch-ab +++ b/lang/mono/patches/patch-ab @@ -1,6 +1,4 @@ -$NetBSD: patch-ab,v 1.30 2013/06/05 17:03:55 jperkin Exp $ - -Add __C99FEATURES__ to SunOS defines for additional math functions. +$NetBSD: patch-ab,v 1.31 2013/08/18 09:42:31 jmcneill Exp $ --- configure.orig 2013-04-25 09:08:54.000000000 +0000 +++ configure @@ -58,7 +56,28 @@ Add __C99FEATURES__ to SunOS defines for additional math functions. sizeof_register="SIZEOF_VOID_P" -@@ -25132,10 +25137,12 @@ case "$host" in +@@ -24765,13 +24770,17 @@ fi + NESTED_LIBGC_FLAGS="$NESTED_LIBGC_FLAGS -DHAVE_ARMV6" + sgen_supported=true + ;; +- arm*-linux*) ++ arm*-linux* | arm*-netbsd* | earm*-netbsd*) + TARGET=ARM; + arch_target=arm; + ACCESS_UNALIGNED="no" + JIT_SUPPORTED=yes +- sgen_supported=true +- AOT_SUPPORTED="yes" ++ case $host_os in ++ linux*) ++ sgen_supported=true ++ AOT_SUPPORTED="yes" ++ ;; ++ esac + if test "x$cross_compiling" != "xno"; then + # Provide sane defaults when cross-compiling + CPPFLAGS="$CPPFLAGS -DARM_FPU_VFP=1 -D__ARM_EABI__ -DHAVE_ARMV6=1" +@@ -25132,10 +25141,12 @@ case "$host" in X11="libX11.dylib" ;; *-*-*netbsd*) @@ -74,7 +93,7 @@ Add __C99FEATURES__ to SunOS defines for additional math functions. LIBC="libc.so" INTL="libintl.so" SQLITE="libsqlite.so" -@@ -26162,7 +26169,6 @@ else +@@ -26162,7 +26173,6 @@ else fi diff --git a/lang/mono/patches/patch-ad b/lang/mono/patches/patch-ad index a2a40c1fc08..93ec8b0829e 100644 --- a/lang/mono/patches/patch-ad +++ b/lang/mono/patches/patch-ad @@ -1,5 +1,6 @@ -$NetBSD: patch-ad,v 1.24 2013/05/29 11:11:12 wiz Exp $ ---- mono/utils/mono-sigcontext.h.orig 2012-12-05 17:44:35.000000000 +0000 +$NetBSD: patch-ad,v 1.25 2013/08/18 09:42:31 jmcneill Exp $ + +--- mono/utils/mono-sigcontext.h.orig 2013-04-25 09:01:42.000000000 +0000 +++ mono/utils/mono-sigcontext.h @@ -204,6 +204,10 @@ typedef struct ucontext { #define UCONTEXT_REG_RSI(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs [_REG_RSI]) @@ -21,3 +22,31 @@ $NetBSD: patch-ad,v 1.24 2013/05/29 11:11:12 wiz Exp $ typedef ucontext_t os_ucontext; #define UCONTEXT_REG_Rn(ctx, n) ((ctx)->uc_mcontext.mc_gpr [(n)]) +@@ -354,6 +358,27 @@ typedef struct ucontext { + #define UCONTEXT_REG_R11(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_fp) + #define UCONTEXT_REG_R12(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_ip) + #define UCONTEXT_REG_CPSR(ctx) (((arm_ucontext*)(ctx))->sig_ctx.arm_cpsr) ++#elif defined(__NetBSD__) ++ typedef ucontext_t arm_ucontext; ++ ++ #define UCONTEXT_REG_PC(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_PC]) ++ #define UCONTEXT_REG_SP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_SP]) ++ #define UCONTEXT_REG_LR(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_LR]) ++ #define UCONTEXT_REG_R0(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R0]) ++ #define UCONTEXT_REG_R1(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R1]) ++ #define UCONTEXT_REG_R2(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R2]) ++ #define UCONTEXT_REG_R3(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R3]) ++ #define UCONTEXT_REG_R4(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R4]) ++ #define UCONTEXT_REG_R5(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R5]) ++ #define UCONTEXT_REG_R6(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R6]) ++ #define UCONTEXT_REG_R7(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R7]) ++ #define UCONTEXT_REG_R8(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R8]) ++ #define UCONTEXT_REG_R9(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R9]) ++ #define UCONTEXT_REG_R10(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R10]) ++ #define UCONTEXT_REG_R11(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R11]) ++ #define UCONTEXT_REG_R12(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_R12]) ++ #define UCONTEXT_REG_CPSR(ctx) (((ucontext_t*)(ctx))->uc_mcontext.__gregs[_REG_CPSR]) ++ #define UCONTEXT_REG_VFPREGS(ctx) (double*)(&((ucontext_t*)(ctx))->uc_mcontext.__fpu) + #endif + #elif defined(__mips__) + diff --git a/lang/mono/patches/patch-mono_mini_mini-arm.c b/lang/mono/patches/patch-mono_mini_mini-arm.c new file mode 100644 index 00000000000..ae521c0d1c7 --- /dev/null +++ b/lang/mono/patches/patch-mono_mini_mini-arm.c @@ -0,0 +1,63 @@ +$NetBSD: patch-mono_mini_mini-arm.c,v 1.1 2013/08/18 09:42:31 jmcneill Exp $ + +--- mono/mini/mini-arm.c.orig 2013-04-25 09:01:55.000000000 +0000 ++++ mono/mini/mini-arm.c +@@ -25,6 +25,11 @@ + #include "mono/arch/arm/arm-fpa-codegen.h" + #include "mono/arch/arm/arm-vfp-codegen.h" + ++#ifdef __NetBSD__ ++#include <machine/sysarch.h> ++#include <sys/sysctl.h> ++#endif ++ + #if defined(__ARM_EABI__) && defined(__linux__) && !defined(PLATFORM_ANDROID) && !defined(__native_client__) + #define HAVE_AEABI_READ_TP 1 + #endif +@@ -845,6 +850,34 @@ mono_arch_cpu_optimizations (guint32 *ex + v5_supported = TRUE; + darwin = TRUE; + iphone_abi = TRUE; ++#elif defined(__NetBSD__) ++ char *s = NULL; ++ size_t len; ++ if (sysctlbyname("machdep.cpu_arch", NULL, &len, NULL, 0) < 0) { ++ /* sysctlbyname error */ ++ return opts; ++ } ++ s = malloc(len); ++ if (sysctlbyname("machdep.cpu_arch", s, &len, NULL, 0) < 0) { ++ /* sysctlbyname error */ ++ free(s); ++ return opts; ++ } ++ ++ switch (s[0]) { ++ case '7': ++ v7_supported = TRUE; ++ /* FALLTHROUGH */ ++ case '6': ++ v6_supported = TRUE; ++ /* FALLTHROUGH */ ++ case '5': ++ v5_supported = TRUE; ++ break; ++ } ++ ++ free(s); ++ + #else + char buf [512]; + char *line; +@@ -1022,6 +1055,11 @@ mono_arch_flush_icache (guint8 *code, gi + #ifdef MONO_CROSS_COMPILE + #elif __APPLE__ + sys_icache_invalidate (code, size); ++#elif defined(__NetBSD__) ++ struct arm_sync_icache_args args; ++ args.addr = (uintptr_t)code; ++ args.len = (size_t)size; ++ sysarch(ARM_SYNC_ICACHE, &args); + #elif __GNUC_PREREQ(4, 1) + __clear_cache (code, code + size); + #elif defined(PLATFORM_ANDROID) |