Belatedly add the clang patch corresponding to r277423.
This commit is contained in:
parent
dbdb12056d
commit
b73700f547
33
contrib/llvm/patches/patch-29-clang-add-mips-triples.diff
Normal file
33
contrib/llvm/patches/patch-29-clang-add-mips-triples.diff
Normal file
@ -0,0 +1,33 @@
|
||||
Allow clang to be built for mips/mips64 backend types by adding our mips
|
||||
triple ids
|
||||
|
||||
This only allows testing and does not change the defaults for mips/mips64.
|
||||
They still build/use gcc by default.
|
||||
|
||||
Differential Revision: https://reviews.freebsd.org/D1190
|
||||
Reviewed by: dim
|
||||
|
||||
Introduced here: http://svnweb.freebsd.org/changeset/base/277423
|
||||
|
||||
Index: tools/clang/lib/Driver/Tools.cpp
|
||||
===================================================================
|
||||
--- tools/clang/lib/Driver/Tools.cpp
|
||||
+++ tools/clang/lib/Driver/Tools.cpp
|
||||
@@ -6592,6 +6592,17 @@ void freebsd::Link::ConstructJob(Compilation &C, c
|
||||
CmdArgs.push_back("elf32ppc_fbsd");
|
||||
}
|
||||
|
||||
+ if (Arg *A = Args.getLastArg(options::OPT_G)) {
|
||||
+ if (ToolChain.getArch() == llvm::Triple::mips ||
|
||||
+ ToolChain.getArch() == llvm::Triple::mipsel ||
|
||||
+ ToolChain.getArch() == llvm::Triple::mips64 ||
|
||||
+ ToolChain.getArch() == llvm::Triple::mips64el) {
|
||||
+ StringRef v = A->getValue();
|
||||
+ CmdArgs.push_back(Args.MakeArgString("-G" + v));
|
||||
+ A->claim();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (Output.isFilename()) {
|
||||
CmdArgs.push_back("-o");
|
||||
CmdArgs.push_back(Output.getFilename());
|
Loading…
Reference in New Issue
Block a user