]> granicus.if.org Git - clang/commitdiff
Add driver support for AArch64 Fedora.
authorTilmann Scheller <t.scheller@samsung.com>
Tue, 6 May 2014 16:58:14 +0000 (16:58 +0000)
committerTilmann Scheller <t.scheller@samsung.com>
Tue, 6 May 2014 16:58:14 +0000 (16:58 +0000)
Reviewed by Eric Christopher.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208105 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp
test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtbegin.o [new file with mode: 0644]
test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtend.o [new file with mode: 0644]
test/Driver/Inputs/fedora_21_tree/usr/lib64/crt1.o [new file with mode: 0644]
test/Driver/Inputs/fedora_21_tree/usr/lib64/crti.o [new file with mode: 0644]
test/Driver/Inputs/fedora_21_tree/usr/lib64/crtn.o [new file with mode: 0644]
test/Driver/linux-ld.c

index 6e741c6ab2f77ce0c0b12a8d6865a77be5e6f9ad..98cd927ad9a1891e0858bd460a20dc49859b7f0f 100644 (file)
@@ -1320,10 +1320,11 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {
   // Declare a bunch of static data sets that we'll select between below. These
   // are specifically designed to always refer to string literals to avoid any
   // lifetime or initialization issues.
-  static const char *const AArch64LibDirs[] = { "/lib" };
+  static const char *const AArch64LibDirs[] = { "/lib64", "/lib" };
   static const char *const AArch64Triples[] = { "aarch64-none-linux-gnu",
                                                 "aarch64-linux-gnu",
-                                                "aarch64-linux-android" };
+                                                "aarch64-linux-android",
+                                                "aarch64-redhat-linux" };
   static const char *const AArch64beLibDirs[] = { "/lib" };
   static const char *const AArch64beTriples[] = { "aarch64_be-none-linux-gnu",
                                                   "aarch64_be-linux-gnu" };
diff --git a/test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtbegin.o b/test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtbegin.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtend.o b/test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtend.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/fedora_21_tree/usr/lib64/crt1.o b/test/Driver/Inputs/fedora_21_tree/usr/lib64/crt1.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/fedora_21_tree/usr/lib64/crti.o b/test/Driver/Inputs/fedora_21_tree/usr/lib64/crti.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/fedora_21_tree/usr/lib64/crtn.o b/test/Driver/Inputs/fedora_21_tree/usr/lib64/crtn.o
new file mode 100644 (file)
index 0000000..e69de29
index b7dbb5a37b3a4d2d40590bfce0067240221d6618..4036635847bd15aad91a0ff9ca9a7c028de00b72 100644 (file)
 // CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2{{/|\\\\}}crtend.o"
 // CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib{{/|\\\\}}crtn.o"
 //
+// Check Fedora 21 on AArch64.
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN:     --target=arm64-unknown-linux-gnu \
+// RUN:     --sysroot=%S/Inputs/fedora_21_tree \
+// RUN:   | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN:     --target=aarch64-unknown-linux-gnu \
+// RUN:     --sysroot=%S/Inputs/fedora_21_tree \
+// RUN:   | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s
+// CHECK-FEDORA-21-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crt1.o"
+// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crti.o"
+// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0{{/|\\\\}}crtbegin.o"
+// CHECK-FEDORA-21-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-redhat-linux/4.9.0"
+// CHECK-FEDORA-21-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64"
+// 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"
+//
 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
 // RUN:     --target=arm-unknown-linux-gnueabi \
 // RUN:     --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \