1 /// Check that clang can handle both old-style (32) and new-style (sparcv8plus)
2 /// 32-bit sparc multilib subdirs.
4 /// Check sparc-sun-solaris2.11, 32-bit, GCC 4.8 tree
5 // RUN: %clang -v 2>&1 --target=sparc-sun-solaris2.11 \
6 // RUN: --gcc-toolchain=%S/Inputs/solaris_sparc_tree/usr/gcc/4.8 \
7 // RUN: | FileCheck --check-prefix=CHECK-SPARC32-GCC48 %s
8 // CHECK-SPARC32-GCC48: Selected GCC installation: {{.*}}4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2
9 // CHECK-SPARC32-GCC48-NEXT: Candidate multilib: .;@m32
10 // CHECK-SPARC32-GCC48-NEXT: Candidate multilib: sparcv9;@m64
11 // CHECK-SPARC32-GCC48-NEXT: Selected multilib: .;@m32
13 /// Check sparc-sun-solaris2.11, 32-bit, GCC 10 tree
14 // RUN: %clang -v 2>&1 --target=sparc-sun-solaris2.11 \
15 // RUN: --gcc-toolchain=%S/Inputs/solaris_sparc32_tree/usr/gcc/10 \
16 // RUN: | FileCheck --check-prefix=CHECK-SPARC32-GCC10 %s
17 // CHECK-SPARC32-GCC10: Selected GCC installation: {{.*}}10/lib/gcc/sparcv9-sun-solaris2.11/10.4.0
18 // CHECK-SPARC32-GCC10-NEXT: Candidate multilib: .;@m64
19 // CHECK-SPARC32-GCC10-NEXT: Candidate multilib: 32;@m32
20 // CHECK-SPARC32-GCC10-NEXT: Selected multilib: 32;@m32
22 /// Check sparc-sun-solaris2.11, 32-bit, GCC 11 tree
23 // RUN: %clang -v 2>&1 --target=sparc-sun-solaris2.11 \
24 // RUN: --gcc-toolchain=%S/Inputs/solaris_sparcv8+_tree/usr/gcc/11 \
25 // RUN: | FileCheck --check-prefix=CHECK-SPARC32-GCC11 %s
26 // CHECK-SPARC32-GCC11: Selected GCC installation: {{.*}}11/lib/gcc/sparcv9-sun-solaris2.11/11.3.0
27 // CHECK-SPARC32-GCC11-NEXT: Candidate multilib: .;@m64
28 // CHECK-SPARC32-GCC11-NEXT: Candidate multilib: sparcv8plus;@m32
29 // CHECK-SPARC32-GCC11-NEXT: Selected multilib: sparcv8plus;@m32
31 /// Check sparcv9-sun-solaris2.11, 64-bit, GCC 4.8 tree
32 // RUN: %clang -v 2>&1 --target=sparcv9-sun-solaris2.11 \
33 // RUN: --gcc-toolchain=%S/Inputs/solaris_sparc_tree/usr/gcc/4.8 \
34 // RUN: | FileCheck --check-prefix=CHECK-SPARC64-GCC48 %s
35 // CHECK-SPARC64-GCC48: Selected GCC installation: {{.*}}gcc/4.8/lib/gcc/sparc-sun-solaris2.11/4.8.2
36 // CHECK-SPARC64-GCC48-NEXT: Candidate multilib: .;@m32
37 // CHECK-SPARC64-GCC48-NEXT: Candidate multilib: sparcv9;@m64
38 // CHECK-SPARC64-GCC48-NEXT: Selected multilib: sparcv9;@m64
40 /// Check sparcv9-sun-solaris2.11, 64-bit, GCC 10 tree
41 // RUN: %clang -v 2>&1 --target=sparcv9-sun-solaris2.11 \
42 // RUN: --gcc-toolchain=%S/Inputs/solaris_sparc32_tree/usr/gcc/10 \
43 // RUN: | FileCheck --check-prefix=CHECK-SPARC64-GCC10 %s
44 // CHECK-SPARC64-GCC10: Selected GCC installation: {{.*}}10/lib/gcc/sparcv9-sun-solaris2.11/10.4.0
45 // CHECK-SPARC64-GCC10-NEXT: Candidate multilib: .;@m64
46 // CHECK-SPARC64-GCC10-NEXT: Candidate multilib: 32;@m32
47 // CHECK-SPARC64-GCC10-NEXT: Selected multilib: .;@m64
49 /// Check sparcv9-sun-solaris2.11, 64-bit, GCC 11 tree
50 // RUN: %clang -v 2>&1 --target=sparcv9-sun-solaris2.11 \
51 // RUN: --gcc-toolchain=%S/Inputs/solaris_sparcv8+_tree/usr/gcc/11 \
52 // RUN: | FileCheck --check-prefix=CHECK-SPARC64-GCC11 %s
53 // CHECK-SPARC64-GCC11: Selected GCC installation: {{.*}}11/lib/gcc/sparcv9-sun-solaris2.11/11.3.0
54 // CHECK-SPARC64-GCC11-NEXT: Candidate multilib: .;@m64
55 // CHECK-SPARC64-GCC11-NEXT: Candidate multilib: sparcv8plus;@m32
56 // CHECK-SPARC64-GCC11-NEXT: Selected multilib: .;@m64