• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd \
2 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
3 // RUN: | FileCheck -check-prefix=STATIC %s
4 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd \
5 // RUN: -pie --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
6 // RUN: | FileCheck -check-prefix=PIE %s
7 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd \
8 // RUN: -static -pie --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
9 // RUN: | FileCheck -check-prefix=STATIC-PIE %s
10 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd \
11 // RUN: -shared --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
12 // RUN: | FileCheck -check-prefix=SHARED %s
13 
14 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd \
15 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
16 // RUN: | FileCheck -check-prefix=X86_64 %s
17 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd7.0.0 \
18 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
19 // RUN: | FileCheck -check-prefix=X86_64-7 %s
20 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd6.0.0 \
21 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
22 // RUN: | FileCheck -check-prefix=X86_64-6 %s
23 // RUN: %clang -no-canonical-prefixes -target aarch64-unknown-netbsd \
24 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
25 // RUN: | FileCheck -check-prefix=AARCH64 %s
26 // RUN: %clang -no-canonical-prefixes -target aarch64-unknown-netbsd7.0.0 \
27 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
28 // RUN: | FileCheck -check-prefix=AARCH64-7 %s
29 // RUN: %clang -no-canonical-prefixes -target aarch64_be-unknown-netbsd \
30 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
31 // RUN: | FileCheck -check-prefix=AARCH64_BE %s
32 // RUN: %clang -no-canonical-prefixes -target aarch64_be-unknown-netbsd7.0.0 \
33 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
34 // RUN: | FileCheck -check-prefix=AARCH64_BE-7 %s
35 // RUN: %clang -no-canonical-prefixes -target arm-unknown-netbsd-eabi \
36 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
37 // RUN: | FileCheck -check-prefix=ARM %s
38 // RUN: %clang -no-canonical-prefixes -target armeb-unknown-netbsd-eabi \
39 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
40 // RUN: | FileCheck -check-prefix=ARMEB %s
41 // RUN: %clang -no-canonical-prefixes -target armeb-unknown-netbsd-eabi -march=armv7 \
42 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
43 // RUN: | FileCheck -check-prefix=ARMV7EB %s
44 // RUN: %clang -no-canonical-prefixes -target armv7eb-unknown-netbsd-eabi \
45 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
46 // RUN: | FileCheck -check-prefix=ARMV7EB %s
47 // RUN: %clang -r -no-canonical-prefixes -target armeb-unknown-netbsd-eabi \
48 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
49 // RUN: | FileCheck -check-prefix=ARMEB-R %s
50 // RUN: %clang -no-canonical-prefixes -target arm-unknown-netbsd \
51 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
52 // RUN: | FileCheck -check-prefix=ARM-APCS %s
53 // RUN: %clang -no-canonical-prefixes -target arm-unknown-netbsd-eabihf \
54 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
55 // RUN: | FileCheck -check-prefix=ARM-HF %s
56 // RUN: %clang -no-canonical-prefixes -target thumb-unknown-netbsd-eabi \
57 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
58 // RUN: | FileCheck -check-prefix=THUMB %s
59 // RUN: %clang -no-canonical-prefixes -target thumbeb-unknown-netbsd-eabi \
60 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
61 // RUN: | FileCheck -check-prefix=THUMBEB %s
62 // RUN: %clang -no-canonical-prefixes -target arm-unknown-netbsd7.0.0-eabi \
63 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
64 // RUN: | FileCheck -check-prefix=ARM-7 %s
65 // RUN: %clang -no-canonical-prefixes -target arm-unknown-netbsd6.0.0-eabi \
66 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
67 // RUN: | FileCheck -check-prefix=ARM-6 %s
68 // RUN: %clang -no-canonical-prefixes -target sparc-unknown-netbsd \
69 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
70 // RUN: | FileCheck -check-prefix=SPARC %s
71 // RUN: %clang -no-canonical-prefixes -target sparc64-unknown-netbsd \
72 // RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
73 // RUN: | FileCheck -check-prefix=SPARC64 %s
74 // RUN: %clang -no-canonical-prefixes -target powerpc-unknown-netbsd \
75 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
76 // RUN: | FileCheck -check-prefix=POWERPC %s
77 // RUN: %clang -no-canonical-prefixes -target powerpc64-unknown-netbsd \
78 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
79 // RUN: | FileCheck -check-prefix=POWERPC64 %s
80 
81 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd -static \
82 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
83 // RUN: | FileCheck -check-prefix=S-X86_64 %s
84 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd7.0.0 -static \
85 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
86 // RUN: | FileCheck -check-prefix=S-X86_64-7 %s
87 // RUN: %clang -no-canonical-prefixes -target x86_64-unknown-netbsd6.0.0 -static \
88 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
89 // RUN: | FileCheck -check-prefix=S-X86_64-6 %s
90 // RUN: %clang -no-canonical-prefixes -target aarch64-unknown-netbsd -static \
91 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
92 // RUN: | FileCheck -check-prefix=S-AARCH64 %s
93 // RUN: %clang -no-canonical-prefixes -target aarch64-unknown-netbsd7.0.0 -static \
94 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
95 // RUN: | FileCheck -check-prefix=S-AARCH64-7 %s
96 // RUN: %clang -no-canonical-prefixes -target aarch64_be-unknown-netbsd -static \
97 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
98 // RUN: | FileCheck -check-prefix=S-AARCH64_BE %s
99 // RUN: %clang -no-canonical-prefixes -target aarch64_be-unknown-netbsd7.0.0 -static \
100 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
101 // RUN: | FileCheck -check-prefix=S-AARCH64_BE-7 %s
102 // RUN: %clang -no-canonical-prefixes -target arm-unknown-netbsd-eabi -static \
103 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
104 // RUN: | FileCheck -check-prefix=S-ARM %s
105 // RUN: %clang -no-canonical-prefixes -target armeb-unknown-netbsd-eabi -static \
106 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
107 // RUN: | FileCheck -check-prefix=S-ARMEB %s
108 // RUN: %clang -no-canonical-prefixes -target arm-unknown-netbsd7.0.0-eabi -static \
109 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
110 // RUN: | FileCheck -check-prefix=S-ARM-7 %s
111 // RUN: %clang -no-canonical-prefixes -target arm-unknown-netbsd6.0.0-eabi -static \
112 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
113 // RUN: | FileCheck -check-prefix=S-ARM-6 %s
114 // RUN: %clang -no-canonical-prefixes -target sparc-unknown-netbsd7.0.0 -static \
115 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
116 // RUN: | FileCheck -check-prefix=S-SPARC-7 %s
117 // RUN: %clang -no-canonical-prefixes -target sparc-unknown-netbsd6.0.0 -static \
118 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
119 // RUN: | FileCheck -check-prefix=S-SPARC-6 %s
120 // RUN: %clang -no-canonical-prefixes -target sparc64-unknown-netbsd7.0.0 -static \
121 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
122 // RUN: | FileCheck -check-prefix=S-SPARC64-7 %s
123 // RUN: %clang -no-canonical-prefixes -target sparc64-unknown-netbsd6.0.0 -static \
124 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
125 // RUN: | FileCheck -check-prefix=S-SPARC64-6 %s
126 // RUN: %clang -no-canonical-prefixes -target powerpc-unknown-netbsd -static \
127 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
128 // RUN: | FileCheck -check-prefix=S-POWERPC %s
129 // RUN: %clang -no-canonical-prefixes -target powerpc64-unknown-netbsd -static \
130 // RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
131 // RUN: | FileCheck -check-prefix=S-POWERPC64 %s
132 // RUN: %clang -target x86_64-unknown-netbsd -pthread -dM -E %s \
133 // RUN: | FileCheck -check-prefix=PTHREAD %s
134 
135 // STATIC: ld{{.*}}" "--eh-frame-hdr"
136 // STATIC-NOT: "-pie"
137 // STATIC-NOT: "-Bshareable"
138 // STATIC: "-dynamic-linker" "/libexec/ld.elf_so"
139 // STATIC-NOT: "-pie"
140 // STATIC-NOT: "-Bshareable"
141 // STATIC: "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
142 // STATIC: "{{.*}}/usr/lib{{/|\\\\}}crti.o" "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o"
143 // STATIC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
144 
145 // STATIC-PIE: ld{{.*}}" "--eh-frame-hdr"
146 // STATIC-PIE-NOT: "-dynamic-linker" "/libexec/ld.elf_so"
147 // STATIC-PIE-NOT: "-Bshareable"
148 // STATIC-PIE: "-pie"
149 // STATIC-PIE-NOT: "-dynamic-linker" "/libexec/ld.elf_so"
150 // STATIC-PIE-NOT: "-Bshareable"
151 // STATIC-PIE: "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
152 // STATIC-PIE: "{{.*}}/usr/lib{{/|\\\\}}crti.o" "{{.*}}/usr/lib{{/|\\\\}}crtbeginS.o"
153 // STATIC-PIE: "{{.*}}/usr/lib{{/|\\\\}}crtendS.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
154 
155 // SHARED: ld{{.*}}" "--eh-frame-hdr"
156 // SHARED-NOT: "-pie"
157 // SHARED-NOT: "-dynamic-linker"
158 // SHARED-NOT: "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
159 // SHARED: "{{.*}}/usr/lib{{/|\\\\}}crti.o" "{{.*}}/usr/lib{{/|\\\\}}crtbeginS.o"
160 // SHARED: "{{.*}}/usr/lib{{/|\\\\}}crtendS.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
161 
162 // PIE: ld{{.*}}" "--eh-frame-hdr"
163 // PIE-NOT: "-Bshareable"
164 // PIE: "-pie" "-dynamic-linker" "/libexec/ld.elf_so"
165 // PIE-NOT: "-Bshareable"
166 // PIE: "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
167 // PIE: "{{.*}}/usr/lib{{/|\\\\}}crtbeginS.o"
168 // PIE: "{{.*}}/usr/lib{{/|\\\\}}crtendS.o"
169 // PIE: "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
170 
171 // X86_64: clang{{.*}}" "-cc1" "-triple" "x86_64-unknown-netbsd"
172 // X86_64-NOT: "-fno-use-init-array"
173 // X86_64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
174 // X86_64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
175 // X86_64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
176 // X86_64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
177 
178 // X86_64-7: clang{{.*}}" "-cc1" "-triple" "x86_64-unknown-netbsd7.0.0"
179 // X86_64-7: "-fno-use-init-array"
180 // X86_64-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
181 // X86_64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
182 // X86_64-7:  "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
183 // X86_64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
184 
185 // X86_64-6: clang{{.*}}" "-cc1" "-triple" "x86_64-unknown-netbsd6.0.0"
186 // X86_64-6: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
187 // X86_64-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
188 // X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
189 // X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
190 
191 // AARCH64: clang{{.*}}" "-cc1" "-triple" "aarch64-unknown-netbsd"
192 // AARCH64-NOT: "-fno-use-init-array"
193 // AARCH64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
194 // AARCH64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
195 // AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
196 // AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
197 
198 // AARCH64-7: clang{{.*}}" "-cc1" "-triple" "aarch64-unknown-netbsd7.0.0"
199 // AARCH64-7-NOT: "-fno-use-init-array"
200 // AARCH64-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
201 // AARCH64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
202 // AARCH64-7:  "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
203 // AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
204 
205 // AARCH64_BE: clang{{.*}}" "-cc1" "-triple" "aarch64_be-unknown-netbsd"
206 // AARCH64_BE-NOT: "-fno-use-init-array"
207 // AARCH64_BE: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
208 // AARCH64_BE: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
209 // AARCH64_BE: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
210 // AARCH64_BE: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
211 
212 // AARCH64_BE-7: clang{{.*}}" "-cc1" "-triple" "aarch64_be-unknown-netbsd7.0.0"
213 // AARCH64_BE-7-NOT: "-fno-use-init-array"
214 // AARCH64_BE-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
215 // AARCH64_BE-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
216 // AARCH64_BE-7:  "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
217 // AARCH64_BE-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
218 
219 // ARM: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd-eabi"
220 // ARM-NOT: "-fno-use-init-array"
221 // ARM: as{{.*}}" "-mcpu=arm926ej-s" "-o"
222 // ARM: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
223 // ARM: "-m" "armelf_nbsd_eabi"
224 // ARM: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
225 // ARM: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
226 // ARM: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
227 // ARM: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
228 
229 // ARMEB: clang{{.*}}" "-cc1" "-triple" "armebv5e-unknown-netbsd-eabi"
230 // ARMEB-NOT: "-fno-use-init-array"
231 // ARMEB: as{{.*}}" "-mcpu=arm926ej-s" "-o"
232 // ARMEB: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
233 // ARMEB-NOT: "--be8"
234 // ARMEB: "-m" "armelfb_nbsd_eabi"
235 // ARMEB: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
236 // ARMEB: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
237 // ARMEB: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
238 // ARMEB: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
239 // ARMV7EB: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
240 // ARMV7EB: "--be8" "-m" "armelfb_nbsd_eabi"
241 
242 // ARMEB-R: ld{{.*}}"
243 // ARMEB-R-NOT: "--be8"
244 
245 // ARM-APCS: clang{{.*}}" "-cc1" "-triple" "armv4-unknown-netbsd"
246 // ARM-APCS: as{{.*}}" "-mcpu=strongarm" "-o"
247 // ARM-APCS: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
248 // ARM-APCS: "-m" "armelf_nbsd"
249 // ARM-APCS: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
250 // ARM-APCS: "{{.*}}/usr/lib{{/|\\\\}}oabi{{/|\\\\}}crti.o"
251 // ARM-APCS: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
252 // ARM-APCS: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
253 
254 // ARM-HF: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd-eabihf"
255 // ARM-HF: as{{.*}}" "-mcpu=arm926ej-s" "-o"
256 // ARM-HF: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
257 // ARM-HF: "-m" "armelf_nbsd_eabihf"
258 // ARM-HF: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
259 // ARM-HF: "{{.*}}/usr/lib{{/|\\\\}}eabihf{{/|\\\\}}crti.o"
260 // ARM-HF: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
261 // ARM-HF: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
262 
263 // THUMB: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd-eabi"
264 // THUMB: as{{.*}}" "-mcpu=arm926ej-s" "-o"
265 // THUMB: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
266 // THUMB: "-m" "armelf_nbsd_eabi"
267 // THUMB: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
268 // THUMB: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
269 // THUMB: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
270 // THUMB: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
271 
272 // THUMBEB: clang{{.*}}" "-cc1" "-triple" "armebv5e-unknown-netbsd-eabi"
273 // THUMBEB: as{{.*}}" "-mcpu=arm926ej-s" "-o"
274 // THUMBEB: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
275 // THUMBEB: "-m" "armelfb_nbsd_eabi"
276 // THUMBEB: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
277 // THUMBEB: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
278 // THUMBEB: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
279 // THUMBEB: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
280 
281 // ARM-7: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd7.0.0-eabi"
282 // ARM-7-NOT: "-fno-use-init-array"
283 // ARM-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
284 // ARM-7: "-m" "armelf_nbsd_eabi"
285 // ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
286 // ARM-7: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
287 // ARM-7:  "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
288 // ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
289 
290 // ARM-6: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd6.0.0-eabi"
291 // ARM-6: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
292 // ARM-6: "-m" "armelf_nbsd_eabi"
293 // ARM-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
294 // ARM-6: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
295 // ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
296 // ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
297 
298 // SPARC: clang{{.*}}" "-cc1" "-triple" "sparc-unknown-netbsd"
299 // SPARC-NOT: "-fno-use-init-array"
300 // SPARC: as{{.*}}" "-32" "-Av8" "-o"
301 // SPARC: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
302 // SPARC: "-m" "elf32_sparc"
303 // SPARC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
304 // SPARC: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
305 // SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
306 // SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
307 
308 // SPARC64: clang{{.*}}" "-cc1" "-triple" "sparc64-unknown-netbsd"
309 // SPARC64-NOT: "-fno-use-init-array"
310 // SPARC64: as{{.*}}" "-64" "-Av9" "-o"
311 // SPARC64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
312 // SPARC64: "-m" "elf64_sparc"
313 // SPARC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
314 // SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
315 // SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
316 
317 // POWERPC: clang{{.*}}" "-cc1" "-triple" "powerpc-unknown-netbsd"
318 // POWERPC-NOT: "-fno-use-init-array"
319 // POWERPC: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
320 // POWERPC: "-m" "elf32ppc_nbsd"
321 // POWERPC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
322 // POWERPC: "{{.*}}/usr/lib{{/|\\\\}}powerpc{{/|\\\\}}crti.o"
323 // POWERPC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
324 // POWERPC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
325 
326 // POWERPC64: clang{{.*}}" "-cc1" "-triple" "powerpc64-unknown-netbsd"
327 // POWERPC64-NOT: "-fno-use-init-array"
328 // POWERPC64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
329 // POWERPC64: "-m" "elf64ppc"
330 // POWERPC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
331 // POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crti.o"
332 // POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
333 // POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
334 
335 // S-X86_64: clang{{.*}}" "-cc1" "-triple" "x86_64-unknown-netbsd"
336 // S-X86_64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
337 // S-X86_64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
338 // S-X86_64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
339 // S-X86_64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
340 
341 // S-X86_64-7: clang{{.*}}" "-cc1" "-triple" "x86_64-unknown-netbsd7.0.0"
342 // S-X86_64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
343 // S-X86_64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
344 // S-X86_64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
345 // S-X86_64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
346 
347 // S-X86_64-6: clang{{.*}}" "-cc1" "-triple" "x86_64-unknown-netbsd6.0.0"
348 // S-X86_64-6: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
349 // S-X86_64-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
350 // S-X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
351 // S-X86_64-6: "-lgcc_eh" "-lc" "-lgcc"
352 // S-X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
353 
354 // S-AARCH64: clang{{.*}}" "-cc1" "-triple" "aarch64-unknown-netbsd"
355 // S-AARCH64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
356 // S-AARCH64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
357 // S-AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
358 // S-AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
359 
360 // S-AARCH64-7: clang{{.*}}" "-cc1" "-triple" "aarch64-unknown-netbsd7.0.0"
361 // S-AARCH64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
362 // S-AARCH64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
363 // S-AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
364 // S-AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
365 
366 // S-AARCH64_BE: clang{{.*}}" "-cc1" "-triple" "aarch64_be-unknown-netbsd"
367 // S-AARCH64_BE: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
368 // S-AARCH64_BE: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
369 // S-AARCH64_BE: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
370 // S-AARCH64_BE: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
371 
372 // S-AARCH64_BE-7: clang{{.*}}" "-cc1" "-triple" "aarch64_be-unknown-netbsd7.0.0"
373 // S-AARCH64_BE-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
374 // S-AARCH64_BE-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
375 // S-AARCH64_BE-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
376 // S-AARCH64_BE-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
377 
378 // S-ARM: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd-eabi"
379 // S-ARM: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
380 // S-ARM: "-m" "armelf_nbsd_eabi"
381 // S-ARM: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
382 // S-ARM: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
383 // S-ARM: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
384 // S-ARM: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
385 
386 // S-ARMEB: clang{{.*}}" "-cc1" "-triple" "armebv5e-unknown-netbsd-eabi"
387 // S-ARMEB: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
388 // S-ARMEB: "-m" "armelfb_nbsd_eabi"
389 // S-ARMEB: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
390 // S-ARMEB: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
391 // S-ARMEB: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
392 // S-ARMEB: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
393 
394 // S-ARM-7: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd7.0.0-eabi"
395 // S-ARM-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
396 // S-ARM-7: "-m" "armelf_nbsd_eabi"
397 // S-ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
398 // S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
399 // S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
400 // S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
401 
402 // S-ARM-6: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd6.0.0-eabi"
403 // S-ARM-6: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
404 // S-ARM-6: "-m" "armelf_nbsd_eabi"
405 // S-ARM-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
406 // S-ARM-6: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
407 // S-ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
408 // S-ARM-6: "-lgcc_eh" "-lc" "-lgcc"
409 // S-ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
410 
411 // S-SPARC-6: clang{{.*}}" "-cc1" "-triple" "sparc-unknown-netbsd6.0.0"
412 // S-SPARC-6: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
413 // S-SPARC-6: "-m" "elf32_sparc"
414 // S-SPARC-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
415 // S-SPARC-6: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
416 // S-SPARC-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
417 // S-SPARC-6: "-lgcc_eh" "-lc" "-lgcc"
418 // S-SPARC-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
419 
420 // S-SPARC-7: clang{{.*}}" "-cc1" "-triple" "sparc-unknown-netbsd7.0.0"
421 // S-SPARC-7: "-fno-use-init-array"
422 // S-SPARC-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
423 // S-SPARC-7: "-m" "elf32_sparc"
424 // S-SPARC-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
425 // S-SPARC-7: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
426 // S-SPARC-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
427 // S-SPARC-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
428 
429 // S-SPARC64-6: clang{{.*}}" "-cc1" "-triple" "sparc64-unknown-netbsd6.0.0"
430 // S-SPARC64-6: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
431 // S-SPARC64-6: "-m" "elf64_sparc"
432 // S-SPARC64-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
433 // S-SPARC64-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
434 // S-SPARC64-6: "-lgcc_eh" "-lc" "-lgcc"
435 // S-SPARC64-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
436 
437 // S-SPARC64-7: clang{{.*}}" "-cc1" "-triple" "sparc64-unknown-netbsd7.0.0"
438 // S-SPARC64-7: "-fno-use-init-array"
439 // S-SPARC64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
440 // S-SPARC64-7: "-m" "elf64_sparc"
441 // S-SPARC64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
442 // S-SPARC64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
443 // S-SPARC64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
444 
445 // S-POWERPC: clang{{.*}}" "-cc1" "-triple" "powerpc-unknown-netbsd"
446 // S-POWERPC: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
447 // S-POWERPC: "-m" "elf32ppc_nbsd"
448 // S-POWERPC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
449 // S-POWERPC: "{{.*}}/usr/lib{{/|\\\\}}powerpc{{/|\\\\}}crti.o"
450 // S-POWERPC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
451 // S-POWERPC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
452 
453 // S-POWERPC64: clang{{.*}}" "-cc1" "-triple" "powerpc64-unknown-netbsd"
454 // S-POWERPC64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
455 // S-POWERPC64: "-m" "elf64ppc"
456 // S-POWERPC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
457 // S-POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crti.o"
458 // S-POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
459 // S-POWERPC64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
460 
461 // PTHREAD-NOT: _POSIX_THREADS
462 // PTHREAD:     _REENTRANT
463 // PTHREAD-NOT: _POSIX_THREADS
464 
465 // Check PowerPC for Secure PLT
466 // RUN: %clang -target powerpc-unknown-netbsd -### -c %s 2>&1 \
467 // RUN:   | FileCheck -check-prefix=POWERPC-SECUREPLT %s
468 // POWERPC-SECUREPLT: "-target-feature" "+secure-plt"
469