Opened 9 months ago
Last modified 9 months ago
#73272 new enhancement
llvm-17: 0019-10.6-and-less-use-emulated-TLS-before-10.7.patch is Mac-specific!
| Reported by: | RJVB (René Bertin) | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | |
| Keywords: | linux | Cc: | jeremyhu (Jeremy Huddleston Sequoia) |
| Port: | llvm-17 |
Description
I just built minimally adapted-for-linux versions of port:llvm-17 and port:clang-17, and ended up with a compiler that required -fno-emulated-tls to avoid link errors.
Turns out that 0019-10.6-and-less-use-emulated-TLS-before-10.7.patch adds an unprotected call to isMacOSXVersionLT() to Triple::hasDefaultEmulatedTLS() (in Triple.h); reversing that change fixed my linking issue.
Looking at the source for isMacOSXVersionLT() we can see that it asserts that it is executed only on Mac. Evidently we don't build with assertions on, so that verification disappears, as well as a 2nd one later on in the same function.
As a result, sMacOSXVersionLT(10, 7) returns true for every Linux system running a kernel before Linux 10, which should be just about every single one. ;)
Reporting that because the patch looks like it is intended to be upstreamable, and for port:llvm-17 because I've verified it there (but the patch is identical in port:llvm-devel)
Change History (1)
comment:1 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)
| Keywords: | linux added |
|---|---|
| Summary: | Heads-up: 0019-10.6-and-less-use-emulated-TLS-before-10.7.patch is Mac-specific! → llvm-17: 0019-10.6-and-less-use-emulated-TLS-before-10.7.patch is Mac-specific! |
