[llvm] [TargetParser] Parse Amazon Linux triple and handle RuntimeLibcalls (PR #136114)

Paul Osmialowski via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 03:13:58 PDT 2025


================
@@ -173,7 +173,7 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
     setLibcallName(RTLIB::EXP10_F64, "__exp10");
   }
 
-  if (TT.isGNUEnvironment() || TT.isOSFuchsia() ||
+  if (TT.isGNUEnvironment() || TT.isOSFuchsia() || TT.isAmazonLinux() ||
----------------
pawosm-arm wrote:

> Ideally you should switch to `aarch64-amazon-linux-gnu`.

I've tried that. I've set `LLVM_DEFAULT_TARGET_TRIPLE=aarch64-amazon-linux-gnu` in CMake. The compiler built that way has proven to be useless on Amazon Linux, not to mention it is not passing any `make check` tests, it fails very quickly like this:

```
/usr/bin/ld: cannot find -lstdc++: No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```

And the reason for this is pretty obvious, Amazon Linux treats its triple pretty seriously and uses it wherever it can, e.g., where is libstdc++.so?:

```
$ rpm -ql libstdc++-devel|grep libstdc++.so
/usr/lib/gcc/aarch64-amazon-linux/11/libstdc++.so
/usr/lib/gcc/aarch64-amazon-linux/11/libstdc++.so.6.0.29
```


https://github.com/llvm/llvm-project/pull/136114


More information about the llvm-commits mailing list