freebsd-dev/contrib/llvm/patches/patch-r262262-clang-r199012-sparc.diff
Dimitry Andric a1f8ad145e Add separate patch files for all the customizations we have currently
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
2014-03-18 22:07:45 +00:00

42 lines
1.6 KiB
Diff

Pull in r199012 from upstream clang trunk (by Jakob Stoklund Olesen):
Select the UltraSPARC instruction set when invoking the assembler.
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
@@ -6228,8 +6228,10 @@ void gnutools::Assemble::ConstructJob(Compilation
CmdArgs.push_back("-many");
} else if (getToolChain().getArch() == llvm::Triple::sparc) {
CmdArgs.push_back("-32");
+ CmdArgs.push_back("-Av8plusa");
} else if (getToolChain().getArch() == llvm::Triple::sparcv9) {
CmdArgs.push_back("-64");
+ CmdArgs.push_back("-Av9a");
} else if (getToolChain().getArch() == llvm::Triple::arm) {
StringRef MArch = getToolChain().getArchName();
if (MArch == "armv7" || MArch == "armv7a" || MArch == "armv7-a")
Index: tools/clang/test/Driver/linux-as.c
===================================================================
--- tools/clang/test/Driver/linux-as.c
+++ tools/clang/test/Driver/linux-as.c
@@ -65,6 +65,7 @@
// RUN: | FileCheck -check-prefix=CHECK-SPARCV9 %s
// CHECK-SPARCV9: as
// CHECK-SPARCV9: -64
+// CHECK-SPARCV9: -Av9a
// CHECK-SPARCV9: -o
//
// RUN: %clang -target sparc-linux -mcpu=invalid-cpu -### \
@@ -72,6 +73,7 @@
// RUN: | FileCheck -check-prefix=CHECK-SPARCV8 %s
// CHECK-SPARCV8: as
// CHECK-SPARCV8: -32
+// CHECK-SPARCV8: -Av8plusa
// CHECK-SPARCV8: -o
//
// RUN: %clang -target s390x-linux -### -no-integrated-as -c %s 2>&1 \