a426b286c8
patch for r263619, and unify all the URLs to point to svnweb.
45 lines
1.8 KiB
Diff
45 lines
1.8 KiB
Diff
Pull in r198912 from upstream clang trunk (by Jakob Stoklund Olesen):
|
|
|
|
Give the linker the right ELF type for SPARC targets.
|
|
|
|
Introduced here: http://svnweb.freebsd.org/changeset/base/262262
|
|
|
|
Index: tools/clang/lib/Driver/Tools.cpp
|
|
===================================================================
|
|
--- tools/clang/lib/Driver/Tools.cpp
|
|
+++ tools/clang/lib/Driver/Tools.cpp
|
|
@@ -6461,6 +6461,10 @@ void gnutools::Link::ConstructJob(Compilation &C,
|
|
CmdArgs.push_back("elf32ppclinux");
|
|
else if (ToolChain.getArch() == llvm::Triple::ppc64)
|
|
CmdArgs.push_back("elf64ppc");
|
|
+ else if (ToolChain.getArch() == llvm::Triple::sparc)
|
|
+ CmdArgs.push_back("elf32_sparc");
|
|
+ else if (ToolChain.getArch() == llvm::Triple::sparcv9)
|
|
+ CmdArgs.push_back("elf64_sparc");
|
|
else if (ToolChain.getArch() == llvm::Triple::mips)
|
|
CmdArgs.push_back("elf32btsmip");
|
|
else if (ToolChain.getArch() == llvm::Triple::mipsel)
|
|
Index: tools/clang/test/Driver/linux-ld.c
|
|
===================================================================
|
|
--- tools/clang/test/Driver/linux-ld.c
|
|
+++ tools/clang/test/Driver/linux-ld.c
|
|
@@ -384,6 +384,18 @@
|
|
// CHECK-MIPS64EL-N32: "-dynamic-linker" "{{.*}}/lib32/ld.so.1"
|
|
// CHECK-MIPS64EL-N32-NOT: "--hash-style={{gnu|both}}"
|
|
//
|
|
+// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
+// RUN: --target=sparc-linux-gnu \
|
|
+// RUN: | FileCheck --check-prefix=CHECK-SPARCV8 %s
|
|
+// CHECK-SPARCV8: "{{.*}}ld{{(.exe)?}}"
|
|
+// CHECK-SPARCV8: "-m" "elf32_sparc"
|
|
+//
|
|
+// RUN: %clang %s -### -o %t.o 2>&1 \
|
|
+// RUN: --target=sparcv9-linux-gnu \
|
|
+// RUN: | FileCheck --check-prefix=CHECK-SPARCV9 %s
|
|
+// CHECK-SPARCV9: "{{.*}}ld{{(.exe)?}}"
|
|
+// CHECK-SPARCV9: "-m" "elf64_sparc"
|
|
+//
|
|
// Thoroughly exercise the Debian multiarch environment.
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
// RUN: --target=i686-linux-gnu \
|