This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add x86_64-redhat-linux-gnu as a platform triplet
AbandonedPublic

Authored by hoy on Jun 23 2021, 6:43 PM.

Details

Summary

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

Event Timeline

hoy created this revision.Jun 23 2021, 6:43 PM
hoy requested review of this revision.Jun 23 2021, 6:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2021, 6:43 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
hoy updated this revision to Diff 354135.Jun 23 2021, 6:44 PM

Updating D104831: [clang] Add x86_64-redhat-linux-gnu as a platform triplet

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.

hoy added a comment.Jun 24 2021, 9:24 AM

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.

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?

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.

One of our platforms is CentOS 7.

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.

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?

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.

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.

One of our platforms is CentOS 7.

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.

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?

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.

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.

hoy added a comment.Jun 24 2021, 12:13 PM

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.

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?

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.

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?

hoy abandoned this revision.Jun 28 2021, 10:44 AM