forked from OSchip/llvm-project
[Driver][RISCV] Add RedHat Linux RISC-V triple
Summary: Adds the RedHat Linux triple to the list of 64-bit RISC-V triples. Without this the gcc libraries wouldn't be found by clang on a redhat/fedora system, as the search list included `/usr/lib/gcc/riscv64-redhat-linux-gnu` but the correct path didn't include the `-gnu` suffix. Reviewers: lenary, asb, dlj Reviewed By: lenary Tags: #clang Differential Revision: https://reviews.llvm.org/D74399
This commit is contained in:
parent
a55dec7d64
commit
9816e726e7
|
@ -2090,6 +2090,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
|||
static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu",
|
||||
"riscv64-linux-gnu",
|
||||
"riscv64-unknown-elf",
|
||||
"riscv64-redhat-linux",
|
||||
"riscv64-suse-linux"};
|
||||
|
||||
static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
|
||||
|
|
|
@ -769,6 +769,21 @@
|
|||
// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0{{/|\\\\}}crtend.o"
|
||||
// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crtn.o"
|
||||
//
|
||||
// Check Fedora 31 on riscv64.
|
||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||
// RUN: --target=riscv64-redhat-linux -rtlib=platform \
|
||||
// RUN: --gcc-toolchain="" \
|
||||
// RUN: --sysroot=%S/Inputs/fedora_31_riscv64_tree \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-FEDORA-31-RISCV64 %s
|
||||
// CHECK-FEDORA-31-RISCV64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
||||
// CHECK-FEDORA-31-RISCV64: "{{.*}}/usr/lib/gcc/riscv64-redhat-linux/9/../../../../lib64{{/|\\\\}}crt1.o"
|
||||
// CHECK-FEDORA-31-RISCV64: "{{.*}}/usr/lib/gcc/riscv64-redhat-linux/9{{/|\\\\}}crti.o"
|
||||
// CHECK-FEDORA-31-RISCV64: "{{.*}}/usr/lib/gcc/riscv64-redhat-linux/9{{/|\\\\}}crtbegin.o"
|
||||
// CHECK-FEDORA-31-RISCV64: "-L[[SYSROOT]]/usr/lib/gcc/riscv64-redhat-linux/9"
|
||||
// CHECK-FEDORA-31-RISCV64: "-L[[SYSROOT]]/usr/lib/gcc/riscv64-redhat-linux/9/../../../../lib64"
|
||||
// CHECK-FEDORA-31-RISCV64: "{{.*}}/usr/lib/gcc/riscv64-redhat-linux/9{{/|\\\\}}crtend.o"
|
||||
// CHECK-FEDORA-31-RISCV64: "{{.*}}/usr/lib/gcc/riscv64-redhat-linux/9{{/|\\\\}}crtn.o"
|
||||
//
|
||||
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
||||
// RUN: --target=arm-unknown-linux-gnueabi -rtlib=platform \
|
||||
// RUN: --gcc-toolchain="" \
|
||||
|
|
Loading…
Reference in New Issue