1 // RUN: %clangxx --target=x86_64-unknown-netbsd \
2 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
3 // RUN: | FileCheck -check-prefix=X86_64 %s
4 // RUN: %clangxx --target=x86_64-unknown-netbsd7.0.0 \
5 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
6 // RUN: | FileCheck -check-prefix=X86_64-7 %s
7 // RUN: %clangxx --target=arm-unknown-netbsd7.0.0-eabi \
8 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
9 // RUN: | FileCheck -check-prefix=ARM-7 %s
10 // RUN: %clangxx --target=aarch64-unknown-netbsd \
11 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
12 // RUN: | FileCheck -check-prefix=AARCH64 %s
13 // RUN: %clangxx --target=aarch64-unknown-netbsd7.0.0 \
14 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
15 // RUN: | FileCheck -check-prefix=AARCH64-7 %s
16 // RUN: %clangxx --target=aarch64_be-unknown-netbsd \
17 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
18 // RUN: | FileCheck -check-prefix=AARCH64_BE %s
19 // RUN: %clangxx --target=aarch64_be-unknown-netbsd7.0.0 \
20 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
21 // RUN: | FileCheck -check-prefix=AARCH64_BE-7 %s
22 // RUN: %clangxx --target=riscv32-unknown-netbsd \
23 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
24 // RUN: | FileCheck -check-prefix=RISCV32 %s
25 // RUN: %clangxx --target=riscv64-unknown-netbsd \
26 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
27 // RUN: | FileCheck -check-prefix=RISCV64 %s
28 // RUN: %clangxx --target=sparc-unknown-netbsd \
29 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
30 // RUN: | FileCheck -check-prefix=SPARC %s
31 // RUN: %clangxx --target=sparc-unknown-netbsd7.0.0 \
32 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
33 // RUN: | FileCheck -check-prefix=SPARC-7 %s
34 // RUN: %clangxx --target=sparc64-unknown-netbsd \
35 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
36 // RUN: | FileCheck -check-prefix=SPARC64 %s
37 // RUN: %clangxx --target=sparc64-unknown-netbsd7.0.0 \
38 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
39 // RUN: | FileCheck -check-prefix=SPARC64-7 %s
40 // RUN: %clangxx --target=powerpc-unknown-netbsd \
41 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
42 // RUN: | FileCheck -check-prefix=POWERPC %s
43 // RUN: %clangxx --target=powerpc64-unknown-netbsd \
44 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
45 // RUN: | FileCheck -check-prefix=POWERPC64 %s
47 // RUN: %clangxx --target=x86_64-unknown-netbsd -static \
48 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
49 // RUN: | FileCheck -check-prefix=S-X86_64 %s
50 // RUN: %clangxx --target=x86_64-unknown-netbsd7.0.0 -static \
51 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
52 // RUN: | FileCheck -check-prefix=S-X86_64-7 %s
53 // RUN: %clangxx --target=arm-unknown-netbsd7.0.0-eabi -static \
54 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
55 // RUN: | FileCheck -check-prefix=S-ARM-7 %s
56 // RUN: %clangxx --target=aarch64-unknown-netbsd -static \
57 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
58 // RUN: | FileCheck -check-prefix=S-AARCH64 %s
59 // RUN: %clangxx --target=aarch64-unknown-netbsd7.0.0 -static \
60 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
61 // RUN: | FileCheck -check-prefix=S-AARCH64-7 %s
62 // RUN: %clangxx --target=aarch64_be-unknown-netbsd -static \
63 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
64 // RUN: | FileCheck -check-prefix=S-AARCH64_BE %s
65 // RUN: %clangxx --target=aarch64_be-unknown-netbsd7.0.0 -static \
66 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
67 // RUN: | FileCheck -check-prefix=S-AARCH64_BE-7 %s
68 // RUN: %clangxx --target=riscv32-unknown-netbsd -static \
69 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
70 // RUN: | FileCheck -check-prefix=S-RISCV32 %s
71 // RUN: %clangxx --target=riscv64-unknown-netbsd -static \
72 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
73 // RUN: | FileCheck -check-prefix=S-RISCV64 %s
74 // RUN: %clangxx --target=sparc-unknown-netbsd -static \
75 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
76 // RUN: | FileCheck -check-prefix=S-SPARC %s
77 // RUN: %clangxx --target=sparc-unknown-netbsd7.0.0 -static \
78 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
79 // RUN: | FileCheck -check-prefix=S-SPARC-7 %s
80 // RUN: %clangxx --target=sparc64-unknown-netbsd -static \
81 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
82 // RUN: | FileCheck -check-prefix=S-SPARC64 %s
83 // RUN: %clangxx --target=sparc64-unknown-netbsd7.0.0 -static \
84 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
85 // RUN: | FileCheck -check-prefix=S-SPARC64-7 %s
86 // RUN: %clangxx --target=powerpc-unknown-netbsd -static \
87 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
88 // RUN: | FileCheck -check-prefix=S-POWERPC %s
89 // RUN: %clangxx --target=powerpc64-unknown-netbsd -static \
90 // RUN: -stdlib=platform --sysroot=%S/Inputs/basic_netbsd_tree -### %s 2>&1 \
91 // RUN: | FileCheck -check-prefix=S-POWERPC64 %s
93 // X86_64: "-cc1" "-triple" "x86_64-unknown-netbsd"
94 // X86_64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
95 // X86_64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
96 // X86_64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
97 // X86_64: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
99 // X86_64-7: "-cc1" "-triple" "x86_64-unknown-netbsd7.0.0"
100 // X86_64-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
101 // X86_64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
102 // X86_64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
103 // X86_64-7: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
105 // ARM-7: "-cc1" "-triple" "armv5e-unknown-netbsd7.0.0-eabi"
106 // ARM-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
107 // ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
108 // ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++" "-lm" "-lc"
109 // ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
111 // AARCH64: "-cc1" "-triple" "aarch64-unknown-netbsd"
112 // AARCH64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
113 // AARCH64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
114 // AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
115 // AARCH64: "-lm" "-lc"
116 // AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
118 // AARCH64-7: "-cc1" "-triple" "aarch64-unknown-netbsd7.0.0"
119 // AARCH64-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
120 // AARCH64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
121 // AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
122 // AARCH64-7: "-lm" "-lc"
123 // AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
125 // AARCH64_BE: "-cc1" "-triple" "aarch64_be-unknown-netbsd"
126 // AARCH64_BE: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
127 // AARCH64_BE: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
128 // AARCH64_BE: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
129 // AARCH64_BE: "-lm" "-lc"
130 // AARCH64_BE: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
132 // AARCH64_BE-7: "-cc1" "-triple" "aarch64_be-unknown-netbsd7.0.0"
133 // AARCH64_BE-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
134 // AARCH64_BE-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
135 // AARCH64_BE-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
136 // AARCH64_BE-7: "-lm" "-lc"
137 // AARCH64_BE-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
139 // RISCV32: "-cc1" "-triple" "riscv32-unknown-netbsd"
140 // RISCV32: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
141 // RISCV32-SAME: "-X"
142 // RISCV32-SAME: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
143 // RISCV32-SAME: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
144 // RISCV32-SAME: "-lm" "-lc"
145 // RISCV32-SAME: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
147 // RISCV64: "-cc1" "-triple" "riscv64-unknown-netbsd"
148 // RISCV64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
149 // RISCV64-SAME: "-X"
150 // RISCV64-SAME: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
151 // RISCV64-SAME: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
152 // RISCV64-SAME: "-lm" "-lc"
153 // RISCV64-SAME: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
155 // SPARC: "-cc1" "-triple" "sparc-unknown-netbsd"
156 // SPARC: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
157 // SPARC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
158 // SPARC: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
159 // SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
160 // SPARC: "-lm" "-lc"
161 // SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
163 // SPARC-7: "-cc1" "-triple" "sparc-unknown-netbsd7.0.0"
164 // SPARC-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
165 // SPARC-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
166 // SPARC-7: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
167 // SPARC-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
168 // SPARC-7: "-lm" "-lc"
169 // SPARC-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
171 // SPARC64: "-cc1" "-triple" "sparc64-unknown-netbsd"
172 // SPARC64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
173 // SPARC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
174 // SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
175 // SPARC64: "-lm" "-lc"
176 // SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
178 // SPARC64-7: "-cc1" "-triple" "sparc64-unknown-netbsd7.0.0"
179 // SPARC64-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
180 // SPARC64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
181 // SPARC64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
182 // SPARC64-7: "-lm" "-lc"
183 // SPARC64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
185 // POWERPC: "-cc1" "-triple" "powerpc-unknown-netbsd"
186 // POWERPC: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
187 // POWERPC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
188 // POWERPC: "{{.*}}/usr/lib{{/|\\\\}}powerpc{{/|\\\\}}crti.o"
189 // POWERPC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
190 // POWERPC: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
192 // POWERPC64: "-cc1" "-triple" "powerpc64-unknown-netbsd"
193 // POWERPC64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
194 // POWERPC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
195 // POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crti.o"
196 // POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
197 // POWERPC64: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
199 // S-X86_64: "-cc1" "-triple" "x86_64-unknown-netbsd"
200 // S-X86_64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
201 // S-X86_64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
202 // S-X86_64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
203 // S-X86_64: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
205 // S-X86_64-7: "-cc1" "-triple" "x86_64-unknown-netbsd7.0.0"
206 // S-X86_64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
207 // S-X86_64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
208 // S-X86_64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
209 // S-X86_64-7: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
211 // S-ARM-7: "-cc1" "-triple" "armv5e-unknown-netbsd7.0.0-eabi"
212 // S-ARM-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
213 // S-ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
214 // S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++" "-lm" "-lc"
215 // S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
217 // S-AARCH64: "-cc1" "-triple" "aarch64-unknown-netbsd"
218 // S-AARCH64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
219 // S-AARCH64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
220 // S-AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
221 // S-AARCH64: "-lm" "-lc"
222 // S-AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
224 // S-AARCH64-7: "-cc1" "-triple" "aarch64-unknown-netbsd7.0.0"
225 // S-AARCH64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
226 // S-AARCH64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
227 // S-AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
228 // S-AARCH64-7: "-lm" "-lc"
229 // S-AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
231 // S-AARCH64_BE: "-cc1" "-triple" "aarch64_be-unknown-netbsd"
232 // S-AARCH64_BE: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
233 // S-AARCH64_BE: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
234 // S-AARCH64_BE: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
235 // S-AARCH64_BE: "-lm" "-lc"
236 // S-AARCH64_BE: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
238 // S-AARCH64_BE-7: "-cc1" "-triple" "aarch64_be-unknown-netbsd7.0.0"
239 // S-AARCH64_BE-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
240 // S-AARCH64_BE-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
241 // S-AARCH64_BE-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
242 // S-AARCH64_BE-7: "-lm" "-lc"
243 // S-AARCH64_BE-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
245 // S-RISCV32: "-cc1" "-triple" "riscv32-unknown-netbsd"
246 // S-RISCV32: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
247 // S-RISCV32-SAME: "-X"
248 // S-RISCV32-SAME: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
249 // S-RISCV32-SAME: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
250 // S-RISCV32-SAME: "-lm" "-lc"
251 // S-RISCV32-SAME: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
253 // S-RISCV64: "-cc1" "-triple" "riscv64-unknown-netbsd"
254 // S-RISCV64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
255 // S-RISCV64-SAME: "-X"
256 // S-RISCV64-SAME: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
257 // S-RISCV64-SAME: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
258 // S-RISCV64-SAME: "-lm" "-lc"
259 // S-RISCV64-SAME: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
261 // S-SPARC: "-cc1" "-triple" "sparc-unknown-netbsd"
262 // S-SPARC: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
263 // S-SPARC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
264 // S-SPARC: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
265 // S-SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
266 // S-SPARC: "-lm" "-lc"
267 // S-SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
269 // S-SPARC-7: "-cc1" "-triple" "sparc-unknown-netbsd7.0.0"
270 // S-SPARC-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
271 // S-SPARC-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
272 // S-SPARC-7: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
273 // S-SPARC-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
274 // S-SPARC-7: "-lm" "-lc"
275 // S-SPARC-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
277 // S-SPARC64: "-cc1" "-triple" "sparc64-unknown-netbsd"
278 // S-SPARC64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
279 // S-SPARC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
280 // S-SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
281 // S-SPARC64: "-lm" "-lc"
282 // S-SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
284 // S-SPARC64-7: "-cc1" "-triple" "sparc64-unknown-netbsd7.0.0"
285 // S-SPARC64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
286 // S-SPARC64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
287 // S-SPARC64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
288 // S-SPARC64-7: "-lm" "-lc"
289 // S-SPARC64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
291 // S-POWERPC: "-cc1" "-triple" "powerpc-unknown-netbsd"
292 // S-POWERPC: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
293 // S-POWERPC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
294 // S-POWERPC: "{{.*}}/usr/lib{{/|\\\\}}powerpc{{/|\\\\}}crti.o"
295 // S-POWERPC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
296 // S-POWERPC: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
298 // S-POWERPC64: "-cc1" "-triple" "powerpc64-unknown-netbsd"
299 // S-POWERPC64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
300 // S-POWERPC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
301 // S-POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crti.o"
302 // S-POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
303 // S-POWERPC64: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
305 // Check that the driver passes include paths to cc1 on NetBSD.
306 // RUN: %clang -### %s --target=x86_64-unknown-netbsd -r 2>&1 \
307 // RUN: | FileCheck %s --check-prefix=DRIVER-PASS-INCLUDES
308 // DRIVER-PASS-INCLUDES: "-cc1" {{.*}}"-resource-dir" "[[RESOURCE:[^"]+]]"
309 // DRIVER-PASS-INCLUDES: "-internal-isystem" "[[RESOURCE]]{{/|\\\\}}include"
310 // DRIVER-PASS-INCLUDES: "-internal-externc-isystem" "{{.*}}/usr/include"
312 // Test NetBSD with libstdc++ when the sysroot path ends with `/`.
313 // RUN: %clangxx -### %s 2>&1 \
314 // RUN: --target=x86_64-unknown-netbsd \
315 // RUN: -stdlib=libstdc++ \
316 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree/ \
317 // RUN: --gcc-toolchain="" \
318 // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH %s
319 // CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH: "-cc1"
320 // CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH-SAME: "-isysroot" "[[SYSROOT:[^"]+/]]"
321 // CHECK-BASIC-LIBSTDCXX-SYSROOT-SLASH-SAME: "-internal-isystem" "[[SYSROOT]]usr/include/g++"