Commit df738ff
committed
Detect musl by probing filesystem for native builds
LLVM's default target triple on Alpine reports x86_64-unknown-linux-gnu
instead of musl, causing the embedded LLD path to set the wrong dynamic
linker (/lib64/ld-linux-x86-64.so.2 instead of /lib/ld-musl-x86_64.so.1).
Binaries linked this way fail with "not found" because the interpreter
doesn't exist on Alpine.
For native compilation, probe for the musl dynamic linker on the
filesystem rather than trusting the triple. Cross-compilation still
relies on the triple since the host filesystem isn't relevant.1 parent 7f5620c commit df738ff
1 file changed
Lines changed: 30 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
305 | 334 | | |
306 | 335 | | |
307 | 336 | | |
308 | | - | |
| 337 | + | |
309 | 338 | | |
310 | 339 | | |
311 | 340 | | |
| |||
345 | 374 | | |
346 | 375 | | |
347 | 376 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | 377 | | |
355 | 378 | | |
356 | 379 | | |
| |||
0 commit comments