Skip to content

[Clang][Driver][AArch64] Add support for aarch64-amazon-linux triple #109263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

peterwaller-arm
Copy link
Contributor

I note that the comment nearby says "They are not needed when the user has
correct LLVM_DEFAULT_TARGET_TRIPLE" and "The lists should shrink over time".

The behviour was diverged between X86 and aarch64: prior to this patch,
a standard clang with no configuration works on x86 but not aarch64
amazon linux; the latter fails to find C++ headers and libraries.

I note that the comment nearby says "They are not needed when the user has
correct LLVM_DEFAULT_TARGET_TRIPLE" and "The lists should shrink over time".

The behviour was diverged between X86 and aarch64: prior to this patch,
a standard clang with no configuration works on x86 but not aarch64
amazon linux; the latter fails to find C++ headers and libraries.
@peterwaller-arm peterwaller-arm marked this pull request as ready for review September 19, 2024 10:37
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' labels Sep 19, 2024
@llvmbot
Copy link
Member

llvmbot commented Sep 19, 2024

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Peter Waller (peterwaller-arm)

Changes

I note that the comment nearby says "They are not needed when the user has
correct LLVM_DEFAULT_TARGET_TRIPLE" and "The lists should shrink over time".

The behviour was diverged between X86 and aarch64: prior to this patch,
a standard clang with no configuration works on x86 but not aarch64
amazon linux; the latter fails to find C++ headers and libraries.


Full diff: https://github.com/llvm/llvm-project/pull/109263.diff

5 Files Affected:

  • (modified) clang/lib/Driver/ToolChains/Gnu.cpp (+2-1)
  • (added) clang/test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/aarch64-amazon-linux/7/crtbegin.o ()
  • (added) clang/test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/aarch64-amazon-linux/7/crtbeginT.o ()
  • (added) clang/test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/aarch64-amazon-linux/7/crtend.o ()
  • (modified) clang/test/Driver/linux-ld.c (+31-14)
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index 603d0468dd3f3c..f075ed0b35b6c5 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2470,7 +2470,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
   // lists should shrink over time. Please don't add more elements to *Triples.
   static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
   static const char *const AArch64Triples[] = {
-      "aarch64-none-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux"};
+      "aarch64-none-linux-gnu", "aarch64-redhat-linux", "aarch64-suse-linux",
+      "aarch64-amazon-linux"};
   static const char *const AArch64beLibDirs[] = {"/lib"};
   static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu"};
 
diff --git a/clang/test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/aarch64-amazon-linux/7/crtbegin.o b/clang/test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/aarch64-amazon-linux/7/crtbegin.o
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/clang/test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/aarch64-amazon-linux/7/crtbeginT.o b/clang/test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/aarch64-amazon-linux/7/crtbeginT.o
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/clang/test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/aarch64-amazon-linux/7/crtend.o b/clang/test/Driver/Inputs/ami_linux_tree/usr/lib/gcc/aarch64-amazon-linux/7/crtend.o
new file mode 100644
index 00000000000000..e69de29bb2d1d6
diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c
index 28fb075a80dbbc..3f775cc7b1003b 100644
--- a/clang/test/Driver/linux-ld.c
+++ b/clang/test/Driver/linux-ld.c
@@ -1705,23 +1705,40 @@
 // CHECK-LD-RHEL7-DTS-NOT: /usr/bin/ld
 // CHECK-LD-RHEL7-DTS: [[SYSROOT]]/usr/lib/gcc/x86_64-redhat-linux/7/../../../../bin/ld
 
-// Check whether gcc7 install works fine on Amazon Linux AMI
+// Check whether gcc7 install works fine on Amazon Linux AMI targeting x86_64
 // RUN: %clang -### %s -Werror -no-pie 2>&1 \
 // RUN:     --target=x86_64-amazon-linux -rtlib=libgcc --unwindlib=platform \
 // RUN:     --sysroot=%S/Inputs/ami_linux_tree \
