<div dir="ltr">Sorry about the 1.5-year delayed question, but shouldn't you use getGCCToolchainDir() instead of GCC_INSTALL_PREFIX so that --gcc-toolchain works on hexagon?</div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Dec 6, 2012 at 4:43 AM, Matthew Curtis <span dir="ltr"><<a href="mailto:mcurtis@codeaurora.org" target="_blank">mcurtis@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: mcurtis<br>
Date: Thu Dec 6 06:43:18 2012<br>
New Revision: 169495<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=169495&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=169495&view=rev</a><br>
Log:<br>
Hexagon TC: Update toolchain to add appropriate include<br>
paths<br>
<br>
- Inherit from Linux rather than ToolChain<br>
- Override AddClangSystemIncludeArgs and AddClangCXXStdlibIncludeArgs<br>
to properly set include paths.<br>
<br>
Added:<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-as (with props)<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-gcc (with props)<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/c++/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/c++/4.4.0/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/c++/4.4.0/ios<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/stdio.h<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include-fixed/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include-fixed/limits.h<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include/stddef.h<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/qc/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/qc/bin/<br>
cfe/trunk/test/Driver/Inputs/hexagon_tree/qc/bin/placeholder<br>
cfe/trunk/test/Driver/hexagon-toolchain.c<br>
Modified:<br>
cfe/trunk/lib/Driver/Driver.cpp<br>
cfe/trunk/lib/Driver/ToolChains.cpp<br>
cfe/trunk/lib/Driver/ToolChains.h<br>
cfe/trunk/lib/Driver/Tools.cpp<br>
<br>
Modified: cfe/trunk/lib/Driver/Driver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=169495&r1=169494&r2=169495&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=169495&r1=169494&r2=169495&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/Driver.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Dec 6 06:43:18 2012<br>
@@ -1701,7 +1701,7 @@<br>
break;<br>
case llvm::Triple::Linux:<br>
if (Target.getArch() == llvm::Triple::hexagon)<br>
- TC = new toolchains::Hexagon_TC(*this, Target);<br>
+ TC = new toolchains::Hexagon_TC(*this, Target, Args);<br>
else<br>
TC = new toolchains::Linux(*this, Target, Args);<br>
break;<br>
<br>
Modified: cfe/trunk/lib/Driver/ToolChains.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=169495&r1=169494&r2=169495&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=169495&r1=169494&r2=169495&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)<br>
+++ cfe/trunk/lib/Driver/ToolChains.cpp Thu Dec 6 06:43:18 2012<br>
@@ -1402,11 +1402,46 @@<br>
<br>
/// Hexagon Toolchain<br>
<br>
-Hexagon_TC::Hexagon_TC(const Driver &D, const llvm::Triple& Triple)<br>
- : ToolChain(D, Triple) {<br>
- getProgramPaths().push_back(getDriver().getInstalledDir());<br>
- if (getDriver().getInstalledDir() != getDriver().Dir.c_str())<br>
- getProgramPaths().push_back(getDriver().Dir);<br>
+std::string Hexagon_TC::GetGnuDir(const std::string &InstalledDir) {<br>
+<br>
+ // Locate the rest of the toolchain ...<br>
+ if (strlen(GCC_INSTALL_PREFIX))<br>
+ return std::string(GCC_INSTALL_PREFIX);<br>
+<br>
+ std::string InstallRelDir = InstalledDir + "/../../gnu";<br>
+ if (llvm::sys::fs::exists(InstallRelDir))<br>
+ return InstallRelDir;<br>
+<br>
+ std::string PrefixRelDir = std::string(LLVM_PREFIX) + "/../gnu";<br>
+ if (llvm::sys::fs::exists(PrefixRelDir))<br>
+ return PrefixRelDir;<br>
+<br>
+ return InstallRelDir;<br>
+}<br>
+<br>
+Hexagon_TC::Hexagon_TC(const Driver &D, const llvm::Triple &Triple,<br>
+ const ArgList &Args)<br>
+ : Linux(D, Triple, Args) {<br>
+ const std::string InstalledDir(getDriver().getInstalledDir());<br>
+ const std::string GnuDir = Hexagon_TC::GetGnuDir(InstalledDir);<br>
+<br>
+ // Note: Generic_GCC::Generic_GCC adds InstalledDir and getDriver().Dir to<br>
+ // program paths<br>
+ const std::string BinDir(GnuDir + "/bin");<br>
+ if (llvm::sys::fs::exists(BinDir))<br>
+ getProgramPaths().push_back(BinDir);<br>
+<br>
+ // Determine version of GCC libraries and headers to use.<br>
+ const std::string HexagonDir(GnuDir + "/lib/gcc/hexagon");<br>
+ llvm::error_code ec;<br>
+ GCCVersion MaxVersion= GCCVersion::Parse("0.0.0");<br>
+ for (llvm::sys::fs::directory_iterator di(HexagonDir, ec), de;<br>
+ !ec && di != de; di = di.increment(ec)) {<br>
+ GCCVersion cv = GCCVersion::Parse(llvm::sys::path::filename(di->path()));<br>
+ if (MaxVersion < cv)<br>
+ MaxVersion = cv;<br>
+ }<br>
+ GCCLibAndIncVersion = MaxVersion;<br>
}<br>
<br>
Hexagon_TC::~Hexagon_TC() {<br>
@@ -1453,13 +1488,39 @@<br>
return *T;<br>
}<br>
<br>
-bool Hexagon_TC::isPICDefault() const {<br>
- return false;<br>
+void Hexagon_TC::AddClangSystemIncludeArgs(const ArgList &DriverArgs,<br>
+ ArgStringList &CC1Args) const {<br>
+ const Driver &D = getDriver();<br>
+<br>
+ if (DriverArgs.hasArg(options::OPT_nostdinc) ||<br>
+ DriverArgs.hasArg(options::OPT_nostdlibinc))<br>
+ return;<br>
+<br>
+ llvm::sys::Path InstallDir(D.InstalledDir);<br>
+ std::string Ver(GetGCCLibAndIncVersion());<br>
+ std::string GnuDir = Hexagon_TC::GetGnuDir(D.InstalledDir);<br>
+ std::string HexagonDir(GnuDir + "/lib/gcc/hexagon/" + Ver);<br>
+ addExternCSystemInclude(DriverArgs, CC1Args, HexagonDir + "/include");<br>
+ addExternCSystemInclude(DriverArgs, CC1Args, HexagonDir + "/include-fixed");<br>
+ addExternCSystemInclude(DriverArgs, CC1Args, GnuDir + "/hexagon/include");<br>
}<br>
<br>
-bool Hexagon_TC::isPICDefaultForced() const {<br>
- return false;<br>
+void Hexagon_TC::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,<br>
+ ArgStringList &CC1Args) const {<br>
+<br>
+ if (DriverArgs.hasArg(options::OPT_nostdlibinc) ||<br>
+ DriverArgs.hasArg(options::OPT_nostdincxx))<br>
+ return;<br>
+<br>
+ const Driver &D = getDriver();<br>
+ std::string Ver(GetGCCLibAndIncVersion());<br>
+ llvm::sys::Path IncludeDir(Hexagon_TC::GetGnuDir(D.InstalledDir));<br>
+<br>
+ IncludeDir.appendComponent("hexagon/include/c++/");<br>
+ IncludeDir.appendComponent(Ver);<br>
+ addSystemInclude(DriverArgs, CC1Args, IncludeDir.str());<br>
}<br>
+// End Hexagon<br>
<br>
/// TCEToolChain - A tool chain using the llvm bitcode tools to perform<br>
/// all subcommands. See <a href="http://tce.cs.tut.fi" target="_blank">http://tce.cs.tut.fi</a> for our peculiar target.<br>
<br>
Modified: cfe/trunk/lib/Driver/ToolChains.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=169495&r1=169494&r2=169495&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=169495&r1=169494&r2=169495&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/ToolChains.h (original)<br>
+++ cfe/trunk/lib/Driver/ToolChains.h Thu Dec 6 06:43:18 2012<br>
@@ -143,21 +143,6 @@<br>
/// @}<br>
};<br>
<br>
-class LLVM_LIBRARY_VISIBILITY Hexagon_TC : public ToolChain {<br>
-protected:<br>
- mutable llvm::DenseMap<unsigned, Tool*> Tools;<br>
-<br>
-public:<br>
- Hexagon_TC(const Driver &D, const llvm::Triple& Triple);<br>
- ~Hexagon_TC();<br>
-<br>
- virtual Tool &SelectTool(const Compilation &C, const JobAction &JA,<br>
- const ActionList &Inputs) const;<br>
-<br>
- virtual bool isPICDefault() const;<br>
- virtual bool isPICDefaultForced() const;<br>
-};<br>
-<br>
/// Darwin - The base Darwin tool chain.<br>
class LLVM_LIBRARY_VISIBILITY Darwin : public ToolChain {<br>
public:<br>
@@ -523,6 +508,29 @@<br>
ArgStringList &CC1Args);<br>
};<br>
<br>
+class LLVM_LIBRARY_VISIBILITY Hexagon_TC : public Linux {<br>
+protected:<br>
+ mutable llvm::DenseMap<unsigned, Tool*> Tools;<br>
+<br>
+ GCCVersion GCCLibAndIncVersion;<br>
+<br>
+public:<br>
+ Hexagon_TC(const Driver &D, const llvm::Triple &Triple,<br>
+ const ArgList &Args);<br>
+ ~Hexagon_TC();<br>
+<br>
+ virtual Tool &SelectTool(const Compilation &C, const JobAction &JA,<br>
+ const ActionList &Inputs) const;<br>
+<br>
+ virtual void AddClangSystemIncludeArgs(const ArgList &DriverArgs,<br>
+ ArgStringList &CC1Args) const;<br>
+ virtual void AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,<br>
+ ArgStringList &CC1Args) const;<br>
+<br>
+ StringRef GetGCCLibAndIncVersion() const { return GCCLibAndIncVersion.Text; }<br>
+<br>
+ static std::string GetGnuDir(const std::string &InstalledDir);<br>
+};<br>
<br>
/// TCEToolChain - A tool chain using the llvm bitcode tools to perform<br>
/// all subcommands. See <a href="http://tce.cs.tut.fi" target="_blank">http://tce.cs.tut.fi</a> for our peculiar target.<br>
<br>
Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=169495&r1=169494&r2=169495&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=169495&r1=169494&r2=169495&view=diff</a><br>
==============================================================================<br>
--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Dec 6 06:43:18 2012<br>
@@ -1273,7 +1273,6 @@<br>
CmdArgs.push_back("-target-cpu");<br>
CmdArgs.push_back(Args.MakeArgString("hexagon" + getHexagonTargetCPU(Args)));<br>
CmdArgs.push_back("-fno-signed-char");<br>
- CmdArgs.push_back("-nobuiltininc");<br>
<br>
if (Args.hasArg(options::OPT_mqdsp6_compat))<br>
CmdArgs.push_back("-mqdsp6-compat");<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-as<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-as?rev=169495&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-as?rev=169495&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-as (added)<br>
+++ cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-as Thu Dec 6 06:43:18 2012<br>
@@ -0,0 +1 @@<br>
+# placeholder for testing purposes<br>
\ No newline at end of file<br>
<br>
Propchange: cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-as<br>
------------------------------------------------------------------------------<br>
svn:executable = *<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-gcc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-gcc?rev=169495&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-gcc?rev=169495&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-gcc (added)<br>
+++ cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-gcc Thu Dec 6 06:43:18 2012<br>
@@ -0,0 +1 @@<br>
+# placeholder for testing purposes<br>
\ No newline at end of file<br>
<br>
Propchange: cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/bin/hexagon-gcc<br>
------------------------------------------------------------------------------<br>
svn:executable = *<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/c++/4.4.0/ios<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/c%2B%2B/4.4.0/ios?rev=169495&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/c%2B%2B/4.4.0/ios?rev=169495&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/c++/4.4.0/ios (added)<br>
+++ cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/c++/4.4.0/ios Thu Dec 6 06:43:18 2012<br>
@@ -0,0 +1 @@<br>
+// placeholder for testing purposes<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/stdio.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/stdio.h?rev=169495&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/stdio.h?rev=169495&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/stdio.h (added)<br>
+++ cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/hexagon/include/stdio.h Thu Dec 6 06:43:18 2012<br>
@@ -0,0 +1 @@<br>
+// placeholder for testing purposes<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include-fixed/limits.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include-fixed/limits.h?rev=169495&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include-fixed/limits.h?rev=169495&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include-fixed/limits.h (added)<br>
+++ cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include-fixed/limits.h Thu Dec 6 06:43:18 2012<br>
@@ -0,0 +1 @@<br>
+// placeholder for testing purposes<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include/stddef.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include/stddef.h?rev=169495&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include/stddef.h?rev=169495&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include/stddef.h (added)<br>
+++ cfe/trunk/test/Driver/Inputs/hexagon_tree/gnu/lib/gcc/hexagon/4.4.0/include/stddef.h Thu Dec 6 06:43:18 2012<br>
@@ -0,0 +1 @@<br>
+// placeholder for testing purposes<br>
<br>
Added: cfe/trunk/test/Driver/Inputs/hexagon_tree/qc/bin/placeholder<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/qc/bin/placeholder?rev=169495&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/hexagon_tree/qc/bin/placeholder?rev=169495&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/Inputs/hexagon_tree/qc/bin/placeholder (added)<br>
+++ cfe/trunk/test/Driver/Inputs/hexagon_tree/qc/bin/placeholder Thu Dec 6 06:43:18 2012<br>
@@ -0,0 +1 @@<br>
+// placeholder for testing purposes<br>
<br>
Added: cfe/trunk/test/Driver/hexagon-toolchain.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hexagon-toolchain.c?rev=169495&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/hexagon-toolchain.c?rev=169495&view=auto</a><br>
==============================================================================<br>
--- cfe/trunk/test/Driver/hexagon-toolchain.c (added)<br>
+++ cfe/trunk/test/Driver/hexagon-toolchain.c Thu Dec 6 06:43:18 2012<br>
@@ -0,0 +1,71 @@<br>
+// REQUIRES: hexagon-registered-target<br>
+<br>
+// -----------------------------------------------------------------------------<br>
+// Test standard include paths<br>
+// -----------------------------------------------------------------------------<br>
+<br>
+// RUN: %clang -### -target hexagon-unknown-linux \<br>
+// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \<br>
+// RUN: %s 2>&1 \<br>
+// RUN: | FileCheck -check-prefix=CHECK001 %s<br>
+// CHECK001: "-cc1" {{.*}} "-internal-externc-isystem" "[[INSTALL_DIR:.*]]/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include"<br>
+// CHECK001: "-internal-externc-isystem" "[[INSTALL_DIR]]/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include-fixed"<br>
+// CHECK001: "-internal-externc-isystem" "[[INSTALL_DIR]]/Inputs/hexagon_tree/qc/bin/../../gnu/hexagon/include"<br>
+// CHECK001-NEXT: "[[INSTALL_DIR]]/Inputs/hexagon_tree/qc/bin/../../gnu/bin/hexagon-as"<br>
+<br>
+// RUN: %clang -ccc-cxx -x c++ -### -target hexagon-unknown-linux \<br>
+// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \<br>
+// RUN: %s 2>&1 \<br>
+// RUN: | FileCheck -check-prefix=CHECK002 %s<br>
+// CHECK002: "-cc1" {{.*}} "-internal-isystem" "[[INSTALL_DIR:.*]]/Inputs/hexagon_tree/qc/bin/../../gnu/hexagon/include/c++/4.4.0"<br>
+// CHECK002: "-internal-externc-isystem" "[[INSTALL_DIR]]/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include"<br>
+// CHECK002: "-internal-externc-isystem" "[[INSTALL_DIR]]/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include-fixed"<br>
+// CHECK002: "-internal-externc-isystem" "[[INSTALL_DIR]]/Inputs/hexagon_tree/qc/bin/../../gnu/hexagon/include"<br>
+// CHECK002-NEXT: "[[INSTALL_DIR]]/Inputs/hexagon_tree/qc/bin/../../gnu/bin/hexagon-as"<br>
+<br>
+// -----------------------------------------------------------------------------<br>
+// Test -nostdinc, -nostdlibinc, -nostdinc++<br>
+// -----------------------------------------------------------------------------<br>
+<br>
+// RUN: %clang -### -target hexagon-unknown-linux \<br>
+// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \<br>
+// RUN: -nostdinc \<br>
+// RUN: %s 2>&1 \<br>
+// RUN: | FileCheck -check-prefix=CHECK003 %s<br>
+// CHECK003: "-cc1"<br>
+// CHECK003-NOT: "-internal-externc-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include"<br>
+// CHECK003-NOT: "-internal-externc-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include-fixed"<br>
+// CHECK003-NOT: "-internal-externc-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/hexagon/include"<br>
+// CHECK003-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin/hexagon-as"<br>
+<br>
+// RUN: %clang -### -target hexagon-unknown-linux \<br>
+// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \<br>
+// RUN: -nostdlibinc \<br>
+// RUN: %s 2>&1 \<br>
+// RUN: | FileCheck -check-prefix=CHECK004 %s<br>
+// CHECK004: "-cc1"<br>
+// CHECK004-NOT: "-internal-externc-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include"<br>
+// CHECK004-NOT: "-internal-externc-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include-fixed"<br>
+// CHECK004-NOT: "-internal-externc-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/hexagon/include"<br>
+// CHECK004-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin/hexagon-as"<br>
+<br>
+// RUN: %clang -ccc-cxx -x c++ -### -target hexagon-unknown-linux \<br>
+// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \<br>
+// RUN: -nostdlibinc \<br>
+// RUN: %s 2>&1 \<br>
+// RUN: | FileCheck -check-prefix=CHECK005 %s<br>
+// CHECK005: "-cc1"<br>
+// CHECK005-NOT: "-internal-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/hexagon/include/c++/4.4.0"<br>
+// CHECK005-NOT: "-internal-externc-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include"<br>
+// CHECK005-NOT: "-internal-externc-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/lib/gcc/hexagon/4.4.0/include-fixed"<br>
+// CHECK005-NOT: "-internal-externc-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/hexagon/include"<br>
+// CHECK005-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin/hexagon-as"<br>
+<br>
+// RUN: %clang -ccc-cxx -x c++ -### -target hexagon-unknown-linux \<br>
+// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \<br>
+// RUN: -nostdinc++ \<br>
+// RUN: %s 2>&1 \<br>
+// RUN: | FileCheck -check-prefix=CHECK006 %s<br>
+// CHECK006: "-cc1"<br>
+// CHECK006-NOT: "-internal-isystem" "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/hexagon/include/c++/4.4.0"<br>
+// CHECK006-NEXT: "{{.*}}/Inputs/hexagon_tree/qc/bin/../../gnu/bin/hexagon-as"<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>