LLVM does not implement GNU2 TLS descriptors on x86-64, related to the R_X86_64_TLSDESC relocation type (and R_X86_64_GOTPC32_TLSDESC, R_X86_64_TLSDESC_CALL for relaxation). We want to use TLS descriptors on x86-64. Lack of LLVM support is not a blocker because the new TLS type and the legacy TLS type are fully interoperable (either approach can bind TLS symbols under any TLS model). There is LLVM support for this feature on AArch64. Reproducible: Always
Do you know where to find documentation for these GNU2 TLS descriptors?
I believe this is the canonical writeup: http://www.fsfla.org/~lxoliva/writeups/TLS/RFC-TLSDESC-x86.txt
We have encountered a potential GCC or x86-64 psABI ambiguity when we tried to enable this for Fedora 40: GCC and the GNU2 TLS descriptor call ABI <https://groups.google.com/g/x86-64-abi/c/NXQve2SPubc> GNU2 TLS descriptor calls do not follow psABI on x86_64-linux-gnu <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113874>
It looks like Intel is working on the implementation here: https://github.com/llvm/llvm-project/pull/83136
building seamonkey on rawhide [2] ATM , is this bug isn't it ? configure: error: compiler is incompatible with sanitize options DEBUG: <truncated - see config.log for full output> DEBUG: configure:2648: /usr/lib64/ccache/clang -E -std=gnu99 conftest.c >/dev/null 2>conftest.out DEBUG: configure:2724: /usr/lib64/ccache/clang -std=gnu99 -o conftest -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wformat -Wno-format-overflow conftest.c -lXt 1>&5 DEBUG: clang: error: unsupported argument 'gnu2' to option '-mtls-dialect=' for target 'x86_64-redhat-linux-gnu' DEBUG: configure: failed program was: DEBUG: #line 2717 "configure" DEBUG: #include "confdefs.h" DEBUG: DEBUG: int main() { DEBUG: XtMalloc() DEBUG: ; return 0; } DEBUG: configure:3957: /usr/lib64/ccache/clang -std=gnu99 -o conftest -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wformat -Wno-format-overflow -Qunused-arguments conftest.c 1>&5 DEBUG: clang: error: unsupported argument 'gnu2' to option '-mtls-dialect=' for target 'x86_64-redhat-linux-gnu' DEBUG: configure: failed program was: DEBUG: #line 3950 "configure" DEBUG: #include "confdefs.h" DEBUG: DEBUG: int main() { DEBUG: DEBUG: ; return 0; } DEBUG: configure: error: compiler is incompatible with sanitize options ERROR: old-configure failed
@sergio That looks like it's trying to using the gcc flags. If you are compiling with clang you need to define: %toolchain clang In your spec file.
Thank you , I think the best is open a bug report on seamonkey component I'm just rebuild packages with libjxl soname bump
Closing this as TLSDESC support has been implemented upstream in https://github.com/llvm/llvm-project/pull/83136. I'll keep the clang issue open for now so we have a reminder to do the redhat-rpm-config change after the LLVM 19 update.