blob: 5bd85f6cb29f53141997cb8d9f4b4f5face60776 [file] [log] [blame]
Rafael Espindola238b6a92012-10-09 20:46:28 +00001// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd %s -### 2>&1 \
Eric Christopherdc6cc872012-09-13 06:32:34 +00002// RUN: | FileCheck --check-prefix=CHECK-LD %s
3// CHECK-LD: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
4// 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"
Daniel Dunbarf7b8eec2009-06-29 20:52:51 +00005
Rafael Espindola238b6a92012-10-09 20:46:28 +00006// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -pg -pthread %s -### 2>&1 \
Eric Christopherdc6cc872012-09-13 06:32:34 +00007// RUN: | FileCheck --check-prefix=CHECK-PG %s
8// CHECK-PG: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
9// CHECK-PG: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lpthread_p" "-lc_p" "-lgcc" "{{.*}}crtend.o"
Rafael Espindola6cc2a682012-12-31 22:41:36 +000010
11// Check that the new linker flags are passed to OpenBSD
12// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -r %s -### 2>&1 \
13// RUN: | FileCheck --check-prefix=CHECK-LD-R %s
14// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -s %s -### 2>&1 \
15// RUN: | FileCheck --check-prefix=CHECK-LD-S %s
16// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -t %s -### 2>&1 \
17// RUN: | FileCheck --check-prefix=CHECK-LD-T %s
18// RUN: %clang -no-canonical-prefixes -target i686-pc-openbsd -Z %s -### 2>&1 \
19// RUN: | FileCheck --check-prefix=CHECK-LD-Z %s
20// CHECK-LD-R: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
21// 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// CHECK-LD-S: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
23// 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// CHECK-LD-T: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
25// 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// CHECK-LD-Z: clang{{.*}}" "-cc1" "-triple" "i686-pc-openbsd"
27// 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"