]> granicus.if.org Git - clang/commitdiff
[Driver] Add openSuse AArch64 Triple
authorKostya Kortchinsky <kostyak@google.com>
Tue, 10 Jan 2017 21:13:08 +0000 (21:13 +0000)
committerKostya Kortchinsky <kostyak@google.com>
Tue, 10 Jan 2017 21:13:08 +0000 (21:13 +0000)
Summary:
openSuse has AArch64 support, with images running on the Raspberry Pi 3.
The libraries and headers live under the aarch64-suse-linux subdirectory,
which is currently not in the AArch64 triples list. Address this by adding
the corresponding string to AArch64Triples.

Reviewers: chandlerc, bruno, bkramer, rengolin

Subscribers: aemerson, rengolin, cfe-commits

Differential Revision: https://reviews.llvm.org/D28238

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

lib/Driver/ToolChains.cpp
test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crt1.o [new file with mode: 0644]
test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crti.o [new file with mode: 0644]
test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crtn.o [new file with mode: 0644]
test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtbegin.o [new file with mode: 0644]
test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtend.o [new file with mode: 0644]
test/Driver/linux-ld.c

index 547e660ae09b596c87085e4b680050905566e2e9..9bc9ae4f6a523ff670d12360562075ed35cd0d13 100644 (file)
@@ -1531,7 +1531,7 @@ bool Generic_GCC::GCCInstallationDetector::getBiarchSibling(Multilib &M) const {
   static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
   static const char *const AArch64Triples[] = {
       "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-linux-android",
-      "aarch64-redhat-linux"};
+      "aarch64-redhat-linux", "aarch64-suse-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/opensuse_42.2_aarch64_tree/usr/lib64/crt1.o b/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crt1.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crti.o b/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crti.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crtn.o b/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crtn.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtbegin.o b/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtbegin.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtend.o b/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtend.o
new file mode 100644 (file)
index 0000000..e69de29
index 8fa71a507bf9d19b2b8ee8ee72a479319cccffc0..5d1001beb02c758c40c2f18e2e347a20be0186ae 100644 (file)
 // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64"
 // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64"
 //
+// Check openSuse Leap 42.2 on AArch64
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN:     --target=arm64-unknown-linux-gnu \
+// RUN:     --gcc-toolchain="" \
+// RUN:     --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \
+// RUN:   | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN:     --target=aarch64-unknown-linux-gnu \
+// RUN:     --gcc-toolchain="" \
+// RUN:     --sysroot=%S/Inputs/opensuse_42.2_aarch64_tree \
+// RUN:   | FileCheck --check-prefix=CHECK-OPENSUSE-42-2-AARCH64 %s
+// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|\\\\}}crt1.o"
+// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|\\\\}}crti.o"
+// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8{{/|\\\\}}crtbegin.o"
+// CHECK-OPENSUSE-42-2-AARCH64: "-L[[SYSROOT]]/usr/lib64/gcc/aarch64-suse-linux/4.8"
+// CHECK-OPENSUSE-42-2-AARCH64: "-L[[SYSROOT]]/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64"
+// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8{{/|\\\\}}crtend.o"
+// CHECK-OPENSUSE-42-2-AARCH64: "{{.*}}/usr/lib64/gcc/aarch64-suse-linux/4.8/../../../../lib64{{/|\\\\}}crtn.o"
+//
 // Check dynamic-linker for different archs
 // RUN: %clang %s -### -o %t.o 2>&1 \
 // RUN:     --target=arm-linux-gnueabi \