aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2018-11-02 01:58:07 +0000
committerTom Stellard <tstellar@redhat.com>2018-11-02 01:58:07 +0000
commit74c32a11796e1cd6d7ad4670c8e1faae63f0ebe8 (patch)
tree2b5809220c62ef4784cc7de9299924c0f7a5eb38
parent32d269695a74814c638abdc738ec8b15beefc5a9 (diff)
downloadllvm-74c32a11796e1cd6d7ad4670c8e1faae63f0ebe8.zip
llvm-74c32a11796e1cd6d7ad4670c8e1faae63f0ebe8.tar.gz
llvm-74c32a11796e1cd6d7ad4670c8e1faae63f0ebe8.tar.bz2
Merging r341312:
------------------------------------------------------------------------ r341312 | psmith | 2018-09-03 05:36:32 -0700 (Mon, 03 Sep 2018) | 13 lines [Aarch64] Fix linker emulation for Aarch64 big endian This patch fixes target linker emulation for aarch64 big endian. aarch64_be_linux is not recognized by gnu ld. The equivalent emulation mode supported by gnu ld is aarch64linuxb. Patch by: Bharathi Seshadri Reviewed by: Peter Smith Differential Revision: https://reviews.llvm.org/D42930 ------------------------------------------------------------------------ llvm-svn: 345920
-rw-r--r--clang/lib/Driver/ToolChains/Gnu.cpp2
-rw-r--r--clang/test/Driver/linux-ld.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index 3755673..66fa214 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -237,7 +237,7 @@ static const char *getLDMOption(const llvm::Triple &T, const ArgList &Args) {
case llvm::Triple::aarch64:
return "aarch64linux";
case llvm::Triple::aarch64_be:
- return "aarch64_be_linux";
+ return "aarch64linuxb";
case llvm::Triple::arm:
case llvm::Triple::thumb:
return "armelf_linux_eabi";
diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c
index 7870139..d4823a8 100644
--- a/clang/test/Driver/linux-ld.c
+++ b/clang/test/Driver/linux-ld.c
@@ -1648,6 +1648,14 @@
// CHECK-ARMV7EB: "--be8"
// CHECK-ARMV7EB: "-m" "armelfb_linux_eabi"
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=aarch64_be-unknown-linux \
+// RUN: --gcc-toolchain="" \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-AARCH64BE %s
+// CHECK-AARCH64BE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-AARCH64BE: "-m" "aarch64linuxb"
+
// Check dynamic-linker for musl-libc
// RUN: %clang %s -### -o %t.o 2>&1 \
// RUN: --target=i386-pc-linux-musl \