ifolder/dev-lang/mono/files/mono-2.6.7-arm-cpu-arch-overwrite.patch

29 lines
900 B
Diff
Raw Normal View History

diff -uNr mono-2.6.7.orig/mono/mini/mini-arm.c mono-2.6.7/mono/mini/mini-arm.c
--- mono-2.6.7.orig/mono/mini/mini-arm.c 2013-11-20 15:48:54.006460219 +0000
+++ mono-2.6.7/mono/mini/mini-arm.c 2013-11-20 15:08:34.000000000 +0000
@@ -532,6 +532,15 @@
mono_arch_cpu_optimizazions (guint32 *exclude_mask)
{
guint32 opts = 0;
+ const char *cpu_arch = getenv ("MONO_CPU_ARCH");
+ if (cpu_arch != NULL) {
+ thumb_supported = strstr (cpu_arch, "thumb") != NULL;
+ if (strncmp (cpu_arch, "armv", 4) == 0) {
+ v5_supported = cpu_arch [4] >= '5';
+ v5_supported = cpu_arch [4] >= '6';
+ v7_supported = cpu_arch [4] >= '7';
+ }
+ } else {
#if __APPLE__
thumb_supported = TRUE;
v5_supported = TRUE;
@@ -563,7 +572,7 @@
/*printf ("features: v5: %d, thumb: %d\n", v5_supported, thumb_supported);*/
}
#endif
-
+ }
/* no arm-specific optimizations yet */
*exclude_mask = 0;
return opts;