1 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
2 | // RUN: --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr \ |
3 | // RUN: --target=i386-unknown-linux-gnu \ |
4 | // RUN: | FileCheck --check-prefix=CHECK-I386 %s |
5 | // CHECK-I386: "-cc1" "-triple" "i386-unknown-linux-gnu" |
6 | // CHECK-I386: "{{.*}}/Inputs/basic_cross_linux_tree/usr/lib/gcc/i386-unknown-linux-gnu/4.6.0/../../../../i386-unknown-linux-gnu/bin{{/|\\\\}}as" "--32" |
7 | // CHECK-I386: "{{.*}}/Inputs/basic_cross_linux_tree/usr/lib/gcc/i386-unknown-linux-gnu/4.6.0/../../../../i386-unknown-linux-gnu/bin{{/|\\\\}}ld" {{.*}} "-m" "elf_i386" |
8 | // |
9 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
10 | // RUN: --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr \ |
11 | // RUN: --target=x86_64-unknown-linux-gnu \ |
12 | // RUN: | FileCheck --check-prefix=CHECK-X86-64 %s |
13 | // CHECK-X86-64: "-cc1" "-triple" "x86_64-unknown-linux-gnu" |
14 | // CHECK-X86-64: "{{.*}}/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/bin{{/|\\\\}}as" "--64" |
15 | // CHECK-X86-64: "{{.*}}/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/bin{{/|\\\\}}ld" {{.*}} "-m" "elf_x86_64" |
16 | // |
17 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
18 | // RUN: --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr \ |
19 | // RUN: --target=x86_64-unknown-linux-gnux32 \ |
20 | // RUN: | FileCheck --check-prefix=CHECK-X32 %s |
21 | // CHECK-X32: "-cc1" "-triple" "x86_64-unknown-linux-gnux32" |
22 | // CHECK-X32: "{{.*}}/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/bin{{/|\\\\}}as" "--x32" |
23 | // CHECK-X32: "{{.*}}/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/bin{{/|\\\\}}ld" {{.*}} "-m" "elf32_x86_64" |
24 | // |
25 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
26 | // RUN: --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr \ |
27 | // RUN: --target=x86_64-unknown-linux-gnu -m32 \ |
28 | // RUN: | FileCheck --check-prefix=CHECK-I386 %s |
29 | // |
30 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
31 | // RUN: --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr \ |
32 | // RUN: --target=i386-unknown-linux-gnu -m64 \ |
33 | // RUN: | FileCheck --check-prefix=CHECK-X86-64 %s |
34 | // |
35 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
36 | // RUN: --gcc-toolchain=%S/Inputs/multilib_32bit_linux_tree/usr \ |
37 | // RUN: --target=i386-unknown-linux \ |
38 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
39 | // RUN: | FileCheck --check-prefix=CHECK-MULTI32-I386 %s |
40 | // CHECK-MULTI32-I386: "-cc1" "-triple" "i386-unknown-linux" |
41 | // CHECK-MULTI32-I386: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}as" "--32" |
42 | // CHECK-MULTI32-I386: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld" |
43 | // CHECK-MULTI32-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" |
44 | // CHECK-MULTI32-I386: "-m" "elf_i386" |
45 | // CHECK-MULTI32-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]{{/|\\\\}}crtbegin.o" |
46 | // CHECK-MULTI32-I386: "-L[[gcc_install]]" |
47 | // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib32" |
48 | // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib" |
49 | // CHECK-MULTI32-I386: "-L[[sysroot]]/lib" |
50 | // CHECK-MULTI32-I386: "-L[[sysroot]]/usr/lib" |
51 | // |
52 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
53 | // RUN: --gcc-toolchain=%S/Inputs/multilib_32bit_linux_tree/usr \ |
54 | // RUN: --target=x86_64-unknown-linux \ |
55 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
56 | // RUN: | FileCheck --check-prefix=CHECK-MULTI32-X86-64 %s |
57 | // CHECK-MULTI32-X86-64: "-cc1" "-triple" "x86_64-unknown-linux" |
58 | // CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}as" "--64" |
59 | // CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld" |
60 | // CHECK-MULTI32-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" |
61 | // CHECK-MULTI32-X86-64: "-m" "elf_x86_64" |
62 | // CHECK-MULTI32-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]/64{{/|\\\\}}crtbegin.o" |
63 | // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/64" |
64 | // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib64" |
65 | // CHECK-MULTI32-X86-64: "-L[[gcc_install]]" |
66 | // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib" |
67 | // CHECK-MULTI32-X86-64: "-L[[sysroot]]/lib" |
68 | // CHECK-MULTI32-X86-64: "-L[[sysroot]]/usr/lib" |
69 | // |
70 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
71 | // RUN: --gcc-toolchain=%S/Inputs/multilib_64bit_linux_tree/usr \ |
72 | // RUN: --target=i386-unknown-linux \ |
73 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
74 | // RUN: | FileCheck --check-prefix=CHECK-MULTI64-I386 %s |
75 | // CHECK-MULTI64-I386: "-cc1" "-triple" "i386-unknown-linux" |
76 | // CHECK-MULTI64-I386: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}as" "--32" |
77 | // CHECK-MULTI64-I386: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld" |
78 | // CHECK-MULTI64-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" |
79 | // CHECK-MULTI64-I386: "-m" "elf_i386" |
80 | // CHECK-MULTI64-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]/32{{/|\\\\}}crtbegin.o" |
81 | // CHECK-MULTI64-I386: "-L[[gcc_install]]/32" |
82 | // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib32" |
83 | // CHECK-MULTI64-I386: "-L[[gcc_install]]" |
84 | // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib" |
85 | // CHECK-MULTI64-I386: "-L[[sysroot]]/lib" |
86 | // CHECK-MULTI64-I386: "-L[[sysroot]]/usr/lib" |
87 | // |
88 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
89 | // RUN: --gcc-toolchain=%S/Inputs/multilib_64bit_linux_tree/usr \ |
90 | // RUN: --target=x86_64-unknown-linux \ |
91 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
92 | // RUN: | FileCheck --check-prefix=CHECK-MULTI64-X86-64 %s |
93 | // CHECK-MULTI64-X86-64: "-cc1" "-triple" "x86_64-unknown-linux" |
94 | // CHECK-MULTI64-X86-64: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}as" "--64" |
95 | // CHECK-MULTI64-X86-64: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld" |
96 | // CHECK-MULTI64-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" |
97 | // CHECK-MULTI64-X86-64: "-m" "elf_x86_64" |
98 | // CHECK-MULTI64-X86-64: "crti.o" "[[gcc_install:.*/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0]]{{/|\\\\}}crtbegin.o" |
99 | // CHECK-MULTI64-X86-64: "-L[[gcc_install]]" |
100 | // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib64" |
101 | // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib" |
102 | // CHECK-MULTI64-X86-64: "-L[[sysroot]]/lib" |
103 | // CHECK-MULTI64-X86-64: "-L[[sysroot]]/usr/lib" |
104 | |