This is required to find headers on the Debian port for RISC-V.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This needs a test.
Can Debian's riscv GCC be fixed to use a normalized triple for library and include paths?
There are no tests for any of the other architectures.
Can Debian's riscv GCC be fixed to use a normalized triple for library and include paths?
This is not specific to RISC-V. As you can see by all the other cases, Clang's target triple is actually not normalized wrt to distro layout.
@MaskRay is this ok to land without the test? IMHO, if this part of the driver is to be tested, it should happen for all architectures and requires mock directories because the paths are only added to the list of include / library directories if they exist. This goes far beyond this patch, only adding a case to the existing method.
Clang's target triple is normalized, as you can see from its clang -dumpmachine output.
However, Debian chose to have a different opinion and omit unknown/pc from -dumpmachine output.
This added significant overhead to the maintenance of clang driver.
Last year we have this problem that D107799 has been reverted and nobody gives insight whether relanding it will break things, so it just gets stuck.
For Debian, it'd be entirely fine to keep the target triple normalized (therefore paths like -L/usr/lib/gcc-cross/powerpc64le-unknown-linux-gnu/11) while providing executable symlinks without known, e.g. /usr/bin/powerpc64le-linux-gnu-gcc