-// RUN:   | FileCheck --check-prefix=CHECK-LD-AMI %s
-// CHECK-LD-AMI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
-// CHECK-LD-AMI: "--eh-frame-hdr"
-// CHECK-LD-AMI: "-m" "elf_x86_64"
-// CHECK-LD-AMI: "-dynamic-linker"
-// CHECK-LD-AMI: "{{.*}}/usr/lib/gcc/x86_64-amazon-linux/7{{/|\\\\}}crtbegin.o"
-// CHECK-LD-AMI: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-amazon-linux/7"
-// CHECK-LD-AMI: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-amazon-linux/7/../../../../lib64"
-// CHECK-LD-AMI: "-L[[SYSROOT]]/lib"
-// CHECK-LD-AMI: "-L[[SYSROOT]]/usr/lib"
-// CHECK-LD-AMI: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
-// CHECK-LD-AMI: "-lc"
-// CHECK-LD-AMI: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// RUN:   | FileCheck --check-prefix=CHECK-LD-AMI-X86_64 %s
+// CHECK-LD-AMI-X86_64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-LD-AMI-X86_64: "--eh-frame-hdr"
+// CHECK-LD-AMI-X86_64: "-m" "elf_x86_64"
+// CHECK-LD-AMI-X86_64: "-dynamic-linker"
+// CHECK-LD-AMI-X86_64: "{{.*}}/usr/lib/gcc/x86_64-amazon-linux/7{{/|\\\\}}crtbegin.o"
+// CHECK-LD-AMI-X86_64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-amazon-linux/7"
+// CHECK-LD-AMI-X86_64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-amazon-linux/7/../../../../lib64"
+// CHECK-LD-AMI-X86_64: "-L[[SYSROOT]]/lib"
+// CHECK-LD-AMI-X86_64: "-L[[SYSROOT]]/usr/lib"
+// CHECK-LD-AMI-X86_64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// CHECK-LD-AMI-X86_64: "-lc"
+// CHECK-LD-AMI-X86_64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+
+// Check whether gcc7 install works fine on Amazon Linux AMI targeting aarch64
+// RUN: %clang -### %s -Werror -no-pie 2>&1 \
+// RUN:     --target=aarch64-amazon-linux -rtlib=libgcc --unwindlib=platform \
+// RUN:     --sysroot=%S/Inputs/ami_linux_tree \
+// RUN:   | FileCheck --check-prefix=CHECK-LD-AMI-AARCH64 %s
+// CHECK-LD-AMI-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-LD-AMI-AARCH64: "--eh-frame-hdr"
+// CHECK-LD-AMI-AARCH64: "-dynamic-linker"
+// CHECK-LD-AMI-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-amazon-linux/7{{/|\\\\}}crtbegin.o"
+// CHECK-LD-AMI-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-amazon-linux/7"
+// CHECK-LD-AMI-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-amazon-linux/7/../../../../lib64"
+// CHECK-LD-AMI-AARCH64: "-L[[SYSROOT]]/lib"
+// CHECK-LD-AMI-AARCH64: "-L[[SYSROOT]]/usr/lib"
+// CHECK-LD-AMI-AARCH64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// CHECK-LD-AMI-AARCH64: "-lc"
+// CHECK-LD-AMI-AARCH64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
 
 // Check whether the OpenEmbedded ARM libs are added correctly.
 // RUN: %clang -### %s -no-pie 2>&1 \

@peterwaller-arm
Copy link
Contributor Author

peterwaller-arm commented Sep 19, 2024

I've checked the buildkite failures are in cfi-standalone-lld-thinlto-x86_64, which I believe are unrelated to this change.

Original fix and bug report for x86_64:

@MaskRay
Copy link
Member

MaskRay commented Sep 19, 2024

The behviour was diverged between X86 and aarch64: prior to this patch, a standard clang with no configuration works on x86 but not aarch64 amazon linux; the latter fails to find C++ headers and libraries.

This is not an issue of the source code. The system needs to do -DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-amazon-linux. The comment is here for reasons as it doesn't scale to encode every possible target triple.

The CMake build system could be adjusted to make -DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-amazon-linux implied on Amazon Linux, though.

Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@peterwaller-arm
Copy link
Contributor Author

The CMake build system could be adjusted to make -DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-amazon-linux implied on Amazon Linux, though.

Thanks - Is there precedence for this? Do you have any ideas about how to detect the correct default triple?

Copy link
Collaborator

