Clang requires a valid/compatible installation of gcc from which it includes some internal headers. Typically clang automatically detects the correct installation of gcc from the set of gcc's installed on the system at standard locations. Adding the platform tripplet x86_64-redhat-linux-gnuthe while list of supported x86_64 triplets so that it can be used with the --gcc-toolchain option to bypass this process and force-pick a given gcc install.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Adding the platform tripplet x86_64-redhat-linux-gnu the while list of supported x86_64 triplets so that it can be used with the --gcc-toolchain option to bypass this process and force-pick a given gcc install.
Did you set --target=x86_64-redhat-linux-gnu? With that I don't think you need another entry in X86_64Triples.
X86_64Triples and its friends are quite clumsy and many entries are not actually needed. We should shrink the lists.
For https://bugzilla.redhat.com/show_bug.cgi?id=1824365 I think the right fix is to configure clang with x86_64-redhat-linux-gnu as the default triple.
I'm curious, what kind of system are you running on where you need to use --gcc-toolchain x86_64-redhat-linux-gnu is required.
Explicitly specifying target or configure the default build target would work. But I thought the triple vector being updated is designed for automatic searching and minimizing configure changes across platforms. Is it not like that?
One of our platforms is CentOS 7.
I am not sure about this guarantee. The list could be endless long if we supported every platform.
The right fix is to configure llvm-project with a correct LLVM_DEFAULT_TARGET_TRIPLE.
One of our platforms is CentOS 7.
Do you know why clang is not auto-detecting x86_64-redhat-linux-gnu? I'm just wondering if there is some larger problem.
I'm not sure why x86_64-redhat-linux-gnu was not in the preset triples. x86_64-redhat-linux is there though. Maybe gnu libraries are not commonly used on Redhat?