-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x86 Linux build fails #55521
Comments
I've just found that it is a clang issue. The build works fine with clang 10, but not with clang 9 for some reason. @t-mustafin would using clang-10 be an option for you? The clang 9 seems to be somehow confused by the instruction. Even with just |
It seems to be a known issue in clang, apparently fixed in clang >=10: |
@janvorli we use old clang-5 for production builds. Thank you for information, we'll check whether this bug exists on other clang versions. |
I have a workaround that works on the older clangs as well, just verifying that it generates the expected code. |
It seems to generate proper code, the diff is: diff --git a/src/coreclr/vm/i386/jithelp.S b/src/coreclr/vm/i386/jithelp.S
index dc56da1d177..4f227c9cf60 100644
--- a/src/coreclr/vm/i386/jithelp.S
+++ b/src/coreclr/vm/i386/jithelp.S
@@ -392,7 +392,9 @@ LEAF_ENTRY JIT_WriteBarrier_Callable, _TEXT
1:
pop eax
2:
- add eax, offset _GLOBAL_OFFSET_TABLE_+1 // (2b - 1b)
+.att_syntax
+ addl $_GLOBAL_OFFSET_TABLE_+(2b-1b), %eax
+.intel_syntax noprefix
mov eax, dword ptr [eax + C_FUNC(JIT_WriteBarrierEAX_Loc)@GOT]
xchg eax, dword ptr [esp]
ret |
@janvorli Thanks, it works for me with clang9 and clang5. |
@janvorli btw as I see clang11 is last supported version. Are there plans for adding clang12 support? |
@alpencolt yes, I'd like to support the latest clang releases. I haven't monitored the llvm releases recently, so I've missed the fact that there is a version 12 already. Have you tried it and found issues with it? |
It seems it was released in April. We haven't tried it yet but want to update our toolchain and I check which version fits more. |
Usually moving to a new version just works. In some cases, it caused build breaks in the past that we needed to fix. |
x86 Linux build fails with message:
Problem occures on
runtime/src/coreclr/vm/i386/jithelp.S
Line 395 in 738b09b
Build command:
cc @janvorli @jkotas @alpencolt @gbalykov
The text was updated successfully, but these errors were encountered: