1 // General tests that the header search paths detected by the driver and passed
4 // Test a simulated installation of libc++ on Linux, both through sysroot and
5 // the installation path of Clang.
6 // RUN: %clang -### %s -fsyntax-only 2>&1 \
7 // RUN: --target=x86_64-unknown-linux-gnu \
8 // RUN: -stdlib=libc++ \
9 // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
10 // RUN: -resource-dir=%S/Inputs/resource_dir \
11 // RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
12 // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-SYSROOT %s
13 // CHECK-BASIC-LIBCXX-SYSROOT: "-cc1"
14 // CHECK-BASIC-LIBCXX-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]"
15 // CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]][[SEP:/|\\\\]]usr[[SEP]]include[[SEP]]x86_64-unknown-linux-gnu[[SEP]]c++[[SEP]]v1"
16 // CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]][[SEP]]usr[[SEP]]include[[SEP]]c++[[SEP]]v1"
17 // CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
19 // Test include paths when the sysroot path ends with `/`.
20 // RUN: %clang -### %s -fsyntax-only 2>&1 \
21 // RUN: --target=x86_64-unknown-linux-gnu \
22 // RUN: -stdlib=libc++ \
23 // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
24 // RUN: -resource-dir=%S/Inputs/resource_dir \
25 // RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree/ \
26 // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-SYSROOT-SLASH %s
27 // CHECK-BASIC-LIBCXX-SYSROOT-SLASH: "-cc1"
28 // CHECK-BASIC-LIBCXX-SYSROOT-SLASH-SAME: "-isysroot" "[[SYSROOT:[^"]+/]]"
29 // CHECK-BASIC-LIBCXX-SYSROOT-SLASH-SAME: "-internal-isystem" "[[SYSROOT]]usr[[SEP:/|\\\\]]include[[SEP]]x86_64-unknown-linux-gnu[[SEP]]c++[[SEP]]v1"
30 // CHECK-BASIC-LIBCXX-SYSROOT-SLASH-SAME: "-internal-isystem" "[[SYSROOT]]usr[[SEP]]include[[SEP]]c++[[SEP]]v1"
31 // CHECK-BASIC-LIBCXX-SYSROOT-SLASH-SAME: "-internal-isystem" "[[SYSROOT]]usr/local/include"
33 // RUN: %clang -### %s -fsyntax-only 2>&1 \
34 // RUN: --target=x86_64-unknown-linux-gnu \
35 // RUN: -stdlib=libc++ \
36 // RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
37 // RUN: -resource-dir=%S/Inputs/resource_dir \
38 // RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
39 // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-INSTALL %s
40 // CHECK-BASIC-LIBCXX-INSTALL: "-cc1"
41 // CHECK-BASIC-LIBCXX-INSTALL: "-isysroot" "[[SYSROOT:[^"]+]]"
42 // CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/bin[[SEP:/|\\\\]]..[[SEP]]include[[SEP]]x86_64-unknown-linux-gnu[[SEP]]c++[[SEP]]v1"
43 // CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/bin[[SEP]]..[[SEP]]include[[SEP]]c++[[SEP]]v1"
44 // CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
46 // RUN: %clang -### %s -fsyntax-only 2>&1 \
47 // RUN: --target=x86_64-unknown-linux-gnu \
48 // RUN: -stdlib=libc++ \
49 // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
50 // RUN: -resource-dir=%S/Inputs/resource_dir \
51 // RUN: --sysroot=%S/Inputs/basic_linux_libcxxv2_tree \
52 // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXXV2-SYSROOT %s
53 // CHECK-BASIC-LIBCXXV2-SYSROOT: "-cc1"
54 // CHECK-BASIC-LIBCXXV2-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]"
55 // CHECK-BASIC-LIBCXXV2-SYSROOT: "-internal-isystem" "[[SYSROOT]][[SEP:/|\\\\]]usr[[SEP]]include[[SEP]]x86_64-unknown-linux-gnu[[SEP]]c++[[SEP]]v2"
56 // CHECK-BASIC-LIBCXXV2-SYSROOT: "-internal-isystem" "[[SYSROOT]][[SEP]]usr[[SEP]]include[[SEP]]c++[[SEP]]v2"
57 // CHECK-BASIC-LIBCXXV2-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
58 // RUN: %clang -### %s -fsyntax-only 2>&1 \
59 // RUN: --target=x86_64-unknown-linux-gnu \
60 // RUN: -stdlib=libc++ \
61 // RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxxv2_tree/usr/bin \
62 // RUN: -resource-dir=%S/Inputs/resource_dir \
63 // RUN: --sysroot=%S/Inputs/basic_linux_libcxxv2_tree \
64 // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXXV2-INSTALL %s
65 // CHECK-BASIC-LIBCXXV2-INSTALL: "-cc1"
66 // CHECK-BASIC-LIBCXXV2-INSTALL: "-isysroot" "[[SYSROOT:[^"]+]]"
67 // CHECK-BASIC-LIBCXXV2-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/bin[[SEP:/|\\\\]]..[[SEP]]include[[SEP]]x86_64-unknown-linux-gnu[[SEP]]c++[[SEP]]v2"
68 // CHECK-BASIC-LIBCXXV2-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/bin[[SEP]]..[[SEP]]include[[SEP]]c++[[SEP]]v2"
69 // CHECK-BASIC-LIBCXXV2-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
71 // Test Linux with libstdc++ when the sysroot path ends with `/`.
72 // RUN: %clang -### %s -fsyntax-only 2>&1 \
73 // RUN: --target=x86_64-unknown-linux-gnu \
74 // RUN: -stdlib=libstdc++ \
75 // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
76 // RUN: -resource-dir=%S/Inputs/resource_dir \
77 // RUN: --sysroot=%S/Inputs/basic_linux_libstdcxx_tree/ \
78 // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH %s
79 // CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH: "-cc1"
80 // CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH-SAME: "-isysroot" "[[SYSROOT:[^"]+/]]"
81 // CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH-SAME: "-internal-isystem" "[[SYSROOT]]usr/lib/gcc/x86_64-unknown-linux-gnu/4.8/../../../../x86_64-unknown-linux-gnu/include"
83 // Test Linux with both libc++ and libstdc++ installed.
84 // RUN: %clang -### %s -fsyntax-only 2>&1 \
85 // RUN: --target=x86_64-unknown-linux-gnu \
86 // RUN: -stdlib=libc++ \
87 // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
88 // RUN: -resource-dir=%S/Inputs/resource_dir \
89 // RUN: --sysroot=%S/Inputs/basic_linux_libstdcxx_libcxxv2_tree \
90 // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBSTDCXX-LIBCXXV2-SYSROOT %s
91 // CHECK-BASIC-LIBSTDCXX-LIBCXXV2-SYSROOT: "-cc1"
92 // CHECK-BASIC-LIBSTDCXX-LIBCXXV2-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]"
93 // CHECK-BASIC-LIBSTDCXX-LIBCXXV2-SYSROOT: "-internal-isystem" "[[SYSROOT]][[SEP:/|\\\\]]usr[[SEP]]include[[SEP]]x86_64-unknown-linux-gnu[[SEP]]c++[[SEP]]v2"
94 // CHECK-BASIC-LIBSTDCXX-LIBCXXV2-SYSROOT: "-internal-isystem" "[[SYSROOT]][[SEP]]usr[[SEP]]include[[SEP]]c++[[SEP]]v2"
95 // CHECK-BASIC-LIBSTDCXX-LIBCXXV2-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
97 // Test Gentoo's weirdness both before and after they changed it in their GCC
99 // RUN: %clang -### %s -fsyntax-only 2>&1 \
100 // RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
101 // RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.6.2_tree \
102 // RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-6-2 %s
103 // CHECK-GENTOO-4-6-2: "-cc1"
104 // CHECK-GENTOO-4-6-2: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
105 // CHECK-GENTOO-4-6-2: "-isysroot" "[[SYSROOT:[^"]+]]"
106 // CHECK-GENTOO-4-6-2: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4"
107 // CHECK-GENTOO-4-6-2: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/x86_64-pc-linux-gnu"
108 // CHECK-GENTOO-4-6-2: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/include/g++-v4/backward"
109 // CHECK-GENTOO-4-6-2: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
110 // CHECK-GENTOO-4-6-2: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
111 // CHECK-GENTOO-4-6-2: "-internal-externc-isystem" "[[SYSROOT]]/include"
112 // CHECK-GENTOO-4-6-2: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
113 // RUN: %clang -### %s -fsyntax-only 2>&1 \
114 // RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
115 // RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.6.4_tree \
116 // RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-6-4 %s
117 // CHECK-GENTOO-4-6-4: "-cc1"
118 // CHECK-GENTOO-4-6-4: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
119 // CHECK-GENTOO-4-6-4: "-isysroot" "[[SYSROOT:[^"]+]]"
120 // CHECK-GENTOO-4-6-4: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/include/g++-v4.6"
121 // CHECK-GENTOO-4-6-4: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/include/g++-v4.6/x86_64-pc-linux-gnu"
122 // CHECK-GENTOO-4-6-4: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.4/include/g++-v4.6/backward"
123 // CHECK-GENTOO-4-6-4: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
124 // CHECK-GENTOO-4-6-4: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
125 // CHECK-GENTOO-4-6-4: "-internal-externc-isystem" "[[SYSROOT]]/include"
126 // CHECK-GENTOO-4-6-4: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
127 // RUN: %clang -### %s -fsyntax-only 2>&1 \
128 // RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
129 // RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.9.3_tree \
130 // RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-3 %s
131 // CHECK-GENTOO-4-9-3: "-cc1"
132 // CHECK-GENTOO-4-9-3: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
133 // CHECK-GENTOO-4-9-3: "-isysroot" "[[SYSROOT:[^"]+]]"
134 // CHECK-GENTOO-4-9-3: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3"
135 // CHECK-GENTOO-4-9-3: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/x86_64-pc-linux-gnu"
136 // CHECK-GENTOO-4-9-3: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/backward"
137 // CHECK-GENTOO-4-9-3: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
138 // CHECK-GENTOO-4-9-3: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
139 // CHECK-GENTOO-4-9-3: "-internal-externc-isystem" "[[SYSROOT]]/include"
140 // CHECK-GENTOO-4-9-3: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
142 // Test support for Gentoo's gcc-config -- clang should prefer the older
143 // (4.9.3) version over the newer (5.4.0) due to preference specified
144 // in /etc/env.d/gcc/x86_64-pc-linux-gnu.
145 // RUN: %clang -### %s -fsyntax-only 2>&1 \
146 // RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
147 // RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
148 // RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-3 %s
150 // Test that gcc-config support does not break multilib.
151 // RUN: %clang -### %s -fsyntax-only 2>&1 \
152 // RUN: --target=x86_64-unknown-linux-gnux32 -stdlib=libstdc++ \
153 // RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
154 // RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-3-X32 %s
155 // CHECK-GENTOO-4-9-3-X32: "-cc1"
156 // CHECK-GENTOO-4-9-3-X32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
157 // CHECK-GENTOO-4-9-3-X32: "-isysroot" "[[SYSROOT:[^"]+]]"
158 // CHECK-GENTOO-4-9-3-X32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3"
159 // CHECK-GENTOO-4-9-3-X32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/x86_64-pc-linux-gnu/x32"
160 // CHECK-GENTOO-4-9-3-X32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/backward"
161 // CHECK-GENTOO-4-9-3-X32: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
162 // CHECK-GENTOO-4-9-3-X32: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
163 // CHECK-GENTOO-4-9-3-X32: "-internal-externc-isystem" "[[SYSROOT]]/include"
164 // CHECK-GENTOO-4-9-3-X32: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
166 // RUN: %clang -### %s -fsyntax-only 2>&1 \
167 // RUN: --target=i386-unknown-linux-gnu -stdlib=libstdc++ \
168 // RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_multi_version_tree \
169 // RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-3-32 %s
170 // CHECK-GENTOO-4-9-3-32: "-cc1"
171 // CHECK-GENTOO-4-9-3-32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
172 // CHECK-GENTOO-4-9-3-32: "-isysroot" "[[SYSROOT:[^"]+]]"
173 // CHECK-GENTOO-4-9-3-32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3"
174 // CHECK-GENTOO-4-9-3-32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/x86_64-pc-linux-gnu/32"
175 // CHECK-GENTOO-4-9-3-32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/include/g++-v4.9.3/backward"
176 // CHECK-GENTOO-4-9-3-32: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
177 // CHECK-GENTOO-4-9-3-32: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
178 // CHECK-GENTOO-4-9-3-32: "-internal-externc-isystem" "[[SYSROOT]]/include"
179 // CHECK-GENTOO-4-9-3-32: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
181 // Test support for parsing Gentoo's gcc-config -- clang should parse the
182 // /etc/env.d/gcc/config-x86_64-pc-linux-gnu file to find CURRENT gcc used.
183 // Then should pick the multilibs from version 4.9.x specified in
184 // /etc/env.d/gcc/x86_64-pc-linux-gnu-4.9.3.
185 // RUN: %clang -### %s -fsyntax-only 2>&1 \
186 // RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
187 // RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.9.x_tree \
188 // RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-X %s
190 // CHECK-GENTOO-4-9-X: "-cc1"
191 // CHECK-GENTOO-4-9-X: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
192 // CHECK-GENTOO-4-9-X: "-isysroot" "[[SYSROOT:[^"]+]]"
193 // CHECK-GENTOO-4-9-X: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/include/g++-v4.9.3"
194 // CHECK-GENTOO-4-9-X: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/include/g++-v4.9.3/x86_64-pc-linux-gnu"
195 // CHECK-GENTOO-4-9-X: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/include/g++-v4.9.3/backward"
196 // CHECK-GENTOO-4-9-X: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
197 // CHECK-GENTOO-4-9-X: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
198 // CHECK-GENTOO-4-9-X: "-internal-externc-isystem" "[[SYSROOT]]/include"
199 // CHECK-GENTOO-4-9-X: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
201 // RUN: %clang -### %s -fsyntax-only 2>&1 \
202 // RUN: --target=x86_64-unknown-linux-gnux32 -stdlib=libstdc++ \
203 // RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.9.x_tree \
204 // RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-X-X32 %s
205 // CHECK-GENTOO-4-9-X-X32: "-cc1"
206 // CHECK-GENTOO-4-9-X-X32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
207 // CHECK-GENTOO-4-9-X-X32: "-isysroot" "[[SYSROOT:[^"]+]]"
208 // CHECK-GENTOO-4-9-X-X32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/include/g++-v4.9.3"
209 // CHECK-GENTOO-4-9-X-X32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/include/g++-v4.9.3/x86_64-pc-linux-gnu/x32"
210 // CHECK-GENTOO-4-9-X-X32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/include/g++-v4.9.3/backward"
211 // CHECK-GENTOO-4-9-X-X32: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
212 // CHECK-GENTOO-4-9-X-X32: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
213 // CHECK-GENTOO-4-9-X-X32: "-internal-externc-isystem" "[[SYSROOT]]/include"
214 // CHECK-GENTOO-4-9-X-X32: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
216 // RUN: %clang -### %s -fsyntax-only 2>&1 \
217 // RUN: --target=i386-unknown-linux-gnu -stdlib=libstdc++ \
218 // RUN: --sysroot=%S/Inputs/gentoo_linux_gcc_4.9.x_tree \
219 // RUN: | FileCheck --check-prefix=CHECK-GENTOO-4-9-X-32 %s
220 // CHECK-GENTOO-4-9-X-32: "-cc1"
221 // CHECK-GENTOO-4-9-X-32: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
222 // CHECK-GENTOO-4-9-X-32: "-isysroot" "[[SYSROOT:[^"]+]]"
223 // CHECK-GENTOO-4-9-X-32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/include/g++-v4.9.3"
224 // CHECK-GENTOO-4-9-X-32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/include/g++-v4.9.3/x86_64-pc-linux-gnu/32"
225 // CHECK-GENTOO-4-9-X-32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.x/include/g++-v4.9.3/backward"
226 // CHECK-GENTOO-4-9-X-32: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
227 // CHECK-GENTOO-4-9-X-32: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
228 // CHECK-GENTOO-4-9-X-32: "-internal-externc-isystem" "[[SYSROOT]]/include"
229 // CHECK-GENTOO-4-9-X-32: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
231 // Check header search on Debian loong64
232 // RUN: %clang -### %s -fsyntax-only 2>&1 \
233 // RUN: --target=loongarch64-unknown-linux-gnu -stdlib=libstdc++ \
234 // RUN: --sysroot=%S/Inputs/debian_loong64_tree \
235 // RUN: | FileCheck --check-prefix=CHECK-LOONG64-GNU %s
237 // Check that "-gnuf64" is seen as "-gnu" for loong64.
238 // RUN: %clang -### %s -fsyntax-only 2>&1 \
239 // RUN: --target=loongarch64-unknown-linux-gnuf64 -stdlib=libstdc++ \
240 // RUN: --sysroot=%S/Inputs/debian_loong64_tree \
241 // RUN: | FileCheck --check-prefix=CHECK-LOONG64-GNU %s
242 // CHECK-LOONG64-GNU: "-cc1"
243 // CHECK-LOONG64-GNU: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
244 // CHECK-LOONG64-GNU: "-isysroot" "[[SYSROOT:[^"]+]]"
245 // CHECK-LOONG64-GNU: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/loongarch64-linux-gnu/13/../../../../include/c++/13"
246 // CHECK-LOONG64-GNU: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/loongarch64-linux-gnu/13/../../../../include/c++/13/loongarch64-linux-gnu"
247 // CHECK-LOONG64-GNU: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/loongarch64-linux-gnu/13/../../../../include/c++/13/backward"
248 // CHECK-LOONG64-GNU: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
249 // CHECK-LOONG64-GNU: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
250 // CHECK-LOONG64-GNU: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/loongarch64-linux-gnu/13/../../../../loongarch64-linux-gnu/include"
251 // CHECK-LOONG64-GNU: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/loongarch64-linux-gnu"
252 // CHECK-LOONG64-GNU: "-internal-externc-isystem" "[[SYSROOT]]/include"
253 // CHECK-LOONG64-GNU: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
255 // Check header search on Debian 6 / MIPS64
256 // RUN: %clang -### %s -fsyntax-only 2>&1 \
257 // RUN: --target=mips64-unknown-linux-gnuabi64 -stdlib=libstdc++ \
258 // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
259 // RUN: | FileCheck --check-prefix=CHECK-MIPS64-GNUABI %s
260 // CHECK-MIPS64-GNUABI: "-cc1"
261 // CHECK-MIPS64-GNUABI: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
262 // CHECK-MIPS64-GNUABI: "-isysroot" "[[SYSROOT:[^"]+]]"
263 // CHECK-MIPS64-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../../include/c++/4.9"
264 // CHECK-MIPS64-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../../include/c++/4.9/mips64-linux-gnuabi64"
265 // CHECK-MIPS64-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../../include/c++/4.9/backward"
266 // CHECK-MIPS64-GNUABI: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
267 // CHECK-MIPS64-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
268 // CHECK-MIPS64-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/mips64-linux-gnuabi64"
269 // CHECK-MIPS64-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/include"
270 // CHECK-MIPS64-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
272 // Check header search on Debian 6 / MIPS64
273 // RUN: %clang -### %s -fsyntax-only 2>&1 \
274 // RUN: --target=mips64el-unknown-linux-gnuabi64 -stdlib=libstdc++ \
275 // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
276 // RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-GNUABI %s
277 // CHECK-MIPS64EL-GNUABI: "-cc1"
278 // CHECK-MIPS64EL-GNUABI: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
279 // CHECK-MIPS64EL-GNUABI: "-isysroot" "[[SYSROOT:[^"]+]]"
280 // CHECK-MIPS64EL-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../../include/c++/4.9"
281 // CHECK-MIPS64EL-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../../include/c++/4.9/mips64el-linux-gnuabi64"
282 // CHECK-MIPS64EL-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../../include/c++/4.9/backward"
283 // CHECK-MIPS64EL-GNUABI: "-internal-isystem" "[[RESOURCE_DIR]]{{/|\\\\}}include"
284 // CHECK-MIPS64EL-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
285 // CHECK-MIPS64EL-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/mips64el-linux-gnuabi64"
286 // CHECK-MIPS64EL-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/include"
287 // CHECK-MIPS64EL-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
290 // Check header search on OpenEmbedded ARM.
291 // RUN: %clang -### %s -fsyntax-only 2>&1 \
292 // RUN: --target=arm-oe-linux-gnueabi -stdlib=libstdc++ \
293 // RUN: --sysroot=%S/Inputs/openembedded_arm_linux_tree \
294 // RUN: | FileCheck --check-prefix=CHECK-OE-ARM %s
296 // CHECK-OE-ARM: "-cc1"
297 // CHECK-OE-ARM: "-isysroot" "[[SYSROOT:[^"]+]]"
298 // CHECK-OE-ARM: "-internal-isystem" "[[SYSROOT]]/usr/lib/arm-oe-linux-gnueabi/6.3.0/../../../include/c++/6.3.0"
299 // CHECK-OE-ARM: "-internal-isystem" "[[SYSROOT]]/usr/lib/arm-oe-linux-gnueabi/6.3.0/../../../include/c++/6.3.0/backward"
301 // Check header search on OpenEmbedded AArch64.
302 // RUN: %clang -### %s -fsyntax-only 2>&1 \
303 // RUN: --target=aarch64-oe-linux -stdlib=libstdc++ \
304 // RUN: --sysroot=%S/Inputs/openembedded_aarch64_linux_tree \
305 // RUN: | FileCheck --check-prefix=CHECK-OE-AARCH64 %s
307 // CHECK-OE-AARCH64: "-cc1"
308 // CHECK-OE-AARCH64: "-isysroot" "[[SYSROOT:[^"]+]]"
309 // CHECK-OE-AARCH64: "-internal-isystem" "[[SYSROOT]]/usr/lib64/aarch64-oe-linux/6.3.0/../../../include/c++/6.3.0"
310 // CHECK-OE-AARCH64: "-internal-isystem" "[[SYSROOT]]/usr/lib64/aarch64-oe-linux/6.3.0/../../../include/c++/6.3.0/backward"
312 // Check header search with Cray's gcc package.
313 // RUN: %clang -### %s -fsyntax-only 2>&1 \
314 // RUN: --target=x86_64-unknown-linux-gnu -stdlib=libstdc++ \
315 // RUN: --sysroot=%S/Inputs/cray_suse_gcc_tree \
316 // RUN: --gcc-toolchain="%S/Inputs/cray_suse_gcc_tree/opt/gcc/8.2.0/snos" \
317 // RUN: | FileCheck --check-prefix=CHECK-CRAY-X86 %s
319 // CHECK-CRAY-X86: "-cc1"
320 // CHECK-CRAY-X86: "-isysroot" "[[SYSROOT:[^"]+]]"
321 // CHECK-CRAY-X86: "-internal-isystem" "[[SYSROOT]]/opt/gcc/8.2.0/snos/lib/gcc/x86_64-suse-linux/8.2.0/../../../../include/g++"
322 // CHECK-CRAY-X86: "-internal-isystem" "[[SYSROOT]]/opt/gcc/8.2.0/snos/lib/gcc/x86_64-suse-linux/8.2.0/../../../../include/g++/backward"