https://sourceware.org/bugzilla/show_bug.cgi?id=35009
--- Comment #3 from Jessica Clarke <jrtc27 at jrtc27 dot com> --- Oh. Well glibc doesn't support TLSDESC yet. Prior to linker relaxation support, compiling the test executable would work, but running it would not, since R_RISCV_TLSDESC would be an unsupported relocation and ld.so would exit with an error. Once linker relaxation support landed, because the test executable is an executable, it can always be relaxed at link time from TLSDESC, a purely dynamic TLS model, to a static TLS variant, either Initial Exec or Local Exec, both of which are the same as for -mtls-dialect=trad. So effectively the flag did nothing and you ended up testing that normal static TLS works, but this means the build system thinks it's supported. Then when it comes along and uses it for real to link a DSO, not an executable, it ends up with actual TLSDESC relocations in the output that can't be relaxed. So yes, your bisect makes sense, but not for the reasons one might initially think. Blame mesa for not having a proper configure test. It uses, and I quote, "-fpic to force dynamic tls, otherwise TLS relaxation defeats check", but this only thwarts the equivalent *compile-time relaxation*, not link-time relaxation (and the whole point of this specific link-time relaxation is so you can optimise objects built with -fpic; if you knew they were compiled as -fno-pic or -fpie then this would be dead code). -- You are receiving this mail because: You are on the CC list for the bug.
