diff options
author | John Baldwin <jhb@FreeBSD.org> | 2018-06-26 19:48:05 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2018-06-26 19:48:05 +0000 |
commit | 2a2945a3c5f6f40c3edc5c24e50ce45eed3544f6 (patch) | |
tree | f50993824bece46953af987ecf25eb5aa36a5b0d /clang/lib/Driver/ToolChains/Arch/Mips.cpp | |
parent | fb9c440ba59af6206bca6b669de1fa4cb11a1815 (diff) | |
download | bcm5719-llvm-2a2945a3c5f6f40c3edc5c24e50ce45eed3544f6.tar.gz bcm5719-llvm-2a2945a3c5f6f40c3edc5c24e50ce45eed3544f6.zip |
[mips] Use more conservative default CPUs for MIPS on FreeBSD.
FreeBSD defaults to mips3 for all MIPS ABIs with GCC as that is the
minimum MIPS architecture FreeBSD supports. Use mips3 for MIPS64 and
mips2 for MIPS32 to match.
Reviewed By: atanasyan
Differential Revision: https://reviews.llvm.org/D48499
llvm-svn: 335653
Diffstat (limited to 'clang/lib/Driver/ToolChains/Arch/Mips.cpp')
-rw-r--r-- | clang/lib/Driver/ToolChains/Arch/Mips.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains/Arch/Mips.cpp b/clang/lib/Driver/ToolChains/Arch/Mips.cpp index 85aef3295bf..5aeb9288e7a 100644 --- a/clang/lib/Driver/ToolChains/Arch/Mips.cpp +++ b/clang/lib/Driver/ToolChains/Arch/Mips.cpp @@ -45,6 +45,13 @@ void mips::getMipsCPUAndABI(const ArgList &Args, const llvm::Triple &Triple, if (Triple.getOS() == llvm::Triple::OpenBSD) DefMips64CPU = "mips3"; + // MIPS2 is the default for mips(el)?-unknown-freebsd. + // MIPS3 is the default for mips64(el)?-unknown-freebsd. + if (Triple.getOS() == llvm::Triple::FreeBSD) { + DefMips32CPU = "mips2"; + DefMips64CPU = "mips3"; + } + if (Arg *A = Args.getLastArg(clang::driver::options::OPT_march_EQ, options::OPT_mcpu_EQ)) CPUName = A->getValue(); |