[runtime] Fixed AArch64 Android cross-compilation build.
authorJoão Matos <joao@tritao.eu>
Wed, 19 Aug 2015 13:54:43 +0000 (14:54 +0100)
committerJoão Matos <joao@tritao.eu>
Wed, 19 Aug 2015 13:56:23 +0000 (14:56 +0100)
This was introduced by https://github.com/mono/mono/commit/5604e0b5940a1df7059d11158b36fbde9a3c056d.

For some reason we were getting duplicate assembly labels, this fixes it.

```[8:45:15] /var/folders/hv/lh9y7pps1vbfsc737h_nl4mh0000gp/T//cczYhnuB.s: Assembler messages:
[8:45:15] /var/folders/hv/lh9y7pps1vbfsc737h_nl4mh0000gp/T//cczYhnuB.s:9012: Error: symbol `L0' is already defined
[8:45:15] make[7]: *** [libmini_la-mini-exceptions.lo] Error 1
[8:45:15] make[7]: *** Waiting for unfinished jobs....```

mono/mini/mini-exceptions.c

index f138734181cc24ad5ce1b342e20acf5f9ac6a371..7f5fe6bb224d6c34c80acc622d59f3371f6aef00 100644 (file)
@@ -2539,20 +2539,16 @@ mono_thread_state_init_from_sigctx (MonoThreadUnwindState *ctx, void *sigctx)
                return FALSE;
        }
 
-       if (sigctx)
+       if (sigctx) {
                mono_sigctx_to_monoctx (sigctx, &ctx->ctx);
-       else
-#if defined(MONO_CROSS_COMPILE)
-               ctx->valid = FALSE; //A cross compiler doesn't need to suspend.
-#elif MONO_ARCH_HAS_MONO_CONTEXT
-               MONO_CONTEXT_GET_CURRENT (ctx->ctx);
-#else
-               g_error ("Use a null sigctx requires a working mono-context");
-#endif
 
-       ctx->unwind_data [MONO_UNWIND_DATA_DOMAIN] = mono_domain_get ();
-       ctx->unwind_data [MONO_UNWIND_DATA_LMF] = mono_get_lmf ();
-       ctx->unwind_data [MONO_UNWIND_DATA_JIT_TLS] = thread->jit_data;
+               ctx->unwind_data [MONO_UNWIND_DATA_DOMAIN] = mono_domain_get ();
+               ctx->unwind_data [MONO_UNWIND_DATA_LMF] = mono_get_lmf ();
+               ctx->unwind_data [MONO_UNWIND_DATA_JIT_TLS] = thread->jit_data;
+       }
+       else {
+               mono_thread_state_init (ctx);
+       }
 
        if (!ctx->unwind_data [MONO_UNWIND_DATA_DOMAIN] || !ctx->unwind_data [MONO_UNWIND_DATA_LMF])
                return FALSE;