2013-06-22 01:50:56 +02:00
|
|
|
diff -Naur cfe-3.3.src-orig/lib/Driver/ToolChains.cpp cfe-3.3.src/lib/Driver/ToolChains.cpp
|
|
|
|
--- cfe-3.3.src-orig/lib/Driver/ToolChains.cpp 2013-05-06 12:26:41.000000000 -0400
|
|
|
|
+++ cfe-3.3.src/lib/Driver/ToolChains.cpp 2013-06-21 19:28:12.120364372 -0400
|
|
|
|
@@ -2318,17 +2318,6 @@
|
|
|
|
Paths);
|
2013-01-22 20:33:55 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
- addPathIfExists(SysRoot + "/lib/" + MultiarchTriple, Paths);
|
|
|
|
- addPathIfExists(SysRoot + "/lib/../" + Multilib, Paths);
|
|
|
|
- addPathIfExists(SysRoot + "/usr/lib/" + MultiarchTriple, Paths);
|
|
|
|
- addPathIfExists(SysRoot + "/usr/lib/../" + Multilib, Paths);
|
|
|
|
-
|
|
|
|
- // Try walking via the GCC triple path in case of multiarch GCC
|
|
|
|
- // installations with strange symlinks.
|
|
|
|
- if (GCCInstallation.isValid())
|
|
|
|
- addPathIfExists(SysRoot + "/usr/lib/" + GCCInstallation.getTriple().str() +
|
|
|
|
- "/../../" + Multilib, Paths);
|
2013-06-22 01:50:56 +02:00
|
|
|
-
|
2013-01-22 20:33:55 +01:00
|
|
|
// Add the non-multilib suffixed paths (if potentially different).
|
|
|
|
if (GCCInstallation.isValid()) {
|
2013-06-22 01:50:56 +02:00
|
|
|
const std::string &LibPath = GCCInstallation.getParentLibPath();
|
|
|
|
@@ -2341,8 +2330,6 @@
|
2013-01-22 20:33:55 +01:00
|
|
|
addPathIfExists(LibPath, Paths);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
- addPathIfExists(SysRoot + "/lib", Paths);
|
|
|
|
- addPathIfExists(SysRoot + "/usr/lib", Paths);
|
|
|
|
|
2013-06-22 01:50:56 +02:00
|
|
|
IsPIEDefault = SanitizerArgs(*this, Args).hasZeroBaseShadow();
|
|
|
|
}
|
|
|
|
@@ -2395,9 +2382,6 @@
|
2013-01-22 20:33:55 +01:00
|
|
|
if (DriverArgs.hasArg(options::OPT_nostdinc))
|
|
|
|
return;
|
|
|
|
|
|
|
|
- if (!DriverArgs.hasArg(options::OPT_nostdlibinc))
|
2013-06-22 01:50:56 +02:00
|
|
|
- addSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/local/include");
|
2013-01-22 20:33:55 +01:00
|
|
|
-
|
|
|
|
if (!DriverArgs.hasArg(options::OPT_nobuiltininc)) {
|
|
|
|
llvm::sys::Path P(D.ResourceDir);
|
|
|
|
P.appendComponent("include");
|
2013-06-22 01:50:56 +02:00
|
|
|
@@ -2479,26 +2463,6 @@
|
2013-01-22 20:33:55 +01:00
|
|
|
"/usr/include/powerpc64-linux-gnu"
|
|
|
|
};
|
|
|
|
ArrayRef<StringRef> MultiarchIncludeDirs;
|
|
|
|
- if (getTriple().getArch() == llvm::Triple::x86_64) {
|
|
|
|
- MultiarchIncludeDirs = X86_64MultiarchIncludeDirs;
|
|
|
|
- } else if (getTriple().getArch() == llvm::Triple::x86) {
|
|
|
|
- MultiarchIncludeDirs = X86MultiarchIncludeDirs;
|
2013-06-22 01:50:56 +02:00
|
|
|
- } else if (getTriple().getArch() == llvm::Triple::aarch64) {
|
|
|
|
- MultiarchIncludeDirs = AArch64MultiarchIncludeDirs;
|
2013-01-22 20:33:55 +01:00
|
|
|
- } else if (getTriple().getArch() == llvm::Triple::arm) {
|
|
|
|
- if (getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
|
|
|
|
- MultiarchIncludeDirs = ARMHFMultiarchIncludeDirs;
|
|
|
|
- else
|
|
|
|
- MultiarchIncludeDirs = ARMMultiarchIncludeDirs;
|
|
|
|
- } else if (getTriple().getArch() == llvm::Triple::mips) {
|
|
|
|
- MultiarchIncludeDirs = MIPSMultiarchIncludeDirs;
|
|
|
|
- } else if (getTriple().getArch() == llvm::Triple::mipsel) {
|
|
|
|
- MultiarchIncludeDirs = MIPSELMultiarchIncludeDirs;
|
|
|
|
- } else if (getTriple().getArch() == llvm::Triple::ppc) {
|
|
|
|
- MultiarchIncludeDirs = PPCMultiarchIncludeDirs;
|
|
|
|
- } else if (getTriple().getArch() == llvm::Triple::ppc64) {
|
|
|
|
- MultiarchIncludeDirs = PPC64MultiarchIncludeDirs;
|
|
|
|
- }
|
|
|
|
for (ArrayRef<StringRef>::iterator I = MultiarchIncludeDirs.begin(),
|
|
|
|
E = MultiarchIncludeDirs.end();
|
|
|
|
I != E; ++I) {
|
2013-06-22 01:50:56 +02:00
|
|
|
@@ -2510,13 +2474,6 @@
|
2013-01-22 20:33:55 +01:00
|
|
|
|
|
|
|
if (getTriple().getOS() == llvm::Triple::RTEMS)
|
|
|
|
return;
|
|
|
|
-
|
|
|
|
- // Add an include of '/include' directly. This isn't provided by default by
|
|
|
|
- // system GCCs, but is often used with cross-compiling GCCs, and harmless to
|
|
|
|
- // add even when Clang is acting as-if it were a system compiler.
|
2013-06-22 01:50:56 +02:00
|
|
|
- addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/include");
|
2013-01-22 20:33:55 +01:00
|
|
|
-
|
2013-06-22 01:50:56 +02:00
|
|
|
- addExternCSystemInclude(DriverArgs, CC1Args, SysRoot + "/usr/include");
|
2013-01-22 20:33:55 +01:00
|
|
|
}
|
|
|
|
|
2013-06-22 01:50:56 +02:00
|
|
|
/// \brief Helper to add the three variant paths for a libstdc++ installation.
|
|
|
|
diff -Naur cfe-3.3.src-orig/lib/Driver/Tools.cpp cfe-3.3.src/lib/Driver/Tools.cpp
|
|
|
|
--- cfe-3.3.src-orig/lib/Driver/Tools.cpp 2013-05-30 14:01:30.000000000 -0400
|
|
|
|
+++ cfe-3.3.src/lib/Driver/Tools.cpp 2013-06-21 19:30:51.604726574 -0400
|
|
|
|
@@ -5976,43 +5976,6 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (ToolChain.getArch() == llvm::Triple::arm ||
|
|
|
|
- ToolChain.getArch() == llvm::Triple::thumb ||
|
|
|
|
- (!Args.hasArg(options::OPT_static) &&
|
|
|
|
- !Args.hasArg(options::OPT_shared))) {
|
2013-01-22 20:33:55 +01:00
|
|
|
- CmdArgs.push_back("-dynamic-linker");
|
|
|
|
- if (isAndroid)
|
|
|
|
- CmdArgs.push_back("/system/bin/linker");
|
|
|
|
- else if (ToolChain.getArch() == llvm::Triple::x86)
|
|
|
|
- CmdArgs.push_back("/lib/ld-linux.so.2");
|
2013-06-22 01:50:56 +02:00
|
|
|
- else if (ToolChain.getArch() == llvm::Triple::aarch64)
|
|
|
|
- CmdArgs.push_back("/lib/ld-linux-aarch64.so.1");
|
2013-01-22 20:33:55 +01:00
|
|
|
- else if (ToolChain.getArch() == llvm::Triple::arm ||
|
|
|
|
- ToolChain.getArch() == llvm::Triple::thumb) {
|
|
|
|
- if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
|
|
|
|
- CmdArgs.push_back("/lib/ld-linux-armhf.so.3");
|
|
|
|
- else
|
|
|
|
- CmdArgs.push_back("/lib/ld-linux.so.3");
|
|
|
|
- }
|
|
|
|
- else if (ToolChain.getArch() == llvm::Triple::mips ||
|
|
|
|
- ToolChain.getArch() == llvm::Triple::mipsel)
|
|
|
|
- CmdArgs.push_back("/lib/ld.so.1");
|
|
|
|
- else if (ToolChain.getArch() == llvm::Triple::mips64 ||
|
|
|
|
- ToolChain.getArch() == llvm::Triple::mips64el) {
|
|
|
|
- if (hasMipsN32ABIArg(Args))
|
|
|
|
- CmdArgs.push_back("/lib32/ld.so.1");
|
|
|
|
- else
|
|
|
|
- CmdArgs.push_back("/lib64/ld.so.1");
|
|
|
|
- }
|
|
|
|
- else if (ToolChain.getArch() == llvm::Triple::ppc)
|
|
|
|
- CmdArgs.push_back("/lib/ld.so.1");
|
2013-06-22 01:50:56 +02:00
|
|
|
- else if (ToolChain.getArch() == llvm::Triple::ppc64 ||
|
|
|
|
- ToolChain.getArch() == llvm::Triple::systemz)
|
2013-01-22 20:33:55 +01:00
|
|
|
- CmdArgs.push_back("/lib64/ld64.so.1");
|
|
|
|
- else
|
|
|
|
- CmdArgs.push_back("/lib64/ld-linux-x86-64.so.2");
|
2013-06-22 01:50:56 +02:00
|
|
|
- }
|
|
|
|
-
|
2013-01-22 20:33:55 +01:00
|
|
|
CmdArgs.push_back("-o");
|
2013-06-22 01:50:56 +02:00
|
|
|
CmdArgs.push_back(Output.getFilename());
|
|
|
|
|
|
|
|
diff -Naur cfe-3.3.src-orig/lib/Frontend/InitHeaderSearch.cpp cfe-3.3.src/lib/Frontend/InitHeaderSearch.cpp
|
|
|
|
--- cfe-3.3.src-orig/lib/Frontend/InitHeaderSearch.cpp 2013-04-29 21:21:43.000000000 -0400
|
|
|
|
+++ cfe-3.3.src/lib/Frontend/InitHeaderSearch.cpp 2013-06-21 19:32:47.627016565 -0400
|
|
|
|
@@ -225,20 +225,6 @@
|
|
|
|
const HeaderSearchOptions &HSOpts) {
|
|
|
|
llvm::Triple::OSType os = triple.getOS();
|
|
|
|
|
|
|
|
- if (HSOpts.UseStandardSystemIncludes) {
|
|
|
|
- switch (os) {
|
|
|
|
- case llvm::Triple::FreeBSD:
|
|
|
|
- case llvm::Triple::NetBSD:
|
|
|
|
- case llvm::Triple::OpenBSD:
|
|
|
|
- case llvm::Triple::Bitrig:
|
|
|
|
- break;
|
|
|
|
- default:
|
2013-01-22 20:33:55 +01:00
|
|
|
- // FIXME: temporary hack: hard-coded paths.
|
2013-06-22 01:50:56 +02:00
|
|
|
- AddPath("/usr/local/include", System, false);
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// Builtin includes use #include_next directives and should be positioned
|
|
|
|
// just prior C include dirs.
|
|
|
|
if (HSOpts.UseBuiltinIncludes) {
|
|
|
|
@@ -332,9 +318,6 @@
|
|
|
|
default:
|
2013-01-22 20:33:55 +01:00
|
|
|
break;
|
|
|
|
}
|
2013-06-22 01:50:56 +02:00
|
|
|
-
|
2013-01-22 20:33:55 +01:00
|
|
|
- if ( os != llvm::Triple::RTEMS )
|
2013-06-22 01:50:56 +02:00
|
|
|
- AddPath("/usr/include", ExternCSystem, false);
|
2013-01-22 20:33:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void InitHeaderSearch::
|