1 // General tests that the correct versions of values-*.o are used on
2 // Solaris targets sane. Note that we use sysroot to make these tests
3 // independent of the host system.
4 
5 // Check sparc-sun-solaris2.11, 32bit
6 // RUN: %clang -no-canonical-prefixes -ansi %s -### -o %t.o 2>&1 \
7 // RUN:     --target=sparc-sun-solaris2.11 \
8 // RUN:     --gcc-toolchain="" \
9 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
10 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-ANSI %s
11 // CHECK-LD-SPARC32-ANSI: values-Xc.o
12 // CHECK-LD-SPARC32-ANSI: values-xpg6.o
13 
14 // RUN: %clang -no-canonical-prefixes -std=c89 %s -### -o %t.o 2>&1 \
15 // RUN:     --target=sparc-sun-solaris2.11 \
16 // RUN:     --gcc-toolchain="" \
17 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
18 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-C89 %s
19 // CHECK-LD-SPARC32-C89: values-Xc.o
20 // CHECK-LD-SPARC32-C89: values-xpg4.o
21 
22 // RUN: %clang -no-canonical-prefixes -std=c90 %s -### -o %t.o 2>&1 \
23 // RUN:     --target=sparc-sun-solaris2.11 \
24 // RUN:     --gcc-toolchain="" \
25 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
26 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-C90 %s
27 // CHECK-LD-SPARC32-C90: values-Xc.o
28 // CHECK-LD-SPARC32-C90: values-xpg4.o
29 
30 // RUN: %clang -no-canonical-prefixes -std=iso9899:199409 %s -### -o %t.o 2>&1 \
31 // RUN:     --target=sparc-sun-solaris2.11 \
32 // RUN:     --gcc-toolchain="" \
33 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
34 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-C94 %s
35 // CHECK-LD-SPARC32-C94: values-Xc.o
36 // CHECK-LD-SPARC32-C94: values-xpg4.o
37 
38 // RUN: %clang -no-canonical-prefixes -std=c11 %s -### -o %t.o 2>&1 \
39 // RUN:     --target=sparc-sun-solaris2.11 \
40 // RUN:     --gcc-toolchain="" \
41 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
42 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-C11 %s
43 // CHECK-LD-SPARC32-C11: values-Xc.o
44 // CHECK-LD-SPARC32-C11: values-xpg6.o
45 
46 // RUN: %clang -no-canonical-prefixes -std=gnu89 %s -### -o %t.o 2>&1 \
47 // RUN:     --target=sparc-sun-solaris2.11 \
48 // RUN:     --gcc-toolchain="" \
49 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
50 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-GNU89 %s
51 // CHECK-LD-SPARC32-GNU89: values-Xa.o
52 // CHECK-LD-SPARC32-GNU89: values-xpg4.o
53 
54 // RUN: %clang -no-canonical-prefixes -std=gnu90 %s -### -o %t.o 2>&1 \
55 // RUN:     --target=sparc-sun-solaris2.11 \
56 // RUN:     --gcc-toolchain="" \
57 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
58 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-GNU90 %s
59 // CHECK-LD-SPARC32-GNU90: values-Xa.o
60 // CHECK-LD-SPARC32-GNU90: values-xpg4.o
61 
62 // RUN: %clang -no-canonical-prefixes -std=gnu11 %s -### -o %t.o 2>&1 \
63 // RUN:     --target=sparc-sun-solaris2.11 \
64 // RUN:     --gcc-toolchain="" \
65 // RUN:     --sysroot=%S/Inputs/solaris_sparc_tree \
66 // RUN:   | FileCheck --check-prefix=CHECK-LD-SPARC32-GNU11 %s
67 // CHECK-LD-SPARC32-GNU11: values-Xa.o
68 // CHECK-LD-SPARC32-GNU11: values-xpg6.o
69 
70 // Check i386-pc-solaris2.11, 32bit
71 // RUN: %clang -no-canonical-prefixes -ansi %s -### -o %t.o 2>&1 \
72 // RUN:     --target=i386-pc-solaris2.11 \
73 // RUN:     --gcc-toolchain="" \
74 // RUN:     --sysroot=%S/Inputs/solaris_x86_tree \
75 // RUN:   | FileCheck --check-prefix=CHECK-LD-X32-ANSI %s
76 // CHECK-LD-X32-ANSI: values-Xc.o
77 // CHECK-LD-X32-ANSI: values-xpg6.o
78