-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[OpenMP] Provide __kmp_unnamed_critical_addr on SPARC #138517
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
[OpenMP] Provide __kmp_unnamed_critical_addr on SPARC #138517
Conversation
`libomp.so` currently fails to link on SPARC, both Solaris/sparcv9 and Linux/sparc64: ``` Undefined first referenced symbol in file __kmp_unnamed_critical_addr projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o ld: fatal: symbol referencing errors ``` This patch provides the necessary definition. While at it, I noticed that on non-x86 targets the symbol wasn't marked as `@object`, which this patch corrects, too. Tested on `sparcv9-sun-solaris2.11`, `sparc64-unknown-linux-gnu`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`.
This change caused an error in Android's LLVM builders:
I want to check if this error is a mistake from our build scripts or the change. |
It's my fault, unfortunately: I'd forgotten that while the |
I think this is only the case for ARM, not AArch64. The reason is that |
PR llvm#138517 broke the Android LLVM builders: ARM doesn't understand the `@object` form. As it turns out, one can use `%object` instead, which does assemble on all targets currently supported by `z_Linux_asm.S`. Tested by rebuilding `libomp.so` on `sparcv9-sun-solaris2.11`.
Seems so, still |
`libomp.so` currently fails to link on SPARC, both Solaris/sparcv9 and Linux/sparc64: ``` Undefined first referenced symbol in file __kmp_unnamed_critical_addr projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_gsupport.cpp.o ld: fatal: symbol referencing errors ``` This patch provides the necessary definition. While at it, I noticed that on non-x86 targets the symbol wasn't marked as `@object`, which this patch corrects, too. Tested on `sparcv9-sun-solaris2.11`, `sparc64-unknown-linux-gnu`, `amd64-pc-solaris2.11`, and `x86_64-pc-linux-gnu`.
PR #138517 broke the Android LLVM builders: ARM doesn't understand the `@object` form. As it turns out, one can use `%object` instead, which does assemble on all targets currently supported by `z_Linux_asm.S`. Tested by rebuilding `libomp.so` on `sparcv9-sun-solaris2.11`.
libomp.so
currently fails to link on SPARC, both Solaris/sparcv9 and Linux/sparc64:This patch provides the necessary definition. While at it, I noticed that on non-x86 targets the symbol wasn't marked as
@object
, which this patch corrects, too.Tested on
sparcv9-sun-solaris2.11
,sparc64-unknown-linux-gnu
,amd64-pc-solaris2.11
, andx86_64-pc-linux-gnu
.