r291598 - [Driver] Add openSuse AArch64 Triple

Kostya Kortchinsky via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 10 13:13:08 PST 2017


Author: cryptoad
Date: Tue Jan 10 15:13:08 2017
New Revision: 291598

URL: http://llvm.org/viewvc/llvm-project?rev=291598&view=rev
Log:
[Driver] Add openSuse AArch64 Triple

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

Added:
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crt1.o
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crti.o
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crtn.o
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtbegin.o
    cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtend.o
Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp
    cfe/trunk/test/Driver/linux-ld.c

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Tue Jan 10 15:13:08 2017
@@ -1531,7 +1531,7 @@ bool Generic_GCC::GCCInstallationDetecto
   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"};

Added: cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crt1.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crt1.o?rev=291598&view=auto
==============================================================================
    (empty)

Added: cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crti.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crti.o?rev=291598&view=auto
==============================================================================
    (empty)

Added: cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crtn.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/crtn.o?rev=291598&view=auto
==============================================================================
    (empty)

Added: cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtbegin.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtbegin.o?rev=291598&view=auto
==============================================================================
    (empty)

Added: cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtend.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/opensuse_42.2_aarch64_tree/usr/lib64/gcc/aarch64-suse-linux/4.8/crtend.o?rev=291598&view=auto
==============================================================================
    (empty)

Modified: cfe/trunk/test/Driver/linux-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/linux-ld.c?rev=291598&r1=291597&r2=291598&view=diff
==============================================================================
--- cfe/trunk/test/Driver/linux-ld.c (original)
+++ cfe/trunk/test/Driver/linux-ld.c Tue Jan 10 15:13:08 2017
@@ -618,6 +618,26 @@
 // 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 \




More information about the cfe-commits mailing list