Jonas Hahnfeld | 1cdcf8f | 2017-01-08 10:04:07 +0000 | [diff] [blame] | 1 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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" |
Reid Kleckner | 74a6816 | 2014-08-05 22:39:07 +0000 | [diff] [blame] | 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" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 8 | // |
Jonas Hahnfeld | 1cdcf8f | 2017-01-08 10:04:07 +0000 | [diff] [blame] | 9 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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" |
Reid Kleckner | 74a6816 | 2014-08-05 22:39:07 +0000 | [diff] [blame] | 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" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 16 | // |
Jonas Hahnfeld | 1cdcf8f | 2017-01-08 10:04:07 +0000 | [diff] [blame] | 17 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 18 | // RUN: --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr \ |
Zinovy Nis | 1db9573 | 2014-07-10 15:27:19 +0000 | [diff] [blame] | 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" |
Reid Kleckner | 74a6816 | 2014-08-05 22:39:07 +0000 | [diff] [blame] | 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" |
Zinovy Nis | 1db9573 | 2014-07-10 15:27:19 +0000 | [diff] [blame] | 24 | // |
Jonas Hahnfeld | 1cdcf8f | 2017-01-08 10:04:07 +0000 | [diff] [blame] | 25 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
Zinovy Nis | 1db9573 | 2014-07-10 15:27:19 +0000 | [diff] [blame] | 26 | // RUN: --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr \ |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 27 | // RUN: --target=x86_64-unknown-linux-gnu -m32 \ |
| 28 | // RUN: | FileCheck --check-prefix=CHECK-I386 %s |
| 29 | // |
Jonas Hahnfeld | 1cdcf8f | 2017-01-08 10:04:07 +0000 | [diff] [blame] | 30 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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 | // |
Jonas Hahnfeld | 1cdcf8f | 2017-01-08 10:04:07 +0000 | [diff] [blame] | 35 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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" |
Reid Kleckner | 74a6816 | 2014-08-05 22:39:07 +0000 | [diff] [blame] | 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" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 43 | // CHECK-MULTI32-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" |
| 44 | // CHECK-MULTI32-I386: "-m" "elf_i386" |
Chandler Carruth | cc512ed | 2013-07-31 11:14:13 +0000 | [diff] [blame] | 45 | // CHECK-MULTI32-I386: "crti.o" "[[gcc_install:.*/Inputs/multilib_32bit_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0]]{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 46 | // CHECK-MULTI32-I386: "-L[[gcc_install]]" |
Rafael Espindola | a839855 | 2013-10-28 23:14:34 +0000 | [diff] [blame] | 47 | // CHECK-MULTI32-I386: "-L[[gcc_install]]/../../../../i386-unknown-linux/lib/../lib32" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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 | // |
Jonas Hahnfeld | 1cdcf8f | 2017-01-08 10:04:07 +0000 | [diff] [blame] | 52 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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" |
Reid Kleckner | 74a6816 | 2014-08-05 22:39:07 +0000 | [diff] [blame] | 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" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 60 | // CHECK-MULTI32-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" |
| 61 | // CHECK-MULTI32-X86-64: "-m" "elf_x86_64" |
Chandler Carruth | cc512ed | 2013-07-31 11:14:13 +0000 | [diff] [blame] | 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" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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 | // |
Jonas Hahnfeld | 1cdcf8f | 2017-01-08 10:04:07 +0000 | [diff] [blame] | 70 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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" |
Reid Kleckner | 74a6816 | 2014-08-05 22:39:07 +0000 | [diff] [blame] | 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" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 78 | // CHECK-MULTI64-I386: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" |
| 79 | // CHECK-MULTI64-I386: "-m" "elf_i386" |
Chandler Carruth | cc512ed | 2013-07-31 11:14:13 +0000 | [diff] [blame] | 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" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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 | // |
Jonas Hahnfeld | 1cdcf8f | 2017-01-08 10:04:07 +0000 | [diff] [blame] | 88 | // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \ |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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" |
Reid Kleckner | 74a6816 | 2014-08-05 22:39:07 +0000 | [diff] [blame] | 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" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 96 | // CHECK-MULTI64-X86-64: "--sysroot=[[sysroot:.*/Inputs/basic_linux_tree]]" |
| 97 | // CHECK-MULTI64-X86-64: "-m" "elf_x86_64" |
Chandler Carruth | cc512ed | 2013-07-31 11:14:13 +0000 | [diff] [blame] | 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" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 99 | // CHECK-MULTI64-X86-64: "-L[[gcc_install]]" |
Rafael Espindola | a839855 | 2013-10-28 23:14:34 +0000 | [diff] [blame] | 100 | // CHECK-MULTI64-X86-64: "-L[[gcc_install]]/../../../../x86_64-unknown-linux/lib/../lib64" |
Chandler Carruth | 7f8042c | 2013-07-31 00:37:07 +0000 | [diff] [blame] | 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" |