[llvm-branch-commits] [cfe-branch] r345920 - Merging r341312:
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Nov 1 18:58:08 PDT 2018
Author: tstellar
Date: Thu Nov 1 18:58:07 2018
New Revision: 345920
URL: http://llvm.org/viewvc/llvm-project?rev=345920&view=rev
Log:
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
------------------------------------------------------------------------
Modified:
cfe/branches/release_70/lib/Driver/ToolChains/Gnu.cpp
cfe/branches/release_70/test/Driver/linux-ld.c
Modified: cfe/branches/release_70/lib/Driver/ToolChains/Gnu.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_70/lib/Driver/ToolChains/Gnu.cpp?rev=345920&r1=345919&r2=345920&view=diff
==============================================================================
--- cfe/branches/release_70/lib/Driver/ToolChains/Gnu.cpp (original)
+++ cfe/branches/release_70/lib/Driver/ToolChains/Gnu.cpp Thu Nov 1 18:58:07 2018
@@ -237,7 +237,7 @@ static const char *getLDMOption(const ll
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";
Modified: cfe/branches/release_70/test/Driver/linux-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_70/test/Driver/linux-ld.c?rev=345920&r1=345919&r2=345920&view=diff
==============================================================================
--- cfe/branches/release_70/test/Driver/linux-ld.c (original)
+++ cfe/branches/release_70/test/Driver/linux-ld.c Thu Nov 1 18:58:07 2018
@@ -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 \
More information about the llvm-branch-commits
mailing list