-
Notifications
You must be signed in to change notification settings - Fork 0
/
3.1-cygwin-includes.patch
51 lines (49 loc) · 2.66 KB
/
3.1-cygwin-includes.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- origsrc/llvm-3.1.src/tools/clang/lib/Frontend/InitHeaderSearch.cpp 2012-03-25 17:46:17.000000000 -0500
+++ src/llvm-3.1.src/tools/clang/lib/Frontend/InitHeaderSearch.cpp 2012-07-05 22:02:30.907716300 -0500
@@ -296,7 +296,7 @@ void InitHeaderSearch::AddDefaultCInclud
case llvm::Triple::RTEMS:
break;
case llvm::Triple::Cygwin:
- AddPath("/usr/include/w32api", System, true, false, false);
+ AddPath("/usr/lib/gcc/i686-pc-cygwin/4.5.3/include", System, true, false, false);
break;
case llvm::Triple::MinGW32: {
// mingw-w64 crt include paths
@@ -321,6 +321,10 @@ void InitHeaderSearch::AddDefaultCInclud
if ( os != llvm::Triple::RTEMS )
AddPath("/usr/include", System, false, false, false);
+
+ /* some w32api headers collide (e.g. iODBC/ODBC32, Mesa/OpenGL) */
+ if ( os == llvm::Triple::Cygwin )
+ AddPath("/usr/include/w32api", System, true, false, false);
}
void InitHeaderSearch::
@@ -369,9 +373,6 @@ AddDefaultCPlusPlusIncludePaths(const ll
case llvm::Triple::Cygwin:
// Cygwin-1.7
AddMinGWCPlusPlusIncludePaths("/usr/lib/gcc", "i686-pc-cygwin", "4.5.3");
- AddMinGWCPlusPlusIncludePaths("/usr/lib/gcc", "i686-pc-cygwin", "4.3.4");
- // g++-4 / Cygwin-1.5
- AddMinGWCPlusPlusIncludePaths("/usr/lib/gcc", "i686-pc-cygwin", "4.3.2");
break;
case llvm::Triple::MinGW32:
// mingw-w64 C++ include paths (i686-w64-mingw32 and x86_64-w64-mingw32)
@@ -386,6 +387,7 @@ AddDefaultCPlusPlusIncludePaths(const ll
AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.6.3");
AddMinGW64CXXPaths(HSOpts.ResourceDir, "4.7.0");
// mingw.org C++ include paths
+ AddMinGWCPlusPlusIncludePaths("/usr/lib/gcc", "i686-pc-mingw32", "4.5.3");
AddMinGWCPlusPlusIncludePaths("/mingw/lib/gcc", "mingw32", "4.5.2"); //MSYS
AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.6.2");
AddMinGWCPlusPlusIncludePaths("c:/MinGW/lib/gcc", "mingw32", "4.6.1");
--- origsrc/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-05-11 19:16:02.000000000 -0500
+++ src/llvm-3.1.src/tools/clang/lib/Driver/ToolChains.cpp 2012-07-04 23:51:09.272480100 -0500
@@ -2288,7 +2290,7 @@ void Linux::AddClangCXXStdlibIncludeArgs
DriverArgs, CC1Args)) {
// Gentoo is weird and places its headers inside the GCC install, so if the
// first attempt to find the headers fails, try this pattern.
- addLibStdCXXIncludePaths(InstallDir + "/include/g++-v4",
+ addLibStdCXXIncludePaths(InstallDir + "/include/c++",
(GCCInstallation.getTriple().str() +
GCCInstallation.getMultiarchSuffix()),
DriverArgs, CC1Args);