xref: /minix3/external/bsd/llvm/dist/clang/test/Driver/openbsd.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd %s -### 2>&1 \
2*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-LD %s
3*f4a2713aSLionel Sambuc // CHECK-LD: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
4*f4a2713aSLionel Sambuc // CHECK-LD: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o"
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -pg -pthread %s -### 2>&1 \
7*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-PG %s
8*f4a2713aSLionel Sambuc // CHECK-PG: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
9*f4a2713aSLionel Sambuc // CHECK-PG: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}gcrt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lpthread_p" "-lc_p" "-lgcc" "{{.*}}crtend.o"
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc // Check that the new linker flags are passed to OpenBSD
12*f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -r %s -### 2>&1 \
13*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-LD-R %s
14*f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -s %s -### 2>&1 \
15*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-LD-S %s
16*f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -t %s -### 2>&1 \
17*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-LD-T %s
18*f4a2713aSLionel Sambuc // RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -Z %s -### 2>&1 \
19*f4a2713aSLionel Sambuc // RUN:   | FileCheck --check-prefix=CHECK-LD-Z %s
20*f4a2713aSLionel Sambuc // CHECK-LD-R: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
21*f4a2713aSLionel Sambuc // CHECK-LD-R: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "-L{{.*}}" "-r" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o"
22*f4a2713aSLionel Sambuc // CHECK-LD-S: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
23*f4a2713aSLionel Sambuc // CHECK-LD-S: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "-L{{.*}}" "-s" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o"
24*f4a2713aSLionel Sambuc // CHECK-LD-T: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
25*f4a2713aSLionel Sambuc // CHECK-LD-T: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "-L{{.*}}" "-t" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o"
26*f4a2713aSLionel Sambuc // CHECK-LD-Z: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
27*f4a2713aSLionel Sambuc // CHECK-LD-Z: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "-L{{.*}}" "-Z" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o"
28