Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
aports
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
alpine
aports
Commits
a60ababa
Verified
Commit
a60ababa
authored
8 months ago
by
leso-kn
Browse files
Options
Downloads
Patches
Plain Diff
community/dotnet8-stage0: enable riscv64 cross build
parent
49038a08
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
community/dotnet8-stage0/APKBUILD
+4
-2
4 additions, 2 deletions
community/dotnet8-stage0/APKBUILD
community/dotnet8-stage0/runtime_disable_local_exec_tls_riscv64.patch
+38
-0
38 additions, 0 deletions
...tnet8-stage0/runtime_disable_local_exec_tls_riscv64.patch
with
42 additions
and
2 deletions
community/dotnet8-stage0/APKBUILD
+
4
−
2
View file @
a60ababa
...
...
@@ -2,7 +2,7 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname
=
dotnet8-stage0
pkgver
=
8.0.103
pkgrel
=
0
pkgrel
=
1
[
"
$CBUILD
"
!=
"
$CHOST
"
]
&&
_cross
=
"-
$CARCH
"
||
_cross
=
""
...
...
@@ -28,6 +28,7 @@ _patches="
runtime_more-clang-16-suppression.patch
runtime_remove-usage-of-off64-t.patch
runtime_fix-build-clang18.1.patch
runtime_disable_local_exec_tls_riscv64.patch
"
_pkgver_macro
=
${
pkgver
%.*
}
...
...
@@ -39,7 +40,7 @@ pkgdesc="The .NET Core stage0 bits for dotnet build"
# riscv64: port WIP https://github.com/dotnet/runtime/issues/84834
# s390x | ppc64le: mono-based builds are not yet stable on musl
# loongarch64: upstream code supported, blocked by binary tarball
arch
=
"all !x86 !armhf
!riscv64
!s390x !ppc64le !loongarch64"
arch
=
"all !x86 !armhf !s390x !ppc64le !loongarch64"
_giturl
=
https://github.com/dotnet/dotnet
url
=
https://dotnet.microsoft.com
license
=
"MIT"
...
...
@@ -457,4 +458,5 @@ c983a1ab7f06ac86691e0fa7a61fcad69a074d984ef4a4116bee43f20be918215963c7ec8ddd7edd
ac86fbed72754ead0b28ed51d18e98f91d8809a1535c09f910465581976bf607bd6159f5aa96c73d7407a4e7b918e80b90d8d30e17757fdfa91a36a2e8557c3e runtime_more-clang-16-suppression.patch
0c25319125ef5b0ad490b37a643c0c5257c796d5ed24f9ac404f698710b07de790bcbb0b6336d4a50025b94c3bff99b214951bd8f0a79a8d6f543ebaa300740f runtime_remove-usage-of-off64-t.patch
68d5df73645484de4e4fd1675793b817cac4808899b5b27b6a39f8043319f02bdf8109b3a3b0ce90aa37ef73347c4b3c57c90f62dff354e7ac184856d755a2da runtime_fix-build-clang18.1.patch
93454767eaa812ac39b38b04764bd41480fea9b5a78f32d2ea1baa072a20eb31d302c475e8737b0fb2a3b8a6f47567795ddd0a7603369e90e7c5944b11357b00 runtime_disable_local_exec_tls_riscv64.patch
"
This diff is collapsed.
Click to expand it.
community/dotnet8-stage0/runtime_disable_local_exec_tls_riscv64.patch
0 → 100644
+
38
−
0
View file @
a60ababa
diff --git a/src/runtime/src/coreclr/vm/riscv64/asmhelpers.S b/src/runtime/src/coreclr/vm/riscv64/asmhelpers.S
index 85ee7c3..3390603 100644
--- a/src/runtime/src/coreclr/vm/riscv64/asmhelpers.S
+++ b/src/runtime/src/coreclr/vm/riscv64/asmhelpers.S
@@ -965,6 +965,6 @@
NESTED_END OnCallCountThresholdReachedStub, _TEXT
// Load offset of native thread local variable `t_ThreadStatics` in TCB and return it in `a0` register.
LEAF_ENTRY GetThreadStaticsVariableOffset, _TEXT
- la.tls.ie a0, t_ThreadStatics
+ la.tls.gd a0, t_ThreadStatics
EPILOG_RETURN
LEAF_END GetThreadStaticsVariableOffset, _TEXT
diff --git a/src/runtime/src/coreclr/jit/helperexpansion.cpp b/src/runtime/src/coreclr/jit/helperexpansion.cpp
index 529bbfd..f3acffd 100644
--- a/src/runtime/src/coreclr/jit/helperexpansion.cpp
+++ b/src/runtime/src/coreclr/jit/helperexpansion.cpp
@@ -491,7 +491,7 @@
bool Compiler::fgExpandThreadLocalAccessForCall(BasicBlock** pBlock, Statement*
}
else
{
-#ifdef TARGET_ARM
+#if defined(TARGET_ARM) || defined(TARGET_RISCV64)
// On Arm, Thread execution blocks are accessed using co-processor registers and instructions such
// as MRC and MCR are used to access them. We do not support them and so should never optimize the
// field access using TLS.
diff --git a/src/runtime/src/coreclr/vm/jitinterface.cpp b/src/runtime/src/coreclr/vm/jitinterface.cpp
index 1cc6c37..cbb7a73 100644
--- a/src/runtime/src/coreclr/vm/jitinterface.cpp
+++ b/src/runtime/src/coreclr/vm/jitinterface.cpp
@@ -1437,7 +1437,7 @@
void CEEInfo::getThreadLocalStaticBlocksInfo (CORINFO_THREAD_STATIC_BLOCKS_INFO*
pInfo->tlsGetAddrFtnPtr = reinterpret_cast<void*>(&__tls_get_addr);
pInfo->tlsIndexObject = GetTlsIndexObjectAddress();
-#elif defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64) || defined(TARGET_RISCV64)
+#elif defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64)
// For Linux arm64/loongarch64/riscv64, just get the offset of thread static variable, and during execution,
// this offset, arm64 taken from trpid_elp0 system register gives back the thread variable address.
This diff is collapsed.
Click to expand it.
leso-kn
@leso-kn
mentioned in merge request
!66014
·
7 months ago
mentioned in merge request
!66014
mentioned in merge request !66014
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment