r204626 - Update the parameters passed to the assembler and linker for
Will Schmidt
will_schmidt at vnet.ibm.com
Mon Mar 24 10:10:38 PDT 2014
Author: willschm
Date: Mon Mar 24 12:10:37 2014
New Revision: 204626
URL: http://llvm.org/viewvc/llvm-project?rev=204626&view=rev
Log:
Update the parameters passed to the assembler and linker for
the PPC64LE target. Specifically:
(assembler) adds/uses -mppc64 -mlittle-endian
(linker) adds/uses elf64lppc
Testcase included.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Driver/ppc-features.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=204626&r1=204625&r2=204626&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Mar 24 12:10:37 2014
@@ -6522,8 +6522,9 @@ void gnutools::Assemble::ConstructJob(Co
CmdArgs.push_back("-many");
} else if (getToolChain().getArch() == llvm::Triple::ppc64le) {
CmdArgs.push_back("-a64");
- CmdArgs.push_back("-mppc64le");
+ CmdArgs.push_back("-mppc64");
CmdArgs.push_back("-many");
+ CmdArgs.push_back("-mlittle-endian");
} else if (getToolChain().getArch() == llvm::Triple::sparc) {
CmdArgs.push_back("-32");
CmdArgs.push_back("-Av8plusa");
@@ -6778,6 +6779,8 @@ void gnutools::Link::ConstructJob(Compil
CmdArgs.push_back("elf32ppclinux");
else if (ToolChain.getArch() == llvm::Triple::ppc64)
CmdArgs.push_back("elf64ppc");
+ else if (ToolChain.getArch() == llvm::Triple::ppc64le)
+ CmdArgs.push_back("elf64lppc");
else if (ToolChain.getArch() == llvm::Triple::sparc)
CmdArgs.push_back("elf32_sparc");
else if (ToolChain.getArch() == llvm::Triple::sparcv9)
Modified: cfe/trunk/test/Driver/ppc-features.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/ppc-features.cpp?rev=204626&r1=204625&r2=204626&view=diff
==============================================================================
--- cfe/trunk/test/Driver/ppc-features.cpp (original)
+++ cfe/trunk/test/Driver/ppc-features.cpp Mon Mar 24 12:10:37 2014
@@ -98,3 +98,21 @@
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -mcrbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
// CHECK-CRBITS: "-target-feature" "+crbits"
+// Assembler features
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_BE_AS_ARGS %s
+// CHECK_BE_AS_ARGS: "-mppc64"
+// CHECK_BE_AS_ARGS: "-many"
+
+// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_LE_AS_ARGS %s
+// CHECK_LE_AS_ARGS: "-mppc64"
+// CHECK_LE_AS_ARGS: "-many"
+// CHECK_LE_AS_ARGS: "-mlittle-endian"
+
+// linker features
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_BE_LD_ARGS %s
+// CHECK_BE_LD_ARGS: "elf64ppc"
+
+// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_LE_LD_ARGS %s
+// CHECK_LE_LD_ARGS: "elf64lppc"
+
+
More information about the cfe-commits
mailing list