diff options
author | Tom Stellard <tstellar@redhat.com> | 2018-11-02 01:58:07 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2018-11-02 01:58:07 +0000 |
commit | 65f84326edb6105fb0263f0b023719b491f8cf1a (patch) | |
tree | 91c208a0024436208c06663f64152233803d647b | |
parent | a007b984aefa2192b58a534ce3087f43cd21fb27 (diff) |
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
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_70@345920 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Driver/ToolChains/Gnu.cpp | 2 | ||||
-rw-r--r-- | test/Driver/linux-ld.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp index 3755673250..66fa21402d 100644 --- a/lib/Driver/ToolChains/Gnu.cpp +++ b/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/test/Driver/linux-ld.c b/test/Driver/linux-ld.c index 787013931a..d4823a8d9f 100644 --- a/test/Driver/linux-ld.c +++ b/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 \ |