a1f8ad145e
applied to our copy of llvm/clang. These can be applied in alphabetical order to a pristine llvm/clang 3.4 release source tree, to result in the same version used in FreeBSD. This is intended to clearly document all the changes until now, which mostly consist of cherry pickings from the respective upstream trunks, plus a number of hand-written FreeBSD-specific ones. Hopefully those can eventually be cleaned up and sent upstream too. MFC after: 1 week X-MFC-With: r263313
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://svn.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 \
|