@paulwalker-arm paulwalker-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whilst I understand the rational for requesting an alternate solution, it feels unfair. If the PR was to add a new OS or Vendor I'd have more sympathy but here we're talking about extending the existing Vendor-OS support to cover another target (i.e. x86_64-amazon-linux -> aarch64-amazon-linux) and so it seems fair to do so using the same method and maintain consistency.

Copy link

@RamaMalladiAWS RamaMalladiAWS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @peterwaller-arm .

@peterwaller-arm
Copy link
Contributor Author

@MaskRay please would you kindly reconsider aarch64-amazon-linux triple as an exception given the presence of x86_64 equivalent?

I've explored that LLVM_DEFAULT_TARGET_TRIPLE if unspecified comes from LLVM_INFERRED_HOST_TRIPLE which comes from config.guess in here:

execute_process(COMMAND sh ${config_guess}

config.guess is copy of an external project with a different license; this is what reports aarch64-unknown-linux-gnu. For the time being it would seem fair to put aarch64 on the same footing as x86_64 here.

@stewartsmith
Copy link

For context and history on Amazon Linux and triplets:

Amazon Linux 1 (otherwise known as Amazon Linux AMI / al-ami) is (was?) the now End-of-Life first Amazon Linux version. It was only ever built for x86 and x86-64, and used the $ARCH-amazon-linux triplet.

The last 32bit AMI being part of the 2014.09 release, which means it's been close to a decade now of booting 32bit not being supported in AL. Runtime support for 32-bit continued however, until EoL.

Amazon Linux 2 (released 2018, still supported) was the first to add aarch64 (on top of x86-64). It still had some i686 runtime support, but didn't ship devel packages. The compiler triplet was $ARCH-redhat-linux-gcc (for gcc), reflecting its closer lineage.

The current release, Amazon Linux 2023, is back to using the -amazon-linux part.

tl;dr: AL2 has -redhat-linux- in the triplet, and AL2023 goes back to having -amazon-linux- like AL1 had.

I've attached the patch we carry in clang on AL2023 so we get all the right triplets, which is effectively what the PR here does (albeit adding i686 as well, as we only dropped 32-bit builds later in the AL2023 development cycle). Apologies for not sending this upstream at the time - certainly my bad there.

Going forward, I can't see any future version of Amazon Linux changing away from -amazon-linux- in the triplet.

0003-Add-Amazon-Linux-vendor-triplets-to-set-of-GNU-toolc.patch

For the tests being added here, if covering the (EoL) AL1 is desired, then that'd be separate from what covering AL2023 would be.

@peterwaller-arm
Copy link
Contributor Author

Consensus expressed so far seems to be in favour of merging but I'll wait to give further opportunity for comment or objection before merging on Tuesday 8th around 0900 UTC.

@MaskRay
Copy link
Member

MaskRay commented Oct 4, 2024

I don't think we've reached consensus. The comment there serves a purpose and specifically discourages people from doing this mismatching triple things.

If the GCC installation on Amazon Linux uses aarch64-amazon-linux, and the default target triple of the Clang is aarch64-unknown-linux-gnu, it's by design that the GCC installation doesn't got picked.
(The code here is more loose in that --target=aarch64-unknown-linux-musl would pick up aarch64-amazon-linux.)

If for some reason you have a Clang with the default target triple aarch64-unknown-linux-gnu,
you could change clang to a wrapper that does real/clang --target=aarch64-amazon-linux.

While I appreciate @stewartsmith 's long context, I don't think it provides real justification.

If you want a llvm-project build to have correct LLVM_DEFAULT_TARGET_TRIPLE without user explicitly specifying it, please make a patch to fix CMake.

Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@peterwaller-arm
Copy link
Contributor Author

OK, Thanks for the input all. I'm abandoning this change, I'm not following up for the time being if someone is able to fix this.

Part of the problem is that it's not clear what a clean/correct cmake check would be to determine the triple. My current thinking is that cmake could take the existing inferred triple from config.guess and then amend the vendor. What's unclear is how to determine the vendor in an accurate and scalable way, without making a mess. Perhaps it would be even better if someone can fix config.guess since that is used by other projects, and then LLVM would not need special logic and it keeps the detection logic in one place.

@peterwaller-arm peterwaller-arm deleted the upstream-main branch October 14, 2024 10:24
@ozbenh
Copy link

ozbenh commented Oct 26, 2024

So what should we (Amazon Linux) do to help with this ? I'm not the most familiar with autotools and cmake, I know we did some tweaking of triples in the version of llvm/clang we ship as part of the distro and it's very possible that we did something wrong. I would love to help make things work better out of the box.

@peterwaller-arm
Copy link
Contributor Author

So what should we (Amazon Linux) do to help with this ?

What I think is needed is:

  • Public consensus on how to detect the triple (or at least the vendor) on Amazon Linux. This would help coming from you.
  • Consensus on how/when to insert the triple into LLVM_INFERRED_HOST_TRIPLE.

LLVM_DEFAULT_TARGET_TRIPLE if unspecified comes from LLVM_INFERRED_HOST_TRIPLE which comes from config.guess in here:

execute_process(COMMAND sh ${config_guess}

I don't know enough about the history of the current GetHostTriple and the fact it calls into the (long) GNU-licensed vendored config.guess file.

My guess is that a solution should continue to use the existing config.guess; but that would need to be fixed by someone else in https://git.savannah.gnu.org/cgit/config.git/ and then the vendored copy updating. It seems to me this is the cleanest minimal solution (which will also fix other things), but it assumes config.guess is here to stay in the LLVM repository. If not, then an alternative method would be to add logic to GetHostTriple cmake file linked above to determine the triple without use of config.guess [0]. There is also the possibility of a hybrid solution of patching the triple coming out of config.guess to insert the vendor but that would seem to be adding to the mess, so I assume that's a non-starter.

[0] I'm not sure how; maybe it's as simple as checking for or enumerating some paths, but I'm not sure we ideally want to be 'in the limit' adding many path checks during configure time either. If only there existed a /etc/triple that could be read.

pawosm-arm added a commit to arm/arm-toolchain that referenced this pull request Feb 28, 2025
Amazon Linux uses different target triple than other distributions.
An attempt to accomodate it in Clang's frontend driver has been
rejected already [1], so the only way to handle it is to set the
default target triple explicitly when building LLVM. This will affect
the name of the runtimes library which LLVM creates.

[1] llvm/llvm-project#109263
pawosm-arm added a commit that referenced this pull request Feb 28, 2025
…gets (#129140)

The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR #109263, somewhat serious linker issues are
encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like:
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective,
making it impossible to complete all of the check-cxx without failures.
pawosm-arm added a commit to arm/arm-toolchain that referenced this pull request Feb 28, 2025
Amazon Linux uses different target triple than other distributions. An
attempt to accomodate it in Clang's frontend driver has been rejected
already [1], so the only way to handle it is to set the default target
triple explicitly when building LLVM. This will affect the name of the
runtimes library which LLVM creates.

[1] llvm/llvm-project#109263
pawosm-arm added a commit to arm/arm-toolchain that referenced this pull request Feb 28, 2025
It's a cherry-pick from the arm-software branch.

Amazon Linux uses different target triple than other distributions. An
attempt to accomodate it in Clang's frontend driver has been rejected
already [1], so the only way to handle it is to set the default target
triple explicitly when building LLVM. This will affect the name of the
runtimes library which LLVM creates.

[1] llvm/llvm-project#109263
cheezeburglar pushed a commit to cheezeburglar/llvm-project that referenced this pull request Feb 28, 2025
…gets (llvm#129140)

The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR llvm#109263, somewhat serious linker issues are
encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like:
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective,
making it impossible to complete all of the check-cxx without failures.
pawosm-arm added a commit to pawosm-arm/llvm-project that referenced this pull request Mar 1, 2025
The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR llvm#109263, somewhat serious linker issues
are encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective, making it
impossible to complete all of the check-cxx on Amazon Linux without
failing.
pawosm-arm added a commit to arm/arm-toolchain that referenced this pull request Mar 1, 2025
It's a cherry-pick from the arm-software branch.

Amazon Linux uses different target triple than other distributions. An
attempt to accomodate it in Clang's frontend driver has been rejected
already [1], so the only way to handle it is to set the default target
triple explicitly when building LLVM. This will affect the name of the
runtimes library which LLVM creates.

[1] llvm/llvm-project#109263
pawosm-arm added a commit to pawosm-arm/llvm-project that referenced this pull request Mar 1, 2025
The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR llvm#109263, somewhat serious linker issues
are encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective, making it
impossible to complete all of the check-cxx on Amazon Linux without
failing.
pawosm-arm added a commit that referenced this pull request Mar 3, 2025
The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR #109263, somewhat serious linker issues are
encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective, making it
impossible to complete all of the check-cxx on Amazon Linux without
failing.
swift-ci pushed a commit to swiftlang/llvm-project that referenced this pull request Mar 12, 2025
…29377)

The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR llvm#109263, somewhat serious linker issues are
encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective, making it
impossible to complete all of the check-cxx on Amazon Linux without
failing.

(cherry picked from commit 8f4ee42)
jph-13 pushed a commit to jph-13/llvm-project that referenced this pull request Mar 21, 2025
…29377)

The default triple of Amazon Linux on AArch64 is aarch64-amazon-linux,
see issue highlighded by PR llvm#109263, somewhat serious linker issues are
encountered if any other triple is being used.

Unfortunately, this makes XFAIL lines like
`XFAIL: target=aarch64{{.*}}-linux-gnu` ineffective, making it
impossible to complete all of the check-cxx on Amazon Linux without
failing.
@ozbenh
Copy link

ozbenh commented Jun 3, 2025

Would it be possible to reconsider the decision and add aarch64-amazon-linux since we already do have x86_64-amazon-linux and so far, none of the workarounds are working well (LLVM_DEFAULT_TARGET_TRIPLE misses the gnu support for example).

Amazon Linux carries a donstream patch adding the triple

@peterwaller-arm
Copy link
Contributor Author

I continue to hear reports of people tripping over this problem, and it continues to be unfortunate that it works as expected out of the box on x86 but not on Arm. So I remain in favour of adding it for this specific case, since the x86 legacy is there already.

The alternative route to solution would be that someone needs to fix config.guess upstream so that it reports the correct triple (and get that into LLVM), then, at least if you build the compiler on Amazon Linux, I believe it should work as intended.

This second route does mean that if you build a compiler off-of amazon linux it won't work when run on amazon linux. Which I think is unfortunate (e.g. the manyclangs project supplies a compiler where it would be good if it could work in this scenario); but my belief on that subject is conditioned on whether there are other concrete reasons such a compiler should not work in this configuration.

@MaskRay
Copy link
Member

MaskRay commented Jun 3, 2025

As the comment specifies, we really should not add new elements to *Dirs arrays in Generic_GCC::GCCInstallationDetector::CollectLibDirsAndTriples. I think #140070 is favorable to canonicalize the triple internally. (I wish that Amazon Linux will fix their triple for the GCC installation as well. It doesn't save much by dropping "-gnu".)

--gcc-triple= is available to support this scenario.

@peterwaller-arm
Copy link
Contributor Author

As the comment specifies, we really should not add new elements to *Dirs arrays in Generic_GCC::GCCInstallationDetector::CollectLibDirsAndTriples.

Thanks for following up again @MaskRay. Forgive me for asking, but I didn't see a clear justification for "why" along side that comment. Only that it is so. I can imagine some justification for the rule, but where do you see the pressure coming from against adding it in this specific scenario? Can it be added in the interim until a proper fix has been identified/made?

Is anyone in a position to fix the config.guess machinery, or suggest a method to reliably detect the triple in LLVM's cmake? Is this merely a matter of adding a test for the existence of a directory in the cmake, or is something more complicated necessary?

@ozbenh
Copy link

ozbenh commented Jun 5, 2025

@MaskRay Fedora and RHEL also don't use -gnu ... we had no idea this mattered when we did this and we can't really change it at this point without breaking customers.

I would understand applying the rule for new use cases, but this is an established one that cannot be fixed, and an existing discrepancy in clang since it does already have the amazon linux triplet for x86_64, just missing the aarch64 one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:driver 'clang' and 'clang++' user-facing binaries. Not 'clang-cl' clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants