Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

Fixes #93942. Works around #95223 (a better but more risky fix is in #95312, so I'm not going to resolve that with this PR).

The first issue is that we don't consider x64 Windows (or x64 Linux) to x64 Bionic build a crossbuild. The crossbuild detection only looks at architecture, not at the OS. The fix is very conservative so that we can backport to 8.0. Bionic is always a crossbuild.

The second part is a port of dotnet/corert#8323 to x64. It is a lot less work than on arm64 because x64 Linux already has to assume INLINE_GETTHREAD could be a call so everything is setup for it.

I tested this all on a x64 Bionic hello world. I also ran all of smoke tests on x64 Linux with FEATURE_EMULATED_TLS enabled. All of this looks very non-risky so I'm going to ask for a backport.

Cc @dotnet/ilc-contrib

Fixes dotnet#93942. Works around dotnet#95223 (a better but more risky fix is in dotnet#95312, so I'm not going to resolve that with this PR).

The first issue is that we don't consider x64 Windows (or x64 Linux) to x64 Bionic build a crossbuild. The crossbuild detection only looks at architecture, not at the OS. The fix is very conservative so that we can backport to 8.0. Bionic is always a crossbuild.

The second part is a port of dotnet/corert#8323 to x64. It is a lot less work than on arm64 because x64 Linux already has to assume `INLINE_GETTHREAD` could be a call so everything is setup for it.

I tested this all on a x64 Bionic hello world. I also ran all of smoke tests on x64 Linux with `FEATURE_EMULATED_TLS` enabled. All of this looks very non-risky so I'm going to ask for a backport.
@ghost
Copy link

ghost commented Nov 28, 2023

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #93942. Works around #95223 (a better but more risky fix is in #95312, so I'm not going to resolve that with this PR).

The first issue is that we don't consider x64 Windows (or x64 Linux) to x64 Bionic build a crossbuild. The crossbuild detection only looks at architecture, not at the OS. The fix is very conservative so that we can backport to 8.0. Bionic is always a crossbuild.

The second part is a port of dotnet/corert#8323 to x64. It is a lot less work than on arm64 because x64 Linux already has to assume INLINE_GETTHREAD could be a call so everything is setup for it.

I tested this all on a x64 Bionic hello world. I also ran all of smoke tests on x64 Linux with FEATURE_EMULATED_TLS enabled. All of this looks very non-risky so I'm going to ask for a backport.

Cc @dotnet/ilc-contrib

Author: MichalStrehovsky
Assignees: MichalStrehovsky
Labels:

area-NativeAOT-coreclr

Milestone: -

@MichalStrehovsky MichalStrehovsky merged commit 65d3860 into dotnet:main Nov 29, 2023
@MichalStrehovsky MichalStrehovsky deleted the fix93942 branch November 29, 2023 07:10
@MichalStrehovsky
Copy link
Member Author

/backport to release/8.0-staging

@github-actions
Copy link
Contributor

Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/7029185668

@github-actions github-actions bot locked and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NativeAOT] ld.lld: error: undefined symbol: tls_CurrentThread

2 participants