r212719 - [mips][mips64r6] Add support for mips-img-linux-gnu GCC toolchains
Daniel Sanders
daniel.sanders at imgtec.com
Thu Jul 10 07:40:58 PDT 2014
Author: dsanders
Date: Thu Jul 10 09:40:57 2014
New Revision: 212719
URL: http://llvm.org/viewvc/llvm-project?rev=212719&view=rev
Log:
[mips][mips64r6] Add support for mips-img-linux-gnu GCC toolchains
Summary:
* Support the multilib layout used by the mips-img-linux-gnu
* Recognize mips{,64}{,el}-img-linux-gnu as being aliases of mips-img-linux-gnu
* Use the correct dynamic linker for mips-img-linux-gnu
* Make mips32r6/mips64r6 the default CPU for mips-img-linux-gnu
Subscribers: mpf
Differential Revision: http://reviews.llvm.org/D4436
Added:
cfe/trunk/test/Driver/Inputs/mips_img_tree/
cfe/trunk/test/Driver/Inputs/mips_img_tree/bin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/bin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtbegin.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtend.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtbegin.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtend.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/el/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/64/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/64/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/64/el/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/el/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtbegin.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtend.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtbegin.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtend.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtbegin.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtend.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtbegin.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtend.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/bin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/bin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/include/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/include/c++/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/include/c++/4.9.0/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/include/c++/4.9.0/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/el/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/64/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/64/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/64/el/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/el/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/bin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/bin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crt1.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crti.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crtn.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/sbin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/sbin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/bin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/bin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crt1.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crti.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crtn.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/sbin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/sbin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/bin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/bin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crt1.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crti.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crtn.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/sbin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/sbin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/bin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/bin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crt1.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crti.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crtn.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/sbin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/sbin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/bin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/bin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crt1.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crti.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crtn.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/sbin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/sbin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/bin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/bin/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/include/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/include/.keep
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crt1.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crti.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crtn.o
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/sbin/
cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/sbin/.keep
cfe/trunk/test/Driver/mips-img.cpp
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Driver/Tools.h
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=212719&r1=212718&r2=212719&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Jul 10 09:40:57 2014
@@ -1353,18 +1353,22 @@ bool Generic_GCC::GCCInstallationDetecto
static const char *const MIPSLibDirs[] = { "/lib" };
static const char *const MIPSTriples[] = { "mips-linux-gnu",
- "mips-mti-linux-gnu" };
+ "mips-mti-linux-gnu",
+ "mips-img-linux-gnu" };
static const char *const MIPSELLibDirs[] = { "/lib" };
static const char *const MIPSELTriples[] = { "mipsel-linux-gnu",
- "mipsel-linux-android" };
+ "mipsel-linux-android",
+ "mips-img-linux-gnu" };
static const char *const MIPS64LibDirs[] = { "/lib64", "/lib" };
static const char *const MIPS64Triples[] = { "mips64-linux-gnu",
"mips-mti-linux-gnu",
+ "mips-img-linux-gnu",
"mips64-linux-gnuabi64" };
static const char *const MIPS64ELLibDirs[] = { "/lib64", "/lib" };
static const char *const MIPS64ELTriples[] = { "mips64el-linux-gnu",
"mips-mti-linux-gnu",
+ "mips-img-linux-gnu",
"mips64el-linux-android",
"mips64el-linux-gnuabi64" };
@@ -1869,6 +1873,33 @@ static bool findMIPSMultilibs(const llvm
.FilterOut(NonExistent);
}
+ MultilibSet ImgMultilibs;
+ {
+ Multilib Mips64r6 = Multilib()
+ .gccSuffix("/mips64r6")
+ .osSuffix("/mips64r6")
+ .includeSuffix("/mips64r6")
+ .flag("+m64").flag("-m32");
+
+ Multilib LittleEndian = Multilib()
+ .gccSuffix("/el")
+ .osSuffix("/el")
+ .includeSuffix("/el")
+ .flag("+EL").flag("-EB");
+
+ Multilib MAbi64 = Multilib()
+ .gccSuffix("/64")
+ .osSuffix("/64")
+ .includeSuffix("/64")
+ .flag("+mabi=64").flag("-mabi=n32").flag("-m32");
+
+ ImgMultilibs = MultilibSet()
+ .Maybe(Mips64r6)
+ .Maybe(MAbi64)
+ .Maybe(LittleEndian)
+ .FilterOut(NonExistent);
+ }
+
llvm::Triple::ArchType TargetArch = TargetTriple.getArch();
Multilib::flags_list Flags;
@@ -1901,6 +1932,17 @@ static bool findMIPSMultilibs(const llvm
return true;
}
return false;
+ }
+
+ if (TargetTriple.getVendor() == llvm::Triple::ImaginationTechnologies &&
+ TargetTriple.getOS() == llvm::Triple::Linux &&
+ TargetTriple.getEnvironment() == llvm::Triple::GNU) {
+ // Select mips-img-linux-gnu toolchain.
+ if (ImgMultilibs.select(Flags, Result.SelectedMultilib)) {
+ Result.Multilibs = ImgMultilibs;
+ return true;
+ }
+ return false;
}
// Sort candidates. Toolchain that best meets the directories goes first.
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=212719&r1=212718&r2=212719&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Jul 10 09:40:57 2014
@@ -916,6 +916,14 @@ static void getMipsCPUAndABI(const ArgLi
const char *DefMips32CPU = "mips32r2";
const char *DefMips64CPU = "mips64r2";
+ // MIPS32r6 is the default for mips(el)?-img-linux-gnu and MIPS64r6 is the
+ // default for mips64(el)?-img-linux-gnu.
+ if (Triple.getVendor() == llvm::Triple::ImaginationTechnologies &&
+ Triple.getEnvironment() == llvm::Triple::GNU) {
+ DefMips32CPU = "mips32r6";
+ DefMips64CPU = "mips64r6";
+ }
+
if (Arg *A = Args.getLastArg(options::OPT_march_EQ,
options::OPT_mcpu_EQ))
CPUName = A->getValue();
@@ -5186,7 +5194,7 @@ bool mips::hasMipsAbiArg(const ArgList &
return A && (A->getValue() == StringRef(Value));
}
-bool mips::isNaN2008(const ArgList &Args) {
+bool mips::isNaN2008(const ArgList &Args, const llvm::Triple &Triple) {
if (Arg *NaNArg = Args.getLastArg(options::OPT_mnan_EQ))
return llvm::StringSwitch<bool>(NaNArg->getValue())
.Case("2008", true)
@@ -5194,10 +5202,9 @@ bool mips::isNaN2008(const ArgList &Args
.Default(false);
// NaN2008 is the default for MIPS32r6/MIPS64r6.
- if (Arg *CPUArg = Args.getLastArg(options::OPT_mcpu_EQ))
- return llvm::StringSwitch<bool>(CPUArg->getValue())
- .Cases("mips32r6", "mips64r6", true)
- .Default(false);
+ return llvm::StringSwitch<bool>(getCPUName(Args, Triple))
+ .Cases("mips32r6", "mips64r6", true)
+ .Default(false);
return false;
}
@@ -7022,16 +7029,16 @@ static StringRef getLinuxDynamicLinker(c
return "/lib/ld-linux.so.3"; /* TODO: check which dynamic linker name. */
} else if (ToolChain.getArch() == llvm::Triple::mips ||
ToolChain.getArch() == llvm::Triple::mipsel) {
- if (mips::isNaN2008(Args))
+ if (mips::isNaN2008(Args, ToolChain.getTriple()))
return "/lib/ld-linux-mipsn8.so.1";
return "/lib/ld.so.1";
} else if (ToolChain.getArch() == llvm::Triple::mips64 ||
ToolChain.getArch() == llvm::Triple::mips64el) {
if (mips::hasMipsAbiArg(Args, "n32"))
- return mips::isNaN2008(Args) ? "/lib32/ld-linux-mipsn8.so.1"
- : "/lib32/ld.so.1";
- return mips::isNaN2008(Args) ? "/lib64/ld-linux-mipsn8.so.1"
- : "/lib64/ld.so.1";
+ return mips::isNaN2008(Args, ToolChain.getTriple())
+ ? "/lib32/ld-linux-mipsn8.so.1" : "/lib32/ld.so.1";
+ return mips::isNaN2008(Args, ToolChain.getTriple())
+ ? "/lib64/ld-linux-mipsn8.so.1" : "/lib64/ld.so.1";
} else if (ToolChain.getArch() == llvm::Triple::ppc)
return "/lib/ld.so.1";
else if (ToolChain.getArch() == llvm::Triple::ppc64 ||
Modified: cfe/trunk/lib/Driver/Tools.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.h?rev=212719&r1=212718&r2=212719&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.h (original)
+++ cfe/trunk/lib/Driver/Tools.h Thu Jul 10 09:40:57 2014
@@ -218,7 +218,7 @@ namespace arm {
namespace mips {
bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value);
- bool isNaN2008(const llvm::opt::ArgList &Args);
+ bool isNaN2008(const llvm::opt::ArgList &Args, const llvm::Triple &Triple);
}
namespace darwin {
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/bin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtbegin.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtbegin.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtend.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtend.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtbegin.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtbegin.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtend.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtend.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/el/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/el/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/64/el/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/64/el/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/el/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/el/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtbegin.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtbegin.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtend.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtend.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtbegin.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtbegin.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtend.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtend.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtbegin.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtbegin.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtend.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtend.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtbegin.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtbegin.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtend.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtend.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/bin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/include/c++/4.9.0/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/include/c%2B%2B/4.9.0/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/el/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/el/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/64/el/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/64/el/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/el/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/el/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/bin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crt1.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crt1.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crti.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crti.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crtn.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crtn.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/sbin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/sbin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/bin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crt1.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crt1.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crti.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crti.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crtn.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crtn.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/sbin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/sbin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/bin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crt1.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crt1.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crti.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crti.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crtn.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crtn.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/sbin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/sbin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/bin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crt1.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crt1.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crti.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crti.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crtn.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crtn.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/sbin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/sbin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/bin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crt1.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crt1.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crti.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crti.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crtn.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crtn.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/sbin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/sbin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/bin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/include/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/include/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crt1.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crt1.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crti.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crti.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crtn.o
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crtn.o?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/sbin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/mips_img_tree/sysroot/usr/sbin/.keep?rev=212719&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/mips-img.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/mips-img.cpp?rev=212719&view=auto
==============================================================================
--- cfe/trunk/test/Driver/mips-img.cpp (added)
+++ cfe/trunk/test/Driver/mips-img.cpp Thu Jul 10 09:40:57 2014
@@ -0,0 +1,163 @@
+// Check frontend and linker invocations on the IMG MIPS toolchain.
+//
+// = Big-endian, mips32r6
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-img-linux-gnu -mips32r6 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-32R6 %s
+// CHECK-BE-32R6: "-internal-isystem"
+// CHECK-BE-32R6: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-BE-32R6: "-internal-isystem"
+// CHECK-BE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu"
+// CHECK-BE-32R6: "-internal-isystem"
+// CHECK-BE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-BE-32R6: "-internal-externc-isystem"
+// CHECK-BE-32R6: "[[TC]]/include"
+// CHECK-BE-32R6: "-internal-externc-isystem"
+// CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-BE-32R6: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-32R6: "--sysroot=[[TC]]/../../../../sysroot"
+// CHECK-BE-32R6: "-dynamic-linker" "/lib/ld-linux-mipsn8.so.1"
+// CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-32R6: "[[TC]]{{/|\\\\}}crtbegin.o"
+// CHECK-BE-32R6: "-L[[TC]]"
+// CHECK-BE-32R6: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/../lib"
+// CHECK-BE-32R6: "-L[[TC]]/../../../../sysroot/usr/lib/../lib"
+// CHECK-BE-32R6: "[[TC]]{{/|\\\\}}crtend.o"
+// CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, mips32r6
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-img-linux-gnu -mips32r6 -EL \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LE-32R6 %s
+// CHECK-LE-32R6: "-internal-isystem"
+// CHECK-LE-32R6: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-LE-32R6: "-internal-isystem"
+// CHECK-LE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/el"
+// CHECK-LE-32R6: "-internal-isystem"
+// CHECK-LE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-LE-32R6: "-internal-externc-isystem"
+// CHECK-LE-32R6: "[[TC]]/include"
+// CHECK-LE-32R6: "-internal-externc-isystem"
+// CHECK-LE-32R6: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-LE-32R6: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LE-32R6: "--sysroot=[[TC]]/../../../../sysroot/el"
+// CHECK-LE-32R6: "-dynamic-linker" "/lib/ld-linux-mipsn8.so.1"
+// CHECK-LE-32R6: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-LE-32R6: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-LE-32R6: "[[TC]]/el{{/|\\\\}}crtbegin.o"
+// CHECK-LE-32R6: "-L[[TC]]/el"
+// CHECK-LE-32R6: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/../lib/el"
+// CHECK-LE-32R6: "-L[[TC]]/../../../../sysroot/el/usr/lib/../lib"
+// CHECK-LE-32R6: "[[TC]]/el{{/|\\\\}}crtend.o"
+// CHECK-LE-32R6: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, mips64r6, N32
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-img-linux-gnu -mips64r6 -mabi=n32 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-64R6-N32 %s
+// CHECK-BE-64R6-N32: "-internal-isystem"
+// CHECK-BE-64R6-N32: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-BE-64R6-N32: "-internal-isystem"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6"
+// CHECK-BE-64R6-N32: "-internal-isystem"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-BE-64R6-N32: "-internal-externc-isystem"
+// CHECK-BE-64R6-N32: "[[TC]]/include"
+// CHECK-BE-64R6-N32: "-internal-externc-isystem"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-BE-64R6-N32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-64R6-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r6"
+// CHECK-BE-64R6-N32: "-dynamic-linker" "/lib32/ld-linux-mipsn8.so.1"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-64R6-N32: "[[TC]]/mips64r6{{/|\\\\}}crtbegin.o"
+// CHECK-BE-64R6-N32: "-L[[TC]]/mips64r6"
+// CHECK-BE-64R6-N32: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6"
+// CHECK-BE-64R6-N32: "-L[[TC]]/../../../../sysroot/mips64r6/usr/lib"
+// CHECK-BE-64R6-N32: "[[TC]]/mips64r6{{/|\\\\}}crtend.o"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/usr/lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, mips64r6, N32
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-img-linux-gnu -mips64r6 -EL -mabi=n32 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LE-64R6-N32 %s
+// CHECK-LE-64R6-N32: "-internal-isystem"
+// CHECK-LE-64R6-N32: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-LE-64R6-N32: "-internal-isystem"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6/el"
+// CHECK-LE-64R6-N32: "-internal-isystem"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-LE-64R6-N32: "-internal-externc-isystem"
+// CHECK-LE-64R6-N32: "[[TC]]/include"
+// CHECK-LE-64R6-N32: "-internal-externc-isystem"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-LE-64R6-N32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LE-64R6-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r6/el"
+// CHECK-LE-64R6-N32: "-dynamic-linker" "/lib32/ld-linux-mipsn8.so.1"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/el/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/el/usr/lib{{/|\\\\}}crti.o"
+// CHECK-LE-64R6-N32: "[[TC]]/mips64r6/el{{/|\\\\}}crtbegin.o"
+// CHECK-LE-64R6-N32: "-L[[TC]]/mips64r6/el"
+// CHECK-LE-64R6-N32: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6/el"
+// CHECK-LE-64R6-N32: "-L[[TC]]/../../../../sysroot/mips64r6/el/usr/lib"
+// CHECK-LE-64R6-N32: "[[TC]]/mips64r6/el{{/|\\\\}}crtend.o"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/el/usr/lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, mips64r6, N64
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-img-linux-gnu -mips64r6 -mabi=64 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-64R6-N64 %s
+// CHECK-BE-64R6-N64: "-internal-isystem"
+// CHECK-BE-64R6-N64: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-BE-64R6-N64: "-internal-isystem"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6/64"
+// CHECK-BE-64R6-N64: "-internal-isystem"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-BE-64R6-N64: "-internal-externc-isystem"
+// CHECK-BE-64R6-N64: "[[TC]]/include"
+// CHECK-BE-64R6-N64: "-internal-externc-isystem"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-BE-64R6-N64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-64R6-N64: "--sysroot=[[TC]]/../../../../sysroot/mips64r6/64"
+// CHECK-BE-64R6-N64: "-dynamic-linker" "/lib64/ld-linux-mipsn8.so.1"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-64R6-N64: "[[TC]]/mips64r6/64{{/|\\\\}}crtbegin.o"
+// CHECK-BE-64R6-N64: "-L[[TC]]/mips64r6/64"
+// CHECK-BE-64R6-N64: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6/64"
+// CHECK-BE-64R6-N64: "-L[[TC]]/../../../../sysroot/mips64r6/64/usr/lib"
+// CHECK-BE-64R6-N64: "[[TC]]/mips64r6/64{{/|\\\\}}crtend.o"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/usr/lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, mips64r6, N64
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-img-linux-gnu -mips64r6 -EL -mabi=64 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LE-64R6-N64 %s
+// CHECK-LE-64R6-N64: "-internal-isystem"
+// CHECK-LE-64R6-N64: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-LE-64R6-N64: "-internal-isystem"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6/64/el"
+// CHECK-LE-64R6-N64: "-internal-isystem"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-LE-64R6-N64: "-internal-externc-isystem"
+// CHECK-LE-64R6-N64: "[[TC]]/include"
+// CHECK-LE-64R6-N64: "-internal-externc-isystem"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-LE-64R6-N64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LE-64R6-N64: "--sysroot=[[TC]]/../../../../sysroot/mips64r6/64/el"
+// CHECK-LE-64R6-N64: "-dynamic-linker" "/lib64/ld-linux-mipsn8.so.1"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib{{/|\\\\}}crti.o"
+// CHECK-LE-64R6-N64: "[[TC]]/mips64r6/64/el{{/|\\\\}}crtbegin.o"
+// CHECK-LE-64R6-N64: "-L[[TC]]/mips64r6/64/el"
+// CHECK-LE-64R6-N64: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6/64/el"
+// CHECK-LE-64R6-N64: "-L[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib"
+// CHECK-LE-64R6-N64: "[[TC]]/mips64r6/64/el{{/|\\\\}}crtend.o"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib{{/|\\\\}}crtn.o"
More information about the cfe-commits
mailing list