From f5cad6a44df3e48e542f51541e061a2fc68732bf Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 5 Feb 2024 20:05:22 +0100 Subject: [PATCH 1/5] Build support for linux-bionic-arm --- .../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 3 ++- src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index 1b38cbd3efa37..1cc7214c2de5e 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -43,11 +43,12 @@ The .NET Foundation licenses this file to you under the MIT license. gnu gnueabihf + androideabi21 + android21 $(CrossCompileArch)-linux-$(CrossCompileAbi) $(CrossCompileArch)-alpine-linux-musl - $(CrossCompileArch)-linux-android21 $(CrossCompileArch)-unknown-freebsd12 $ORIGIN diff --git a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc index 9ec98a0881b84..5a1cef176e102 100644 --- a/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc +++ b/src/coreclr/nativeaot/Runtime/unix/unixasmmacrosarm.inc @@ -276,8 +276,12 @@ C_FUNC(\Name): .endm .macro INLINE_GETTHREAD +#ifdef FEATURE_EMULATED_TLS + bl C_FUNC(RhpGetThread) +#else // Inlined version of call C_FUNC(RhpGetThread) INLINE_GET_TLS_VAR tls_CurrentThread +#endif .endm .macro INLINE_THREAD_UNHIJACK threadReg, trashReg1, trashReg2 From 25282a8b7ec44e3a408870ef8f134f95643c22a2 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 5 Feb 2024 20:53:04 +0100 Subject: [PATCH 2/5] Add linux-musl, change arch to armv7 --- .../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index 1cc7214c2de5e..f0230c76d7699 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -39,12 +39,13 @@ The .NET Foundation licenses this file to you under the MIT license. x86_64 aarch64 arm64 - arm + armv7 gnu gnueabihf androideabi21 android21 + musleabihf $(CrossCompileArch)-linux-$(CrossCompileAbi) From 37d5f9c2b605d3329300694f71d28c78c687248c Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 5 Feb 2024 20:58:52 +0100 Subject: [PATCH 3/5] Simplify the conditions --- .../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index f0230c76d7699..cbc988ebbcf4c 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -42,9 +42,9 @@ The .NET Foundation licenses this file to you under the MIT license. armv7 gnu - gnueabihf - androideabi21 - android21 + android21 + gnueabihf + androideabi21 musleabihf From 2fb588879949011266660d0176899f600dc1bc93 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Tue, 6 Feb 2024 08:32:18 +0100 Subject: [PATCH 4/5] Move linux-musl on the CrossCompileAbi model --- .../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index cbc988ebbcf4c..577161923f258 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -43,13 +43,13 @@ The .NET Foundation licenses this file to you under the MIT license. gnu android21 + musl gnueabihf androideabi21 musleabihf $(CrossCompileArch)-linux-$(CrossCompileAbi) - $(CrossCompileArch)-alpine-linux-musl $(CrossCompileArch)-unknown-freebsd12 $ORIGIN From f73e628e830c5788129474c7428ca3ad8e50a75a Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Tue, 6 Feb 2024 11:36:09 +0100 Subject: [PATCH 5/5] Update src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> --- .../BuildIntegration/Microsoft.NETCore.Native.Unix.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets index 577161923f258..14a0309902c2d 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets @@ -42,8 +42,8 @@ The .NET Foundation licenses this file to you under the MIT license. armv7 gnu - android21 - musl + android21 + musl gnueabihf androideabi21 musleabihf