Browse Source

[runtime] Fixed AArch64 Android cross-compilation build.

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....```
João Matos 10 years ago
parent
commit
8b51c80715
1 changed files with 8 additions and 12 deletions
  1. 8 12
      mono/mini/mini-exceptions.c

+ 8 - 12
mono/mini/mini-exceptions.c

@@ -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;