When running on a host system using musl, the target triple is defined
as hexagon-unknown-linux-musl by default. The Linux ABI differs from
the non-Linux one with varargs, so this causes the tests to fail.
Closes BZ49592, PR48936.
Differential D126637
[Hexagon][test] Fix tests on Linux/musl awilfox on May 30 2022, 1:42 AM. Authored by
Details
Diff Detail
Event TimelineComment Actions
I think this is incorrect. This is due to difference between linux-gnu and linux-musl. -march=hexagon uses the default target triple (which typically has linux-gnu on a linux-gnu system) and changes the arch part of hexagon. Somehow linux-gnu and generic ELF have the same behavior, which linux-musl has a different behavior. I think the better fix is to replace -march= with -mtriple=hexagon, instead of keeping both. Comment Actions I'm happy to refactor to remove the -march; I was just following the rest of the tests in the Hexagon directory that all have this pattern of -march followed by -mtriple (see the original musl tests added in D72701, and also the OpenBSD test in D126265). Should we remove the -march from the other tests as well? As for "Linux ABI" vs "musl ABI", D72701 and its resultant commit specify:
I think the original developers were under the impression that musl wasn't used for development / workstation OS, so they felt this was safe. Since we at Adélie Linux hadn't been updating our LLVM packaging, we didn't run into this issue until now. Comment Actions Yes. Generally -march should be avoided for llc.
Thx.
|