• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:   --rtlib=platform \
56 // RUN:   --sysroot=%S/Inputs/basic_linux_tree \
57 // RUN:   | FileCheck --check-prefix=CHECK-MULTI32-X86-64 %s
58 // CHECK-MULTI32-X86-64: "-cc1" "-triple" "x86_64-unknown-linux"
59 // CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}as" "--64"
60 // CHECK-MULTI32-X86-64: "{{.*}}/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/bin{{/|\\\\}}ld"
61 // CHECK-MULTI32-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]"
62 // CHECK-MULTI32-X86-64: "-m" "elf_x86_64"
63 // 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"
64 // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/64"
65 // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib64"
66 // CHECK-MULTI32-X86-64: "-L[[gcc_install]]"
67 // CHECK-MULTI32-X86-64: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib"
68 // CHECK-MULTI32-X86-64: "-L[[sysroot]]/lib"
69 // CHECK-MULTI32-X86-64: "-L[[sysroot]]/usr/lib"
70 //
71 // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \
72 // RUN:   --gcc-toolchain=%S/Inputs/multilib_64bit_linux_tree/usr \
73 // RUN:   --target=i386-unknown-linux \
74 // RUN:   --rtlib=platform \
75 // RUN:   --sysroot=%S/Inputs/basic_linux_tree \
76 // RUN:   | FileCheck --check-prefix=CHECK-MULTI64-I386 %s
77 // CHECK-MULTI64-I386: "-cc1" "-triple" "i386-unknown-linux"
78 // 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"
79 // CHECK-MULTI64-I386: "{{.*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/bin{{/|\\\\}}ld"
80 // CHECK-MULTI64-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]"
81 // CHECK-MULTI64-I386: "-m" "elf_i386"
82 // 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"
83 // CHECK-MULTI64-I386: "-L[[gcc_install]]/32"
84 // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib32"
85 // CHECK-MULTI64-I386: "-L[[gcc_install]]"
86 // CHECK-MULTI64-I386: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib"
87 // CHECK-MULTI64-I386: "-L[[sysroot]]/lib"
88 // CHECK-MULTI64-I386: "-L[[sysroot]]/usr/lib"
89 //
90 // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \
91 // RUN:   --gcc-toolchain=%S/Inputs/multilib_64bit_linux_tree/usr \
92 // RUN:   --target=x86_64-unknown-linux \
93 // RUN:   --rtlib=platform \
94 // RUN:   --sysroot=%S/Inputs/basic_linux_tree \
95 // RUN:   | FileCheck --check-prefix=CHECK-MULTI64-X86-64 %s
96 // CHECK-MULTI64-X86-64: "-cc1" "-triple" "x86_64-unknown-linux"
97 // 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"
98 // 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"
99 // CHECK-MULTI64-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]"
100 // CHECK-MULTI64-X86-64: "-m" "elf_x86_64"
101 // 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"
102 // CHECK-MULTI64-X86-64: "-L[[gcc_install]]"
103 // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib64"
104 // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib"
105 // CHECK-MULTI64-X86-64: "-L[[sysroot]]/lib"
106 // CHECK-MULTI64-X86-64: "-L[[sysroot]]/usr/lib"
107