Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 1 | // General tests that ld invocations on Linux targets sane. Note that we use |
| 2 | // sysroot to make these tests independent of the host system. |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 3 | // |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 4 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 5 | // RUN: --target=i386-unknown-linux \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 6 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 7 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 8 | // RUN: | FileCheck --check-prefix=CHECK-LD-32 %s |
Chandler Carruth | 68f94db | 2013-03-04 02:07:55 +0000 | [diff] [blame] | 9 | // CHECK-LD-32-NOT: warning: |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 10 | // CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 11 | // CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 663abc9 | 2011-10-03 08:02:58 +0000 | [diff] [blame] | 12 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0" |
Chandler Carruth | 621e6a6 | 2011-10-03 08:09:02 +0000 | [diff] [blame] | 13 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib" |
Chandler Carruth | 663abc9 | 2011-10-03 08:02:58 +0000 | [diff] [blame] | 14 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.." |
| 15 | // CHECK-LD-32: "-L[[SYSROOT]]/lib" |
| 16 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 17 | // |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 18 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 19 | // RUN: --target=x86_64-unknown-linux \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 20 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 21 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 22 | // RUN: | FileCheck --check-prefix=CHECK-LD-64 %s |
Chandler Carruth | 68f94db | 2013-03-04 02:07:55 +0000 | [diff] [blame] | 23 | // CHECK-LD-64-NOT: warning: |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 24 | // CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 25 | // CHECK-LD-64: "--eh-frame-hdr" |
| 26 | // CHECK-LD-64: "-m" "elf_x86_64" |
| 27 | // CHECK-LD-64: "-dynamic-linker" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 28 | // CHECK-LD-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 663abc9 | 2011-10-03 08:02:58 +0000 | [diff] [blame] | 29 | // CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
Chandler Carruth | 621e6a6 | 2011-10-03 08:09:02 +0000 | [diff] [blame] | 30 | // CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
Chandler Carruth | 663abc9 | 2011-10-03 08:02:58 +0000 | [diff] [blame] | 31 | // CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 32 | // CHECK-LD-64: "-L[[SYSROOT]]/lib" |
| 33 | // CHECK-LD-64: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 34 | // CHECK-LD-64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" |
| 35 | // CHECK-LD-64: "-lc" |
| 36 | // CHECK-LD-64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" |
| 37 | // |
| 38 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 39 | // RUN: --target=x86_64-unknown-linux-gnux32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 40 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 41 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 42 | // RUN: | FileCheck --check-prefix=CHECK-LD-X32 %s |
| 43 | // CHECK-LD-X32-NOT: warning: |
| 44 | // CHECK-LD-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 45 | // CHECK-LD-X32: "--eh-frame-hdr" |
| 46 | // CHECK-LD-X32: "-m" "elf32_x86_64" |
| 47 | // CHECK-LD-X32: "-dynamic-linker" |
| 48 | // CHECK-LD-X32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" |
| 49 | // CHECK-LD-X32: "-lc" |
| 50 | // CHECK-LD-X32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" |
| 51 | // |
| 52 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 53 | // RUN: --target=x86_64-unknown-linux \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 54 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 55 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 56 | // RUN: --rtlib=compiler-rt \ |
| 57 | // RUN: | FileCheck --check-prefix=CHECK-LD-RT %s |
| 58 | // CHECK-LD-RT-NOT: warning: |
| 59 | // CHECK-LD-RT: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 60 | // CHECK-LD-RT: "--eh-frame-hdr" |
| 61 | // CHECK-LD-RT: "-m" "elf_x86_64" |
| 62 | // CHECK-LD-RT: "-dynamic-linker" |
| 63 | // CHECK-LD-RT: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
| 64 | // CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 65 | // CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 66 | // CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 67 | // CHECK-LD-RT: "-L[[SYSROOT]]/lib" |
| 68 | // CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib" |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 69 | // CHECK-LD-RT: libclang_rt.builtins-x86_64.a" "-lgcc_s" |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 70 | // CHECK-LD-RT: "-lc" |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 71 | // CHECK-LD-RT: libclang_rt.builtins-x86_64.a" "-lgcc_s" |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 72 | // |
| 73 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 74 | // RUN: --target=arm-linux-androideabi \ |
| 75 | // RUN: --gcc-toolchain="" \ |
| 76 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 77 | // RUN: --rtlib=compiler-rt \ |
| 78 | // RUN: | FileCheck --check-prefix=CHECK-LD-RT-ANDROID %s |
| 79 | // CHECK-LD-RT-ANDROID-NOT: warning: |
| 80 | // CHECK-LD-RT-ANDROID: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 81 | // CHECK-LD-RT-ANDROID: "--eh-frame-hdr" |
| 82 | // CHECK-LD-RT-ANDROID: "-m" "armelf_linux_eabi" |
| 83 | // CHECK-LD-RT-ANDROID: "-dynamic-linker" |
| 84 | // CHECK-LD-RT-ANDROID: libclang_rt.builtins-arm-android.a" "-lgcc_s" |
| 85 | // CHECK-LD-RT-ANDROID: "-lc" |
| 86 | // CHECK-LD-RT-ANDROID: libclang_rt.builtins-arm-android.a" "-lgcc_s" |
| 87 | // |
| 88 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 89 | // RUN: --target=x86_64-unknown-linux \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 90 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 91 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 92 | // RUN: --rtlib=libgcc \ |
| 93 | // RUN: | FileCheck --check-prefix=CHECK-LD-GCC %s |
| 94 | // CHECK-LD-GCC-NOT: warning: |
| 95 | // CHECK-LD-GCC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 96 | // CHECK-LD-GCC: "--eh-frame-hdr" |
| 97 | // CHECK-LD-GCC: "-m" "elf_x86_64" |
| 98 | // CHECK-LD-GCC: "-dynamic-linker" |
| 99 | // CHECK-LD-GCC: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
| 100 | // CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 101 | // CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 102 | // CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 103 | // CHECK-LD-GCC: "-L[[SYSROOT]]/lib" |
| 104 | // CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib" |
| 105 | // CHECK-LD-GCC "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" |
| 106 | // CHECK-LD-GCC: "-lc" |
| 107 | // CHECK-LD-GCC: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" |
| 108 | // |
| 109 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 110 | // RUN: --target=x86_64-unknown-linux \ |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 111 | // RUN: -static-libgcc \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 112 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 113 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 114 | // RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC-LIBGCC %s |
Chandler Carruth | 68f94db | 2013-03-04 02:07:55 +0000 | [diff] [blame] | 115 | // CHECK-LD-64-STATIC-LIBGCC-NOT: warning: |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 116 | // CHECK-LD-64-STATIC-LIBGCC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 117 | // CHECK-LD-64-STATIC-LIBGCC: "--eh-frame-hdr" |
| 118 | // CHECK-LD-64-STATIC-LIBGCC: "-m" "elf_x86_64" |
| 119 | // CHECK-LD-64-STATIC-LIBGCC: "-dynamic-linker" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 120 | // CHECK-LD-64-STATIC-LIBGCC: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 121 | // CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 122 | // CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 123 | // CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 124 | // CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/lib" |
| 125 | // CHECK-LD-64-STATIC-LIBGCC: "-L[[SYSROOT]]/usr/lib" |
| 126 | // CHECK-LD-64-STATIC-LIBGCC: "-lgcc" "-lgcc_eh" |
| 127 | // CHECK-LD-64-STATIC-LIBGCC: "-lc" |
| 128 | // CHECK-LD-64-STATIC-LIBGCC: "-lgcc" "-lgcc_eh" |
| 129 | // |
| 130 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 131 | // RUN: --target=x86_64-unknown-linux \ |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 132 | // RUN: -static \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 133 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 134 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 135 | // RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC %s |
Chandler Carruth | 68f94db | 2013-03-04 02:07:55 +0000 | [diff] [blame] | 136 | // CHECK-LD-64-STATIC-NOT: warning: |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 137 | // CHECK-LD-64-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 138 | // CHECK-LD-64-STATIC-NOT: "--eh-frame-hdr" |
| 139 | // CHECK-LD-64-STATIC: "-m" "elf_x86_64" |
| 140 | // CHECK-LD-64-STATIC-NOT: "-dynamic-linker" |
| 141 | // CHECK-LD-64-STATIC: "-static" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 142 | // CHECK-LD-64-STATIC: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbeginT.o" |
Chandler Carruth | 0074d38 | 2013-03-04 01:27:49 +0000 | [diff] [blame] | 143 | // CHECK-LD-64-STATIC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 144 | // CHECK-LD-64-STATIC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 145 | // CHECK-LD-64-STATIC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 146 | // CHECK-LD-64-STATIC: "-L[[SYSROOT]]/lib" |
| 147 | // CHECK-LD-64-STATIC: "-L[[SYSROOT]]/usr/lib" |
| 148 | // CHECK-LD-64-STATIC: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group" |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 149 | // |
Chandler Carruth | 68f94db | 2013-03-04 02:07:55 +0000 | [diff] [blame] | 150 | // Check that flags can be combined. The -static dominates. |
| 151 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 152 | // RUN: --target=x86_64-unknown-linux \ |
Chandler Carruth | 68f94db | 2013-03-04 02:07:55 +0000 | [diff] [blame] | 153 | // RUN: -static-libgcc -static \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 154 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 68f94db | 2013-03-04 02:07:55 +0000 | [diff] [blame] | 155 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 156 | // RUN: | FileCheck --check-prefix=CHECK-LD-64-STATIC %s |
| 157 | // |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 158 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 159 | // RUN: --target=i386-unknown-linux -m32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 160 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 161 | // RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \ |
| 162 | // RUN: | FileCheck --check-prefix=CHECK-32-TO-32 %s |
| 163 | // CHECK-32-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 164 | // CHECK-32-TO-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 165 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0" |
Rafael Espindola | 9a47824 | 2013-10-28 23:14:34 +0000 | [diff] [blame] | 166 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib/../lib32" |
| 167 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../lib32" |
| 168 | // CHECK-32-TO-32: "-L[[SYSROOT]]/lib/../lib32" |
| 169 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32" |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 170 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib" |
| 171 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.." |
| 172 | // CHECK-32-TO-32: "-L[[SYSROOT]]/lib" |
| 173 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib" |
| 174 | // |
| 175 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 176 | // RUN: --target=i386-unknown-linux -m64 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 177 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 178 | // RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \ |
| 179 | // RUN: | FileCheck --check-prefix=CHECK-32-TO-64 %s |
| 180 | // CHECK-32-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 181 | // CHECK-32-TO-64: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0/64{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 182 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/64" |
| 183 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib/../lib64" |
| 184 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../lib64" |
| 185 | // CHECK-32-TO-64: "-L[[SYSROOT]]/lib/../lib64" |
| 186 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64" |
| 187 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0" |
| 188 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib" |
| 189 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.." |
| 190 | // CHECK-32-TO-64: "-L[[SYSROOT]]/lib" |
| 191 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | c5306b0 | 2011-10-03 09:08:26 +0000 | [diff] [blame] | 192 | // |
| 193 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 194 | // RUN: --target=x86_64-unknown-linux -m64 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 195 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | c5306b0 | 2011-10-03 09:08:26 +0000 | [diff] [blame] | 196 | // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ |
| 197 | // RUN: | FileCheck --check-prefix=CHECK-64-TO-64 %s |
| 198 | // CHECK-64-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 199 | // CHECK-64-TO-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
Chandler Carruth | c5306b0 | 2011-10-03 09:08:26 +0000 | [diff] [blame] | 200 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
Rafael Espindola | 9a47824 | 2013-10-28 23:14:34 +0000 | [diff] [blame] | 201 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib64" |
| 202 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib64" |
| 203 | // CHECK-64-TO-64: "-L[[SYSROOT]]/lib/../lib64" |
| 204 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64" |
Chandler Carruth | c5306b0 | 2011-10-03 09:08:26 +0000 | [diff] [blame] | 205 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 206 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 207 | // CHECK-64-TO-64: "-L[[SYSROOT]]/lib" |
| 208 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib" |
| 209 | // |
| 210 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 211 | // RUN: --target=x86_64-unknown-linux -m32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 212 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | c5306b0 | 2011-10-03 09:08:26 +0000 | [diff] [blame] | 213 | // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ |
| 214 | // RUN: | FileCheck --check-prefix=CHECK-64-TO-32 %s |
| 215 | // CHECK-64-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 216 | // CHECK-64-TO-32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32{{/|\\\\}}crtbegin.o" |
Chandler Carruth | c5306b0 | 2011-10-03 09:08:26 +0000 | [diff] [blame] | 217 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32" |
| 218 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib32" |
| 219 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib32" |
| 220 | // CHECK-64-TO-32: "-L[[SYSROOT]]/lib/../lib32" |
| 221 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32" |
| 222 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 223 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 224 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 225 | // CHECK-64-TO-32: "-L[[SYSROOT]]/lib" |
| 226 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 227 | // |
| 228 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 229 | // RUN: --target=x86_64-unknown-linux-gnux32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 230 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 231 | // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ |
| 232 | // RUN: | FileCheck --check-prefix=CHECK-X32 %s |
| 233 | // CHECK-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 234 | // CHECK-X32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32{{/|\\\\}}crtbegin.o" |
| 235 | // CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32" |
| 236 | // CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../libx32" |
| 237 | // CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../libx32" |
| 238 | // CHECK-X32: "-L[[SYSROOT]]/lib/../libx32" |
| 239 | // CHECK-X32: "-L[[SYSROOT]]/usr/lib/../libx32" |
| 240 | // CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 241 | // CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 242 | // CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 243 | // CHECK-X32: "-L[[SYSROOT]]/lib" |
| 244 | // CHECK-X32: "-L[[SYSROOT]]/usr/lib" |
| 245 | // |
| 246 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 247 | // RUN: --target=x86_64-unknown-linux -mx32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 248 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 249 | // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ |
| 250 | // RUN: | FileCheck --check-prefix=CHECK-64-TO-X32 %s |
| 251 | // CHECK-64-TO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 252 | // CHECK-64-TO-X32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32{{/|\\\\}}crtbegin.o" |
| 253 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32" |
| 254 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../libx32" |
| 255 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../libx32" |
| 256 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/lib/../libx32" |
| 257 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/../libx32" |
| 258 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 259 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 260 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 261 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/lib" |
| 262 | // CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib" |
| 263 | // |
| 264 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 265 | // RUN: --target=i386-unknown-linux -mx32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 266 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 267 | // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ |
| 268 | // RUN: | FileCheck --check-prefix=CHECK-32-TO-X32 %s |
| 269 | // CHECK-32-TO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 270 | // CHECK-32-TO-X32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32{{/|\\\\}}crtbegin.o" |
| 271 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32" |
| 272 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../libx32" |
| 273 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../libx32" |
| 274 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/lib/../libx32" |
| 275 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/../libx32" |
| 276 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 277 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 278 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 279 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/lib" |
| 280 | // CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib" |
| 281 | // |
| 282 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 283 | // RUN: --target=x86_64-unknown-linux-gnux32 -m64 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 284 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 285 | // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ |
| 286 | // RUN: | FileCheck --check-prefix=CHECK-X32-TO-64 %s |
| 287 | // CHECK-X32-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 288 | // CHECK-X32-TO-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
| 289 | // CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 290 | // CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib64" |
| 291 | // CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib64" |
| 292 | // CHECK-X32-TO-64: "-L[[SYSROOT]]/lib/../lib64" |
| 293 | // CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64" |
| 294 | // CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 295 | // CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 296 | // CHECK-X32-TO-64: "-L[[SYSROOT]]/lib" |
| 297 | // CHECK-X32-TO-64: "-L[[SYSROOT]]/usr/lib" |
| 298 | // |
| 299 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 300 | // RUN: --target=x86_64-unknown-linux-gnux32 -m32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 301 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 302 | // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ |
| 303 | // RUN: | FileCheck --check-prefix=CHECK-X32-TO-32 %s |
| 304 | // CHECK-X32-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 305 | // CHECK-X32-TO-32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32{{/|\\\\}}crtbegin.o" |
| 306 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32" |
| 307 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib32" |
| 308 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib32" |
| 309 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/lib/../lib32" |
| 310 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32" |
| 311 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 312 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 313 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 314 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/lib" |
| 315 | // CHECK-X32-TO-32: "-L[[SYSROOT]]/usr/lib" |
| 316 | // |
| 317 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 318 | // RUN: --target=x86_64-unknown-linux -m32 \ |
| 319 | // RUN: --gcc-toolchain=%S/Inputs/multilib_64bit_linux_tree/usr \ |
Chandler Carruth | 9f31437 | 2012-04-06 16:32:06 +0000 | [diff] [blame] | 320 | // RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \ |
| 321 | // RUN: | FileCheck --check-prefix=CHECK-64-TO-32-SYSROOT %s |
| 322 | // CHECK-64-TO-32-SYSROOT: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 323 | // CHECK-64-TO-32-SYSROOT: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 9f31437 | 2012-04-06 16:32:06 +0000 | [diff] [blame] | 324 | // CHECK-64-TO-32-SYSROOT: "-L{{[^"]*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32" |
| 325 | // CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/lib/../lib32" |
| 326 | // CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/usr/lib/../lib32" |
| 327 | // CHECK-64-TO-32-SYSROOT: "-L{{[^"]*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 328 | // CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/lib" |
| 329 | // CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/usr/lib" |
| 330 | // |
| 331 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 332 | // RUN: --target=i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 333 | // RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 334 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 335 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 336 | // RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-32 %s |
| 337 | // CHECK-INSTALL-DIR-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 338 | // CHECK-INSTALL-DIR-32: "{{.*}}/Inputs/fake_install_tree/bin/../lib/gcc/i386-unknown-linux/4.7.0{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 339 | // CHECK-INSTALL-DIR-32: "-L{{.*}}/Inputs/fake_install_tree/bin/../lib/gcc/i386-unknown-linux/4.7.0" |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 340 | // |
| 341 | // Check that with 64-bit builds, we don't actually use the install directory |
| 342 | // as its version of GCC is lower than our sysrooted version. |
| 343 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 344 | // RUN: --target=x86_64-unknown-linux -m64 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 345 | // RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 346 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 347 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 348 | // RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-64 %s |
| 349 | // CHECK-INSTALL-DIR-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 350 | // CHECK-INSTALL-DIR-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 351 | // CHECK-INSTALL-DIR-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 352 | // |
| 353 | // Check that we support unusual patch version formats, including missing that |
| 354 | // component. |
| 355 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 356 | // RUN: --target=i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 357 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing1/bin \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 358 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 359 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 360 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION1 %s |
| 361 | // CHECK-GCC-VERSION1: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 362 | // CHECK-GCC-VERSION1: "{{.*}}/Inputs/gcc_version_parsing1/bin/../lib/gcc/i386-unknown-linux/4.7{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 363 | // CHECK-GCC-VERSION1: "-L{{.*}}/Inputs/gcc_version_parsing1/bin/../lib/gcc/i386-unknown-linux/4.7" |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 364 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 365 | // RUN: --target=i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 366 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing2/bin \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 367 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 368 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 369 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION2 %s |
| 370 | // CHECK-GCC-VERSION2: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 371 | // CHECK-GCC-VERSION2: "{{.*}}/Inputs/gcc_version_parsing2/bin/../lib/gcc/i386-unknown-linux/4.7.x{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 372 | // CHECK-GCC-VERSION2: "-L{{.*}}/Inputs/gcc_version_parsing2/bin/../lib/gcc/i386-unknown-linux/4.7.x" |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 373 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 374 | // RUN: --target=i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 375 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing3/bin \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 376 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 377 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 378 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION3 %s |
| 379 | // CHECK-GCC-VERSION3: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 380 | // CHECK-GCC-VERSION3: "{{.*}}/Inputs/gcc_version_parsing3/bin/../lib/gcc/i386-unknown-linux/4.7.99-rc5{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 381 | // CHECK-GCC-VERSION3: "-L{{.*}}/Inputs/gcc_version_parsing3/bin/../lib/gcc/i386-unknown-linux/4.7.99-rc5" |
Chandler Carruth | cb2e00f | 2011-11-05 23:24:30 +0000 | [diff] [blame] | 382 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 383 | // RUN: --target=i386-unknown-linux -m32 \ |
Chandler Carruth | cb2e00f | 2011-11-05 23:24:30 +0000 | [diff] [blame] | 384 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing4/bin \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 385 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | cb2e00f | 2011-11-05 23:24:30 +0000 | [diff] [blame] | 386 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 387 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION4 %s |
| 388 | // CHECK-GCC-VERSION4: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 389 | // CHECK-GCC-VERSION4: "{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99{{/|\\\\}}crtbegin.o" |
Chandler Carruth | cb2e00f | 2011-11-05 23:24:30 +0000 | [diff] [blame] | 390 | // CHECK-GCC-VERSION4: "-L{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99" |
Chandler Carruth | d936d9d | 2011-11-09 03:46:20 +0000 | [diff] [blame] | 391 | // |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 392 | // Test a simulated installation of libc++ on Linux, both through sysroot and |
| 393 | // the installation path of Clang. |
| 394 | // RUN: %clangxx -no-canonical-prefixes -x c++ %s -### -o %t.o 2>&1 \ |
| 395 | // RUN: -target x86_64-unknown-linux-gnu \ |
| 396 | // RUN: -stdlib=libc++ \ |
| 397 | // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 398 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 399 | // RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \ |
| 400 | // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-SYSROOT %s |
| 401 | // CHECK-BASIC-LIBCXX-SYSROOT: "{{[^"]*}}clang{{[^"]*}}" "-cc1" |
| 402 | // CHECK-BASIC-LIBCXX-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]" |
| 403 | // CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1" |
| 404 | // CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/local/include" |
| 405 | // CHECK-BASIC-LIBCXX-SYSROOT: "--sysroot=[[SYSROOT]]" |
| 406 | // RUN: %clang -no-canonical-prefixes -x c++ %s -### -o %t.o 2>&1 \ |
| 407 | // RUN: -target x86_64-unknown-linux-gnu \ |
| 408 | // RUN: -stdlib=libc++ \ |
| 409 | // RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 410 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 411 | // RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \ |
| 412 | // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-INSTALL %s |
| 413 | // CHECK-BASIC-LIBCXX-INSTALL: "{{[^"]*}}clang{{[^"]*}}" "-cc1" |
| 414 | // CHECK-BASIC-LIBCXX-INSTALL: "-isysroot" "[[SYSROOT:[^"]+]]" |
| 415 | // CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/bin/../include/c++/v1" |
| 416 | // CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/local/include" |
| 417 | // CHECK-BASIC-LIBCXX-INSTALL: "--sysroot=[[SYSROOT]]" |
| 418 | // CHECK-BASIC-LIBCXX-INSTALL: "-L[[SYSROOT]]/usr/bin/../lib" |
| 419 | // |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 420 | // Test that we can use -stdlib=libc++ in a build system even when it |
| 421 | // occasionally links C code instead of C++ code. |
| 422 | // RUN: %clang -no-canonical-prefixes -x c %s -### -o %t.o 2>&1 \ |
| 423 | // RUN: -target x86_64-unknown-linux-gnu \ |
| 424 | // RUN: -stdlib=libc++ \ |
| 425 | // RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \ |
| 426 | // RUN: --gcc-toolchain="" \ |
| 427 | // RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \ |
| 428 | // RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-C-LINK %s |
| 429 | // CHECK-BASIC-LIBCXX-C-LINK-NOT: warning: |
| 430 | // CHECK-BASIC-LIBCXX-C-LINK: "{{[^"]*}}clang{{[^"]*}}" "-cc1" |
| 431 | // CHECK-BASIC-LIBCXX-C-LINK: "-isysroot" "[[SYSROOT:[^"]+]]" |
| 432 | // CHECK-BASIC-LIBCXX-C-LINK-NOT: "-internal-isystem" "[[SYSROOT]]/usr/bin/../include/c++/v1" |
| 433 | // CHECK-BASIC-LIBCXX-C-LINK: "-internal-isystem" "[[SYSROOT]]/usr/local/include" |
| 434 | // CHECK-BASIC-LIBCXX-C-LINK: "--sysroot=[[SYSROOT]]" |
| 435 | // CHECK-BASIC-LIBCXX-C-LINK: "-L[[SYSROOT]]/usr/bin/../lib" |
| 436 | // |
Chandler Carruth | d936d9d | 2011-11-09 03:46:20 +0000 | [diff] [blame] | 437 | // Test a very broken version of multiarch that shipped in Ubuntu 11.04. |
| 438 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 439 | // RUN: --target=i386-unknown-linux \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 440 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | d936d9d | 2011-11-09 03:46:20 +0000 | [diff] [blame] | 441 | // RUN: --sysroot=%S/Inputs/ubuntu_11.04_multiarch_tree \ |
| 442 | // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-11-04 %s |
| 443 | // CHECK-UBUNTU-11-04: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 444 | // CHECK-UBUNTU-11-04: "{{.*}}/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5{{/|\\\\}}crtbegin.o" |
Chandler Carruth | d936d9d | 2011-11-09 03:46:20 +0000 | [diff] [blame] | 445 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5" |
| 446 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../i386-linux-gnu" |
| 447 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu" |
| 448 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.." |
| 449 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/lib" |
| 450 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib" |
Hal Finkel | 39993dd | 2011-12-08 20:36:19 +0000 | [diff] [blame] | 451 | // |
Jiangning Liu | ff104a1 | 2012-07-31 08:06:29 +0000 | [diff] [blame] | 452 | // Check multi arch support on Ubuntu 12.04 LTS. |
| 453 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 454 | // RUN: --target=arm-unknown-linux-gnueabihf \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 455 | // RUN: --gcc-toolchain="" \ |
Jiangning Liu | ff104a1 | 2012-07-31 08:06:29 +0000 | [diff] [blame] | 456 | // RUN: --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \ |
| 457 | // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-12-04-ARM-HF %s |
| 458 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 459 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf{{/|\\\\}}crt1.o" |
| 460 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf{{/|\\\\}}crti.o" |
| 461 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3{{/|\\\\}}crtbegin.o" |
Jiangning Liu | ff104a1 | 2012-07-31 08:06:29 +0000 | [diff] [blame] | 462 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabihf/4.6.3" |
| 463 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf" |
| 464 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/lib/arm-linux-gnueabihf" |
| 465 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/arm-linux-gnueabihf" |
| 466 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../.." |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 467 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3{{/|\\\\}}crtend.o" |
| 468 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf{{/|\\\\}}crtn.o" |
Jiangning Liu | ff104a1 | 2012-07-31 08:06:29 +0000 | [diff] [blame] | 469 | // |
Chandler Carruth | 2a9b758 | 2013-10-29 10:27:30 +0000 | [diff] [blame] | 470 | // Check Ubuntu 13.10 on x86-64 targeting arm-linux-gnueabihf. |
| 471 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 472 | // RUN: --target=arm-linux-gnueabihf \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 473 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 2a9b758 | 2013-10-29 10:27:30 +0000 | [diff] [blame] | 474 | // RUN: --sysroot=%S/Inputs/x86-64_ubuntu_13.10 \ |
| 475 | // RUN: | FileCheck --check-prefix=CHECK-X86-64-UBUNTU-13-10-ARM-HF %s |
| 476 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 477 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-dynamic-linker" "/lib/ld-linux-armhf.so.3" |
| 478 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib/../lib{{/|\\\\}}crt1.o" |
| 479 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib/../lib{{/|\\\\}}crti.o" |
| 480 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8{{/|\\\\}}crtbegin.o" |
| 481 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8" |
| 482 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib/../lib" |
| 483 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/lib/../lib" |
| 484 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/usr/lib/../lib" |
| 485 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib" |
| 486 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8{{/|\\\\}}crtend.o" |
| 487 | // CHECK-X86-64-UBUNTU-13-10-ARM-HF: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/../../../../arm-linux-gnueabihf/lib/../lib{{/|\\\\}}crtn.o" |
| 488 | // |
| 489 | // Check Ubuntu 13.10 on x86-64 targeting arm-linux-gnueabi. |
| 490 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 491 | // RUN: --target=arm-linux-gnueabi \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 492 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 2a9b758 | 2013-10-29 10:27:30 +0000 | [diff] [blame] | 493 | // RUN: --sysroot=%S/Inputs/x86-64_ubuntu_13.10 \ |
| 494 | // RUN: | FileCheck --check-prefix=CHECK-X86-64-UBUNTU-13-10-ARM %s |
| 495 | // CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 496 | // CHECK-X86-64-UBUNTU-13-10-ARM: "-dynamic-linker" "/lib/ld-linux.so.3" |
| 497 | // CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib{{/|\\\\}}crt1.o" |
| 498 | // CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib{{/|\\\\}}crti.o" |
| 499 | // CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7{{/|\\\\}}crtbegin.o" |
| 500 | // CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabi/4.7" |
| 501 | // CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib" |
| 502 | // CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/lib/../lib" |
| 503 | // CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/usr/lib/../lib" |
| 504 | // CHECK-X86-64-UBUNTU-13-10-ARM: "-L[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib" |
| 505 | // CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7{{/|\\\\}}crtend.o" |
| 506 | // CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib{{/|\\\\}}crtn.o" |
| 507 | // |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 508 | // Check Ubuntu 14.04 on powerpc64le. |
| 509 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 510 | // RUN: --target=powerpc64le-unknown-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 511 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 512 | // RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \ |
| 513 | // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-PPC64LE %s |
| 514 | // CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 515 | // CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu{{/|\\\\}}crt1.o" |
| 516 | // CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu{{/|\\\\}}crti.o" |
| 517 | // CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8{{/|\\\\}}crtbegin.o" |
| 518 | // CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8" |
| 519 | // CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu" |
| 520 | // CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/lib/powerpc64le-linux-gnu" |
| 521 | // CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/powerpc64le-linux-gnu" |
| 522 | // CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../.." |
| 523 | // CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8{{/|\\\\}}crtend.o" |
| 524 | // CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu{{/|\\\\}}crtn.o" |
| 525 | // |
| 526 | // Check Ubuntu 14.04 on x32. |
| 527 | // "/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32/crtn.o" |
| 528 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 529 | // RUN: --target=x86_64-unknown-linux-gnux32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 530 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 531 | // RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \ |
| 532 | // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-X32 %s |
| 533 | // CHECK-UBUNTU-14-04-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 534 | // CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32{{/|\\\\}}crt1.o" |
| 535 | // CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32{{/|\\\\}}crti.o" |
| 536 | // CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/x32{{/|\\\\}}crtbegin.o" |
| 537 | // CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/x32" |
| 538 | // CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32" |
| 539 | // CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/lib/../libx32" |
| 540 | // CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/../libx32" |
| 541 | // CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/x86_64-linux-gnu/../../libx32" |
| 542 | // CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8" |
| 543 | // CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.." |
| 544 | // CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/x32{{/|\\\\}}crtend.o" |
| 545 | // CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32{{/|\\\\}}crtn.o" |
| 546 | // |
Rafael Espindola | d44d04f | 2013-04-14 10:14:21 +0000 | [diff] [blame] | 547 | // Check fedora 18 on arm. |
| 548 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 549 | // RUN: --target=armv7-unknown-linux-gnueabihf \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 550 | // RUN: --gcc-toolchain="" \ |
Rafael Espindola | d44d04f | 2013-04-14 10:14:21 +0000 | [diff] [blame] | 551 | // RUN: --sysroot=%S/Inputs/fedora_18_tree \ |
| 552 | // RUN: | FileCheck --check-prefix=CHECK-FEDORA-18-ARM-HF %s |
| 553 | // CHECK-FEDORA-18-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 2a9b758 | 2013-10-29 10:27:30 +0000 | [diff] [blame] | 554 | // CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib{{/|\\\\}}crt1.o" |
| 555 | // CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib{{/|\\\\}}crti.o" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 556 | // CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2{{/|\\\\}}crtbegin.o" |
Rafael Espindola | d44d04f | 2013-04-14 10:14:21 +0000 | [diff] [blame] | 557 | // CHECK-FEDORA-18-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2" |
Chandler Carruth | 2a9b758 | 2013-10-29 10:27:30 +0000 | [diff] [blame] | 558 | // CHECK-FEDORA-18-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 559 | // CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2{{/|\\\\}}crtend.o" |
Chandler Carruth | 2a9b758 | 2013-10-29 10:27:30 +0000 | [diff] [blame] | 560 | // CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib{{/|\\\\}}crtn.o" |
Rafael Espindola | d44d04f | 2013-04-14 10:14:21 +0000 | [diff] [blame] | 561 | // |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 562 | // Check Fedora 21 on AArch64. |
| 563 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 564 | // RUN: --target=arm64-unknown-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 565 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 566 | // RUN: --sysroot=%S/Inputs/fedora_21_tree \ |
| 567 | // RUN: | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s |
| 568 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 569 | // RUN: --target=aarch64-unknown-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 570 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 571 | // RUN: --sysroot=%S/Inputs/fedora_21_tree \ |
| 572 | // RUN: | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s |
| 573 | // CHECK-FEDORA-21-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 574 | // CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crt1.o" |
| 575 | // CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crti.o" |
| 576 | // CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0{{/|\\\\}}crtbegin.o" |
| 577 | // CHECK-FEDORA-21-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-redhat-linux/4.9.0" |
| 578 | // CHECK-FEDORA-21-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64" |
| 579 | // CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0{{/|\\\\}}crtend.o" |
| 580 | // CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crtn.o" |
| 581 | // |
Jiangning Liu | ff104a1 | 2012-07-31 08:06:29 +0000 | [diff] [blame] | 582 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 583 | // RUN: --target=arm-unknown-linux-gnueabi \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 584 | // RUN: --gcc-toolchain="" \ |
Jiangning Liu | ff104a1 | 2012-07-31 08:06:29 +0000 | [diff] [blame] | 585 | // RUN: --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \ |
| 586 | // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-12-04-ARM %s |
| 587 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 588 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi{{/|\\\\}}crt1.o" |
| 589 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi{{/|\\\\}}crti.o" |
| 590 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1{{/|\\\\}}crtbegin.o" |
Jiangning Liu | ff104a1 | 2012-07-31 08:06:29 +0000 | [diff] [blame] | 591 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabi/4.6.1" |
| 592 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi" |
| 593 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/lib/arm-linux-gnueabi" |
| 594 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/arm-linux-gnueabi" |
| 595 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../.." |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 596 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1{{/|\\\\}}crtend.o" |
| 597 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi{{/|\\\\}}crtn.o" |
Jiangning Liu | ff104a1 | 2012-07-31 08:06:29 +0000 | [diff] [blame] | 598 | // |
Hal Finkel | 39993dd | 2011-12-08 20:36:19 +0000 | [diff] [blame] | 599 | // Test the setup that shipped in SUSE 10.3 on ppc64. |
| 600 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 601 | // RUN: --target=powerpc64-suse-linux \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 602 | // RUN: --gcc-toolchain="" \ |
Hal Finkel | 39993dd | 2011-12-08 20:36:19 +0000 | [diff] [blame] | 603 | // RUN: --sysroot=%S/Inputs/suse_10.3_ppc64_tree \ |
| 604 | // RUN: | FileCheck --check-prefix=CHECK-SUSE-10-3-PPC64 %s |
| 605 | // CHECK-SUSE-10-3-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 606 | // CHECK-SUSE-10-3-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64{{/|\\\\}}crtbegin.o" |
Hal Finkel | 39993dd | 2011-12-08 20:36:19 +0000 | [diff] [blame] | 607 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64" |
| 608 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib64" |
| 609 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64" |
| 610 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 611 | // |
Jiangning Liu | 6cc9dc8 | 2012-07-30 11:05:56 +0000 | [diff] [blame] | 612 | // Check dynamic-linker for different archs |
| 613 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 614 | // RUN: --target=arm-linux-gnueabi \ |
Jiangning Liu | 6cc9dc8 | 2012-07-30 11:05:56 +0000 | [diff] [blame] | 615 | // RUN: | FileCheck --check-prefix=CHECK-ARM %s |
| 616 | // CHECK-ARM: "{{.*}}ld{{(.exe)?}}" |
| 617 | // CHECK-ARM: "-m" "armelf_linux_eabi" |
| 618 | // CHECK-ARM: "-dynamic-linker" "{{.*}}/lib/ld-linux.so.3" |
| 619 | // |
| 620 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 621 | // RUN: --target=arm-linux-gnueabihf \ |
Jiangning Liu | 6cc9dc8 | 2012-07-30 11:05:56 +0000 | [diff] [blame] | 622 | // RUN: | FileCheck --check-prefix=CHECK-ARM-HF %s |
| 623 | // CHECK-ARM-HF: "{{.*}}ld{{(.exe)?}}" |
| 624 | // CHECK-ARM-HF: "-m" "armelf_linux_eabi" |
| 625 | // CHECK-ARM-HF: "-dynamic-linker" "{{.*}}/lib/ld-linux-armhf.so.3" |
| 626 | // |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 627 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 628 | // RUN: --target=powerpc64-linux-gnu \ |
| 629 | // RUN: | FileCheck --check-prefix=CHECK-PPC64 %s |
| 630 | // CHECK-PPC64: "{{.*}}ld{{(.exe)?}}" |
| 631 | // CHECK-PPC64: "-m" "elf64ppc" |
| 632 | // CHECK-PPC64: "-dynamic-linker" "{{.*}}/lib64/ld64.so.1" |
| 633 | // |
| 634 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 635 | // RUN: --target=powerpc64-linux-gnu -mabi=elfv1 \ |
| 636 | // RUN: | FileCheck --check-prefix=CHECK-PPC64-ELFv1 %s |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 637 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 638 | // RUN: --target=powerpc64-linux-gnu -mabi=elfv1-qpx \ |
| 639 | // RUN: | FileCheck --check-prefix=CHECK-PPC64-ELFv1 %s |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 640 | // CHECK-PPC64-ELFv1: "{{.*}}ld{{(.exe)?}}" |
| 641 | // CHECK-PPC64-ELFv1: "-m" "elf64ppc" |
| 642 | // CHECK-PPC64-ELFv1: "-dynamic-linker" "{{.*}}/lib64/ld64.so.1" |
| 643 | // |
| 644 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 645 | // RUN: --target=powerpc64-linux-gnu -mabi=elfv2 \ |
| 646 | // RUN: | FileCheck --check-prefix=CHECK-PPC64-ELFv2 %s |
| 647 | // CHECK-PPC64-ELFv2: "{{.*}}ld{{(.exe)?}}" |
| 648 | // CHECK-PPC64-ELFv2: "-m" "elf64ppc" |
| 649 | // CHECK-PPC64-ELFv2: "-dynamic-linker" "{{.*}}/lib64/ld64.so.2" |
| 650 | // |
| 651 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 652 | // RUN: --target=powerpc64le-linux-gnu \ |
| 653 | // RUN: | FileCheck --check-prefix=CHECK-PPC64LE %s |
| 654 | // CHECK-PPC64LE: "{{.*}}ld{{(.exe)?}}" |
| 655 | // CHECK-PPC64LE: "-m" "elf64lppc" |
| 656 | // CHECK-PPC64LE: "-dynamic-linker" "{{.*}}/lib64/ld64.so.2" |
| 657 | // |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 658 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 659 | // RUN: --target=powerpc64le-linux-gnu -mabi=elfv1 \ |
| 660 | // RUN: | FileCheck --check-prefix=CHECK-PPC64LE-ELFv1 %s |
| 661 | // CHECK-PPC64LE-ELFv1: "{{.*}}ld{{(.exe)?}}" |
| 662 | // CHECK-PPC64LE-ELFv1: "-m" "elf64lppc" |
| 663 | // CHECK-PPC64LE-ELFv1: "-dynamic-linker" "{{.*}}/lib64/ld64.so.1" |
| 664 | // |
| 665 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 666 | // RUN: --target=powerpc64le-linux-gnu -mabi=elfv2 \ |
| 667 | // RUN: | FileCheck --check-prefix=CHECK-PPC64LE-ELFv2 %s |
| 668 | // CHECK-PPC64LE-ELFv2: "{{.*}}ld{{(.exe)?}}" |
| 669 | // CHECK-PPC64LE-ELFv2: "-m" "elf64lppc" |
| 670 | // CHECK-PPC64LE-ELFv2: "-dynamic-linker" "{{.*}}/lib64/ld64.so.2" |
| 671 | // |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 672 | // Check that we do not pass --hash-style=gnu and --hash-style=both to linker |
Simon Atanasyan | 8491cb2 | 2012-04-06 20:14:27 +0000 | [diff] [blame] | 673 | // and provide correct path to the dynamic linker and emulation mode when build |
| 674 | // for MIPS platforms. |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 675 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 676 | // RUN: --target=mips-linux-gnu \ |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 677 | // RUN: | FileCheck --check-prefix=CHECK-MIPS %s |
| 678 | // CHECK-MIPS: "{{.*}}ld{{(.exe)?}}" |
Simon Atanasyan | 8491cb2 | 2012-04-06 20:14:27 +0000 | [diff] [blame] | 679 | // CHECK-MIPS: "-m" "elf32btsmip" |
| 680 | // CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib/ld.so.1" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 681 | // CHECK-MIPS-NOT: "--hash-style={{gnu|both}}" |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 682 | // |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 683 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 684 | // RUN: --target=mipsel-linux-gnu \ |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 685 | // RUN: | FileCheck --check-prefix=CHECK-MIPSEL %s |
| 686 | // CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}" |
Simon Atanasyan | 8491cb2 | 2012-04-06 20:14:27 +0000 | [diff] [blame] | 687 | // CHECK-MIPSEL: "-m" "elf32ltsmip" |
| 688 | // CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib/ld.so.1" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 689 | // CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}" |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 690 | // |
| 691 | // RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-gnu -mnan=2008 \ |
| 692 | // RUN: | FileCheck --check-prefix=CHECK-MIPSEL-NAN2008 %s |
| 693 | // CHECK-MIPSEL-NAN2008: "{{.*}}ld{{(.exe)?}}" |
| 694 | // CHECK-MIPSEL-NAN2008: "-m" "elf32ltsmip" |
| 695 | // CHECK-MIPSEL-NAN2008: "-dynamic-linker" "{{.*}}/lib/ld-linux-mipsn8.so.1" |
| 696 | // CHECK-MIPSEL-NAN2008-NOT: "--hash-style={{gnu|both}}" |
| 697 | // |
| 698 | // RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-gnu -mcpu=mips32r6 \ |
| 699 | // RUN: | FileCheck --check-prefix=CHECK-MIPS32R6EL %s |
| 700 | // CHECK-MIPS32R6EL: "{{.*}}ld{{(.exe)?}}" |
| 701 | // CHECK-MIPS32R6EL: "-m" "elf32ltsmip" |
| 702 | // CHECK-MIPS32R6EL: "-dynamic-linker" "{{.*}}/lib/ld-linux-mipsn8.so.1" |
| 703 | // CHECK-MIPS32R6EL-NOT: "--hash-style={{gnu|both}}" |
| 704 | // |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 705 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 706 | // RUN: --target=mips64-linux-gnu \ |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 707 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64 %s |
| 708 | // CHECK-MIPS64: "{{.*}}ld{{(.exe)?}}" |
Simon Atanasyan | 8491cb2 | 2012-04-06 20:14:27 +0000 | [diff] [blame] | 709 | // CHECK-MIPS64: "-m" "elf64btsmip" |
| 710 | // CHECK-MIPS64: "-dynamic-linker" "{{.*}}/lib64/ld.so.1" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 711 | // CHECK-MIPS64-NOT: "--hash-style={{gnu|both}}" |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 712 | // |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 713 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 714 | // RUN: --target=mips64el-linux-gnu \ |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 715 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64EL %s |
| 716 | // CHECK-MIPS64EL: "{{.*}}ld{{(.exe)?}}" |
Simon Atanasyan | 8491cb2 | 2012-04-06 20:14:27 +0000 | [diff] [blame] | 717 | // CHECK-MIPS64EL: "-m" "elf64ltsmip" |
| 718 | // CHECK-MIPS64EL: "-dynamic-linker" "{{.*}}/lib64/ld.so.1" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 719 | // CHECK-MIPS64EL-NOT: "--hash-style={{gnu|both}}" |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 720 | // |
| 721 | // RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-gnu -mnan=2008 \ |
| 722 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-NAN2008 %s |
| 723 | // CHECK-MIPS64EL-NAN2008: "{{.*}}ld{{(.exe)?}}" |
| 724 | // CHECK-MIPS64EL-NAN2008: "-m" "elf64ltsmip" |
| 725 | // CHECK-MIPS64EL-NAN2008: "-dynamic-linker" "{{.*}}/lib64/ld-linux-mipsn8.so.1" |
| 726 | // CHECK-MIPS64EL-NAN2008-NOT: "--hash-style={{gnu|both}}" |
| 727 | // |
| 728 | // RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-gnu -mcpu=mips64r6 \ |
| 729 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64R6EL %s |
| 730 | // CHECK-MIPS64R6EL: "{{.*}}ld{{(.exe)?}}" |
| 731 | // CHECK-MIPS64R6EL: "-m" "elf64ltsmip" |
| 732 | // CHECK-MIPS64R6EL: "-dynamic-linker" "{{.*}}/lib64/ld-linux-mipsn8.so.1" |
| 733 | // CHECK-MIPS64R6EL-NOT: "--hash-style={{gnu|both}}" |
| 734 | // |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 735 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 736 | // RUN: --target=mips64-linux-gnu -mabi=n32 \ |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 737 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64-N32 %s |
| 738 | // CHECK-MIPS64-N32: "{{.*}}ld{{(.exe)?}}" |
| 739 | // CHECK-MIPS64-N32: "-m" "elf32btsmipn32" |
| 740 | // CHECK-MIPS64-N32: "-dynamic-linker" "{{.*}}/lib32/ld.so.1" |
| 741 | // CHECK-MIPS64-N32-NOT: "--hash-style={{gnu|both}}" |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 742 | // |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 743 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 744 | // RUN: --target=mips64el-linux-gnu -mabi=n32 \ |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 745 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-N32 %s |
| 746 | // CHECK-MIPS64EL-N32: "{{.*}}ld{{(.exe)?}}" |
| 747 | // CHECK-MIPS64EL-N32: "-m" "elf32ltsmipn32" |
| 748 | // CHECK-MIPS64EL-N32: "-dynamic-linker" "{{.*}}/lib32/ld.so.1" |
| 749 | // CHECK-MIPS64EL-N32-NOT: "--hash-style={{gnu|both}}" |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 750 | // |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 751 | // RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-gnu -mabi=n32 \ |
| 752 | // RUN: -mnan=2008 | FileCheck --check-prefix=CHECK-MIPS64EL-N32-NAN2008 %s |
| 753 | // CHECK-MIPS64EL-N32-NAN2008: "{{.*}}ld{{(.exe)?}}" |
| 754 | // CHECK-MIPS64EL-N32-NAN2008: "-m" "elf32ltsmipn32" |
| 755 | // CHECK-MIPS64EL-N32-NAN2008: "-dynamic-linker" "{{.*}}/lib32/ld-linux-mipsn8.so.1" |
| 756 | // CHECK-MIPS64EL-N32-NAN2008-NOT: "--hash-style={{gnu|both}}" |
| 757 | // |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 758 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 759 | // RUN: --target=sparc-linux-gnu \ |
| 760 | // RUN: | FileCheck --check-prefix=CHECK-SPARCV8 %s |
| 761 | // CHECK-SPARCV8: "{{.*}}ld{{(.exe)?}}" |
| 762 | // CHECK-SPARCV8: "-m" "elf32_sparc" |
| 763 | // CHECK-SPARCV8: "-dynamic-linker" "/lib/ld-linux.so.2" |
| 764 | // |
| 765 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 766 | // RUN: --target=sparcv9-linux-gnu \ |
| 767 | // RUN: | FileCheck --check-prefix=CHECK-SPARCV9 %s |
| 768 | // CHECK-SPARCV9: "{{.*}}ld{{(.exe)?}}" |
| 769 | // CHECK-SPARCV9: "-m" "elf64_sparc" |
| 770 | // CHECK-SPARCV9: "-dynamic-linker" "/lib64/ld-linux.so.2" |
| 771 | // |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 772 | // Thoroughly exercise the Debian multiarch environment. |
| 773 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 774 | // RUN: --target=i686-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 775 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 776 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 777 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86 %s |
| 778 | // CHECK-DEBIAN-X86: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 779 | // CHECK-DEBIAN-X86: "{{.*}}/usr/lib/gcc/i686-linux-gnu/4.5{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 780 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5" |
| 781 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../../i386-linux-gnu" |
| 782 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu" |
| 783 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../.." |
| 784 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/lib" |
| 785 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib" |
| 786 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 787 | // RUN: --target=x86_64-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 788 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 789 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 790 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86-64 %s |
| 791 | // CHECK-DEBIAN-X86-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 792 | // CHECK-DEBIAN-X86-64: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.5{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 793 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5" |
| 794 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../../x86_64-linux-gnu" |
| 795 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/x86_64-linux-gnu" |
| 796 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../.." |
| 797 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/lib" |
| 798 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib" |
| 799 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 800 | // RUN: --target=powerpc-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 801 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 802 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 803 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC %s |
| 804 | // CHECK-DEBIAN-PPC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 805 | // CHECK-DEBIAN-PPC: "{{.*}}/usr/lib/gcc/powerpc-linux-gnu/4.5{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 806 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5" |
| 807 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../../powerpc-linux-gnu" |
| 808 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/powerpc-linux-gnu" |
| 809 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../.." |
| 810 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/lib" |
| 811 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib" |
| 812 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 813 | // RUN: --target=powerpc64-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 814 | // RUN: --gcc-toolchain="" \ |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 815 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 816 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC64 %s |
| 817 | // CHECK-DEBIAN-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 818 | // CHECK-DEBIAN-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-linux-gnu/4.5{{/|\\\\}}crtbegin.o" |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 819 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5" |
| 820 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../../powerpc64-linux-gnu" |
| 821 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/powerpc64-linux-gnu" |
| 822 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../.." |
| 823 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/lib" |
| 824 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib" |
Simon Atanasyan | 4f148d9 | 2012-04-26 08:35:58 +0000 | [diff] [blame] | 825 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 826 | // RUN: --target=mips-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 827 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | 4f148d9 | 2012-04-26 08:35:58 +0000 | [diff] [blame] | 828 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 829 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS %s |
| 830 | // CHECK-DEBIAN-MIPS: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 831 | // CHECK-DEBIAN-MIPS: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.5{{/|\\\\}}crtbegin.o" |
Simon Atanasyan | 4f148d9 | 2012-04-26 08:35:58 +0000 | [diff] [blame] | 832 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5" |
| 833 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../../mips-linux-gnu" |
| 834 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/mips-linux-gnu" |
| 835 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../.." |
| 836 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/lib" |
| 837 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib" |
| 838 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 839 | // RUN: --target=mipsel-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 840 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | 4f148d9 | 2012-04-26 08:35:58 +0000 | [diff] [blame] | 841 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 842 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPSEL %s |
| 843 | // CHECK-DEBIAN-MIPSEL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 844 | // CHECK-DEBIAN-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.5{{/|\\\\}}crtbegin.o" |
Simon Atanasyan | 4f148d9 | 2012-04-26 08:35:58 +0000 | [diff] [blame] | 845 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5" |
| 846 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../../mipsel-linux-gnu" |
| 847 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/mipsel-linux-gnu" |
| 848 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../.." |
| 849 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/lib" |
| 850 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib" |
Simon Atanasyan | b8c4381 | 2012-04-26 19:57:02 +0000 | [diff] [blame] | 851 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 852 | // RUN: --target=mips64-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 853 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | b8c4381 | 2012-04-26 19:57:02 +0000 | [diff] [blame] | 854 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 855 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64 %s |
| 856 | // CHECK-DEBIAN-MIPS64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 857 | // CHECK-DEBIAN-MIPS64: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.5/64{{/|\\\\}}crtbegin.o" |
Simon Atanasyan | b8c4381 | 2012-04-26 19:57:02 +0000 | [diff] [blame] | 858 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/64" |
| 859 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5" |
| 860 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../.." |
| 861 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/lib" |
| 862 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib" |
| 863 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 864 | // RUN: --target=mips64el-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 865 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | b8c4381 | 2012-04-26 19:57:02 +0000 | [diff] [blame] | 866 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 867 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64EL %s |
| 868 | // CHECK-DEBIAN-MIPS64EL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 869 | // CHECK-DEBIAN-MIPS64EL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.5/64{{/|\\\\}}crtbegin.o" |
Simon Atanasyan | b8c4381 | 2012-04-26 19:57:02 +0000 | [diff] [blame] | 870 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/64" |
| 871 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5" |
| 872 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../.." |
| 873 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/lib" |
| 874 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib" |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 875 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 876 | // RUN: --target=mips64-linux-gnu -mabi=n32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 877 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 878 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 879 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64-N32 %s |
| 880 | // CHECK-DEBIAN-MIPS64-N32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 881 | // CHECK-DEBIAN-MIPS64-N32: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.5/n32{{/|\\\\}}crtbegin.o" |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 882 | // CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/n32" |
| 883 | // CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5" |
| 884 | // CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../.." |
| 885 | // CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/lib" |
| 886 | // CHECK-DEBIAN-MIPS64-N32: "-L[[SYSROOT]]/usr/lib" |
| 887 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 888 | // RUN: --target=mips64el-linux-gnu -mabi=n32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 889 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 890 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 891 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64EL-N32 %s |
| 892 | // CHECK-DEBIAN-MIPS64EL-N32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 893 | // CHECK-DEBIAN-MIPS64EL-N32: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.5/n32{{/|\\\\}}crtbegin.o" |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 894 | // CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/n32" |
| 895 | // CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5" |
| 896 | // CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../.." |
| 897 | // CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/lib" |
| 898 | // CHECK-DEBIAN-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 899 | // |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 900 | // Test linker invocation on Android. |
| 901 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 902 | // RUN: --target=arm-linux-androideabi \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 903 | // RUN: --gcc-toolchain="" \ |
Evgeniy Stepanov | 1d01afe | 2012-09-03 09:05:50 +0000 | [diff] [blame] | 904 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 905 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s |
Logan Chien | 94a7142 | 2012-09-02 09:30:11 +0000 | [diff] [blame] | 906 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 907 | // RUN: --target=arm-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 908 | // RUN: --gcc-toolchain="" \ |
Evgeniy Stepanov | 1d01afe | 2012-09-03 09:05:50 +0000 | [diff] [blame] | 909 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
Logan Chien | 94a7142 | 2012-09-02 09:30:11 +0000 | [diff] [blame] | 910 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s |
Simon Atanasyan | f8d9bd5 | 2012-10-03 17:46:38 +0000 | [diff] [blame] | 911 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 912 | // RUN: --target=aarch64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 913 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 914 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 915 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s |
| 916 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 917 | // RUN: --target=arm64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 918 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 919 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 920 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s |
| 921 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 922 | // RUN: --target=mipsel-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 923 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | f8d9bd5 | 2012-10-03 17:46:38 +0000 | [diff] [blame] | 924 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 925 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s |
Rafael Espindola | 715852c | 2012-11-02 20:41:30 +0000 | [diff] [blame] | 926 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 927 | // RUN: --target=mips64el-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 928 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 929 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 930 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s |
| 931 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 932 | // RUN: --target=i686-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 933 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 934 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 935 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s |
| 936 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 937 | // RUN: --target=x86_64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 938 | // RUN: --gcc-toolchain="" \ |
Rafael Espindola | 715852c | 2012-11-02 20:41:30 +0000 | [diff] [blame] | 939 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 940 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 941 | // CHECK-ANDROID: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 942 | // CHECK-ANDROID: "{{.*}}{{/|\\\\}}crtbegin_dynamic.o" |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 943 | // CHECK-ANDROID: "-L[[SYSROOT]]/usr/lib" |
| 944 | // CHECK-ANDROID-NOT: "gcc_s" |
| 945 | // CHECK-ANDROID: "-lgcc" |
Logan Chien | 529a73d | 2012-11-19 12:04:11 +0000 | [diff] [blame] | 946 | // CHECK-ANDROID: "-ldl" |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 947 | // CHECK-ANDROID-NOT: "gcc_s" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 948 | // CHECK-ANDROID: "{{.*}}{{/|\\\\}}crtend_android.o" |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 949 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 950 | // RUN: --target=arm-linux-androideabi \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 951 | // RUN: --gcc-toolchain="" \ |
Evgeniy Stepanov | 1d01afe | 2012-09-03 09:05:50 +0000 | [diff] [blame] | 952 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 953 | // RUN: -shared \ |
| 954 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s |
Logan Chien | 94a7142 | 2012-09-02 09:30:11 +0000 | [diff] [blame] | 955 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 956 | // RUN: --target=arm-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 957 | // RUN: --gcc-toolchain="" \ |
Evgeniy Stepanov | 1d01afe | 2012-09-03 09:05:50 +0000 | [diff] [blame] | 958 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
Logan Chien | 94a7142 | 2012-09-02 09:30:11 +0000 | [diff] [blame] | 959 | // RUN: -shared \ |
| 960 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s |
Simon Atanasyan | f8d9bd5 | 2012-10-03 17:46:38 +0000 | [diff] [blame] | 961 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 962 | // RUN: --target=aarch64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 963 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 964 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 965 | // RUN: -shared \ |
| 966 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s |
| 967 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 968 | // RUN: --target=arm64-linux-android \ |
| 969 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 970 | // RUN: -shared \ |
| 971 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s |
| 972 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 973 | // RUN: --target=mipsel-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 974 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | f8d9bd5 | 2012-10-03 17:46:38 +0000 | [diff] [blame] | 975 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 976 | // RUN: -shared \ |
| 977 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s |
Rafael Espindola | 715852c | 2012-11-02 20:41:30 +0000 | [diff] [blame] | 978 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 979 | // RUN: --target=mips64el-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 980 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 981 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 982 | // RUN: -shared \ |
| 983 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s |
| 984 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 985 | // RUN: --target=i686-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 986 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 987 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 988 | // RUN: -shared \ |
| 989 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s |
| 990 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 991 | // RUN: --target=x86_64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 992 | // RUN: --gcc-toolchain="" \ |
Rafael Espindola | 715852c | 2012-11-02 20:41:30 +0000 | [diff] [blame] | 993 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 994 | // RUN: -shared \ |
| 995 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 996 | // CHECK-ANDROID-SO: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 997 | // CHECK-ANDROID-SO-NOT: "-Bsymbolic" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 998 | // CHECK-ANDROID-SO: "{{.*}}{{/|\\\\}}crtbegin_so.o" |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 999 | // CHECK-ANDROID-SO: "-L[[SYSROOT]]/usr/lib" |
| 1000 | // CHECK-ANDROID-SO-NOT: "gcc_s" |
| 1001 | // CHECK-ANDROID-SO: "-lgcc" |
Logan Chien | 529a73d | 2012-11-19 12:04:11 +0000 | [diff] [blame] | 1002 | // CHECK-ANDROID-SO: "-ldl" |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 1003 | // CHECK-ANDROID-SO-NOT: "gcc_s" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1004 | // CHECK-ANDROID-SO: "{{.*}}{{/|\\\\}}crtend_so.o" |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 1005 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1006 | // RUN: --target=arm-linux-androideabi \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1007 | // RUN: --gcc-toolchain="" \ |
Evgeniy Stepanov | 1d01afe | 2012-09-03 09:05:50 +0000 | [diff] [blame] | 1008 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 1009 | // RUN: -static \ |
| 1010 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s |
Logan Chien | 94a7142 | 2012-09-02 09:30:11 +0000 | [diff] [blame] | 1011 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1012 | // RUN: --target=arm-linux-android \ |
Evgeniy Stepanov | 1d01afe | 2012-09-03 09:05:50 +0000 | [diff] [blame] | 1013 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
Logan Chien | 94a7142 | 2012-09-02 09:30:11 +0000 | [diff] [blame] | 1014 | // RUN: -static \ |
| 1015 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s |
Simon Atanasyan | f8d9bd5 | 2012-10-03 17:46:38 +0000 | [diff] [blame] | 1016 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1017 | // RUN: --target=aarch64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1018 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1019 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1020 | // RUN: -static \ |
| 1021 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s |
| 1022 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1023 | // RUN: --target=arm64-linux-android \ |
| 1024 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1025 | // RUN: -static \ |
| 1026 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s |
| 1027 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1028 | // RUN: --target=mipsel-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1029 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | f8d9bd5 | 2012-10-03 17:46:38 +0000 | [diff] [blame] | 1030 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1031 | // RUN: -static \ |
| 1032 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s |
Rafael Espindola | 715852c | 2012-11-02 20:41:30 +0000 | [diff] [blame] | 1033 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1034 | // RUN: --target=mips64el-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1035 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1036 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1037 | // RUN: -static \ |
| 1038 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s |
| 1039 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1040 | // RUN: --target=i686-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1041 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1042 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1043 | // RUN: -static \ |
| 1044 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s |
| 1045 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 1046 | // RUN: --target=x86_64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1047 | // RUN: --gcc-toolchain="" \ |
Rafael Espindola | 715852c | 2012-11-02 20:41:30 +0000 | [diff] [blame] | 1048 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1049 | // RUN: -static \ |
| 1050 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 1051 | // CHECK-ANDROID-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1052 | // CHECK-ANDROID-STATIC: "{{.*}}{{/|\\\\}}crtbegin_static.o" |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 1053 | // CHECK-ANDROID-STATIC: "-L[[SYSROOT]]/usr/lib" |
| 1054 | // CHECK-ANDROID-STATIC-NOT: "gcc_s" |
| 1055 | // CHECK-ANDROID-STATIC: "-lgcc" |
Logan Chien | 529a73d | 2012-11-19 12:04:11 +0000 | [diff] [blame] | 1056 | // CHECK-ANDROID-STATIC-NOT: "-ldl" |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 1057 | // CHECK-ANDROID-STATIC-NOT: "gcc_s" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1058 | // CHECK-ANDROID-STATIC: "{{.*}}{{/|\\\\}}crtend_android.o" |
Evgeniy Stepanov | a92983d | 2012-09-10 10:30:12 +0000 | [diff] [blame] | 1059 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1060 | // RUN: --target=arm-linux-androideabi \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1061 | // RUN: --gcc-toolchain="" \ |
Evgeniy Stepanov | a92983d | 2012-09-10 10:30:12 +0000 | [diff] [blame] | 1062 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1063 | // RUN: -pie \ |
| 1064 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s |
| 1065 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1066 | // RUN: --target=arm-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1067 | // RUN: --gcc-toolchain="" \ |
Evgeniy Stepanov | a92983d | 2012-09-10 10:30:12 +0000 | [diff] [blame] | 1068 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1069 | // RUN: -pie \ |
| 1070 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s |
Simon Atanasyan | f8d9bd5 | 2012-10-03 17:46:38 +0000 | [diff] [blame] | 1071 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1072 | // RUN: --target=aarch64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1073 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1074 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1075 | // RUN: -pie \ |
| 1076 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s |
| 1077 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1078 | // RUN: --target=arm64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1079 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1080 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1081 | // RUN: -pie \ |
| 1082 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s |
| 1083 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1084 | // RUN: --target=mipsel-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1085 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | f8d9bd5 | 2012-10-03 17:46:38 +0000 | [diff] [blame] | 1086 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1087 | // RUN: -pie \ |
| 1088 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s |
Rafael Espindola | 715852c | 2012-11-02 20:41:30 +0000 | [diff] [blame] | 1089 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1090 | // RUN: --target=mips64el-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1091 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1092 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1093 | // RUN: -pie \ |
| 1094 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s |
| 1095 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1096 | // RUN: --target=i686-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1097 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1098 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1099 | // RUN: -pie \ |
| 1100 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s |
| 1101 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1102 | // RUN: --target=x86_64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1103 | // RUN: --gcc-toolchain="" \ |
Rafael Espindola | 715852c | 2012-11-02 20:41:30 +0000 | [diff] [blame] | 1104 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1105 | // RUN: -pie \ |
| 1106 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s |
Evgeniy Stepanov | a92983d | 2012-09-10 10:30:12 +0000 | [diff] [blame] | 1107 | // CHECK-ANDROID-PIE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1108 | // CHECK-ANDROID-PIE: "{{.*}}{{/|\\\\}}crtbegin_dynamic.o" |
Evgeniy Stepanov | a92983d | 2012-09-10 10:30:12 +0000 | [diff] [blame] | 1109 | // CHECK-ANDROID-PIE: "-L[[SYSROOT]]/usr/lib" |
| 1110 | // CHECK-ANDROID-PIE-NOT: "gcc_s" |
| 1111 | // CHECK-ANDROID-PIE: "-lgcc" |
| 1112 | // CHECK-ANDROID-PIE-NOT: "gcc_s" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1113 | // CHECK-ANDROID-PIE: "{{.*}}{{/|\\\\}}crtend_android.o" |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1114 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1115 | // RUN: --target=arm-linux-androideabi \ |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 1116 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s |
| 1117 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1118 | // RUN: --target=arm-linux-android \ |
| 1119 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s |
| 1120 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1121 | // RUN: --target=aarch64-linux-android \ |
| 1122 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s |
| 1123 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1124 | // RUN: --target=arm64-linux-android \ |
| 1125 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s |
| 1126 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1127 | // RUN: --target=mipsel-linux-android \ |
| 1128 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s |
| 1129 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1130 | // RUN: --target=mips64el-linux-android \ |
| 1131 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s |
| 1132 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1133 | // RUN: --target=i686-linux-android \ |
| 1134 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s |
| 1135 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1136 | // RUN: --target=x86_64-linux-android \ |
| 1137 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-NO-DEFAULT-PIE %s |
| 1138 | // CHECK-ANDROID-NO-DEFAULT-PIE-NOT: -pie |
| 1139 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1140 | // RUN: --target=arm-linux-androideabi \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1141 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1142 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1143 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s |
| 1144 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1145 | // RUN: --target=arm-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1146 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1147 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1148 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s |
| 1149 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1150 | // RUN: --target=mipsel-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1151 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1152 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1153 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s |
| 1154 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1155 | // RUN: --target=aarch64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1156 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1157 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1158 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s |
| 1159 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1160 | // RUN: --target=arm64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1161 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1162 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1163 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s |
| 1164 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1165 | // RUN: --target=mips64el-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1166 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1167 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1168 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s |
| 1169 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1170 | // RUN: --target=i686-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1171 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1172 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1173 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s |
| 1174 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1175 | // RUN: --target=x86_64-linux-android \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1176 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1177 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1178 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s |
| 1179 | // CHECK-ANDROID-32: "-dynamic-linker" "/system/bin/linker" |
| 1180 | // CHECK-ANDROID-64: "-dynamic-linker" "/system/bin/linker64" |
Simon Atanasyan | 7a91888 | 2012-09-14 11:27:24 +0000 | [diff] [blame] | 1181 | // |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1182 | // Test that -pthread does not add -lpthread on Android. |
| 1183 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1184 | // RUN: --target=arm-linux-androideabi -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1185 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1186 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1187 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1188 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1189 | // RUN: --target=arm-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1190 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1191 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1192 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1193 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1194 | // RUN: --target=aarch64-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1195 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1196 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1197 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1198 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1199 | // RUN: --target=arm64-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1200 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1201 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1202 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1203 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1204 | // RUN: --target=mipsel-linux-android -pthread \ |
| 1205 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1206 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1207 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1208 | // RUN: --target=mips64el-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1209 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1210 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1211 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1212 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1213 | // RUN: --target=i686-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1214 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1215 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1216 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1217 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1218 | // RUN: --target=x86_64-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1219 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1220 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1221 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1222 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1223 | // RUN: --target=arm-linux-androideabi -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1224 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1225 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1226 | // RUN: -shared \ |
| 1227 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1228 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1229 | // RUN: --target=arm-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1230 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1231 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1232 | // RUN: -shared \ |
| 1233 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1234 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1235 | // RUN: --target=aarch64-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1236 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1237 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1238 | // RUN: -shared \ |
| 1239 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1240 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1241 | // RUN: --target=arm64-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1242 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1243 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1244 | // RUN: -shared \ |
| 1245 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1246 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1247 | // RUN: --target=mipsel-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1248 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1249 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1250 | // RUN: -shared \ |
| 1251 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1252 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1253 | // RUN: --target=mips64el-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1254 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1255 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1256 | // RUN: -shared \ |
| 1257 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1258 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1259 | // RUN: --target=i686-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1260 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1261 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1262 | // RUN: -shared \ |
| 1263 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1264 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1265 | // RUN: --target=x86_64-linux-android -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1266 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1267 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1268 | // RUN: -shared \ |
| 1269 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s |
| 1270 | // CHECK-ANDROID-PTHREAD-NOT: -lpthread |
| 1271 | // |
| 1272 | // RUN: %clang -no-canonical-prefixes %t.o -### -o %t 2>&1 \ |
| 1273 | // RUN: --target=arm-linux-androideabi -pthread \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1274 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1275 | // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ |
| 1276 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD-LINK %s |
| 1277 | // CHECK-ANDROID-PTHREAD-LINK-NOT: argument unused during compilation: '-pthread' |
| 1278 | // |
Simon Atanasyan | 7a91888 | 2012-09-14 11:27:24 +0000 | [diff] [blame] | 1279 | // Check linker invocation on Debian 6 MIPS 32/64-bit. |
| 1280 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1281 | // RUN: --target=mipsel-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1282 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | 7a91888 | 2012-09-14 11:27:24 +0000 | [diff] [blame] | 1283 | // RUN: --sysroot=%S/Inputs/debian_6_mips_tree \ |
| 1284 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPSEL %s |
| 1285 | // CHECK-DEBIAN-ML-MIPSEL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1286 | // CHECK-DEBIAN-ML-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib{{/|\\\\}}crt1.o" |
| 1287 | // CHECK-DEBIAN-ML-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib{{/|\\\\}}crti.o" |
| 1288 | // CHECK-DEBIAN-ML-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4{{/|\\\\}}crtbegin.o" |
Simon Atanasyan | 7a91888 | 2012-09-14 11:27:24 +0000 | [diff] [blame] | 1289 | // CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4" |
| 1290 | // CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib" |
| 1291 | // CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/lib/../lib" |
| 1292 | // CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib/../lib" |
| 1293 | // CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../.." |
| 1294 | // CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/lib" |
| 1295 | // CHECK-DEBIAN-ML-MIPSEL: "-L[[SYSROOT]]/usr/lib" |
| 1296 | // |
| 1297 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1298 | // RUN: --target=mips64el-linux-gnu \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1299 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | 7a91888 | 2012-09-14 11:27:24 +0000 | [diff] [blame] | 1300 | // RUN: --sysroot=%S/Inputs/debian_6_mips_tree \ |
| 1301 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL %s |
| 1302 | // CHECK-DEBIAN-ML-MIPS64EL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1303 | // CHECK-DEBIAN-ML-MIPS64EL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib64{{/|\\\\}}crt1.o" |
| 1304 | // CHECK-DEBIAN-ML-MIPS64EL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib64{{/|\\\\}}crti.o" |
| 1305 | // CHECK-DEBIAN-ML-MIPS64EL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/64{{/|\\\\}}crtbegin.o" |
Simon Atanasyan | 7a91888 | 2012-09-14 11:27:24 +0000 | [diff] [blame] | 1306 | // CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/64" |
| 1307 | // CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib64" |
| 1308 | // CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/lib/../lib64" |
| 1309 | // CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib/../lib64" |
| 1310 | // CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../.." |
| 1311 | // CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/lib" |
| 1312 | // CHECK-DEBIAN-ML-MIPS64EL: "-L[[SYSROOT]]/usr/lib" |
Hal Finkel | 02014b4 | 2012-09-18 22:25:07 +0000 | [diff] [blame] | 1313 | // |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 1314 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1315 | // RUN: --target=mips64el-linux-gnu -mabi=n32 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1316 | // RUN: --gcc-toolchain="" \ |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 1317 | // RUN: --sysroot=%S/Inputs/debian_6_mips_tree \ |
| 1318 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-N32 %s |
| 1319 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1320 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib32{{/|\\\\}}crt1.o" |
| 1321 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib32{{/|\\\\}}crti.o" |
| 1322 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.4/n32{{/|\\\\}}crtbegin.o" |
Simon Atanasyan | f4bd329 | 2012-10-21 11:44:57 +0000 | [diff] [blame] | 1323 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/n32" |
| 1324 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../../../lib32" |
| 1325 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/lib/../lib32" |
| 1326 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/../lib32" |
| 1327 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.4/../../.." |
| 1328 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/lib" |
| 1329 | // CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib" |
| 1330 | // |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1331 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1332 | // RUN: --target=mips64-linux-gnuabi64 -mabi=n64 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1333 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1334 | // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ |
| 1335 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64-GNUABI %s |
| 1336 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 1337 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crt1.o" |
| 1338 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crti.o" |
| 1339 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9{{/|\\\\}}crtbegin.o" |
| 1340 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9" |
| 1341 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64" |
| 1342 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/lib/mips64-linux-gnuabi64" |
| 1343 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/mips64-linux-gnuabi64" |
| 1344 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9" |
| 1345 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../.." |
| 1346 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/lib" |
| 1347 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib" |
| 1348 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9{{/|\\\\}}crtend.o" |
| 1349 | // CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crtn.o" |
| 1350 | // |
| 1351 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1352 | // RUN: --target=mips64el-linux-gnuabi64 -mabi=n64 \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1353 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1354 | // RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \ |
| 1355 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-GNUABI %s |
| 1356 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 1357 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64{{/|\\\\}}crt1.o" |
| 1358 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64{{/|\\\\}}crti.o" |
| 1359 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9{{/|\\\\}}crtbegin.o" |
| 1360 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9" |
| 1361 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64" |
| 1362 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/lib/mips64el-linux-gnuabi64" |
| 1363 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/mips64el-linux-gnuabi64" |
| 1364 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9" |
| 1365 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../.." |
| 1366 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/lib" |
| 1367 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib" |
| 1368 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9{{/|\\\\}}crtend.o" |
| 1369 | // CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64{{/|\\\\}}crtn.o" |
| 1370 | // |
Hal Finkel | 02014b4 | 2012-09-18 22:25:07 +0000 | [diff] [blame] | 1371 | // Test linker invocation for Freescale SDK (OpenEmbedded). |
| 1372 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1373 | // RUN: --target=powerpc-fsl-linux \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1374 | // RUN: --gcc-toolchain="" \ |
Hal Finkel | 02014b4 | 2012-09-18 22:25:07 +0000 | [diff] [blame] | 1375 | // RUN: --sysroot=%S/Inputs/freescale_ppc_tree \ |
| 1376 | // RUN: | FileCheck --check-prefix=CHECK-FSL-PPC %s |
| 1377 | // CHECK-FSL-PPC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 1378 | // CHECK-FSL-PPC: "-m" "elf32ppclinux" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1379 | // CHECK-FSL-PPC: "{{.*}}{{/|\\\\}}crt1.o" |
| 1380 | // CHECK-FSL-PPC: "{{.*}}{{/|\\\\}}crtbegin.o" |
Hal Finkel | 02014b4 | 2012-09-18 22:25:07 +0000 | [diff] [blame] | 1381 | // CHECK-FSL-PPC: "-L[[SYSROOT]]/usr/lib" |
| 1382 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1383 | // RUN: --target=powerpc64-fsl-linux \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1384 | // RUN: --gcc-toolchain="" \ |
Hal Finkel | 02014b4 | 2012-09-18 22:25:07 +0000 | [diff] [blame] | 1385 | // RUN: --sysroot=%S/Inputs/freescale_ppc64_tree \ |
| 1386 | // RUN: | FileCheck --check-prefix=CHECK-FSL-PPC64 %s |
| 1387 | // CHECK-FSL-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 1388 | // CHECK-FSL-PPC64: "-m" "elf64ppc" |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1389 | // CHECK-FSL-PPC64: "{{.*}}{{/|\\\\}}crt1.o" |
| 1390 | // CHECK-FSL-PPC64: "{{.*}}{{/|\\\\}}crtbegin.o" |
Hal Finkel | 02014b4 | 2012-09-18 22:25:07 +0000 | [diff] [blame] | 1391 | // CHECK-FSL-PPC64: "-L[[SYSROOT]]/usr/lib64/powerpc64-fsl-linux/4.6.2/../.." |
Benjamin Kramer | e20e508 | 2012-10-04 19:42:20 +0000 | [diff] [blame] | 1392 | // |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1393 | // Check that crtfastmath.o is linked with -ffast-math and with -Ofast. |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1394 | // RUN: %clang --target=x86_64-unknown-linux -### %s \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1395 | // RUN: --gcc-toolchain="" \ |
Benjamin Kramer | e20e508 | 2012-10-04 19:42:20 +0000 | [diff] [blame] | 1396 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1397 | // RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1398 | // RUN: %clang --target=x86_64-unknown-linux -### %s -ffast-math \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1399 | // RUN: --gcc-toolchain="" \ |
Benjamin Kramer | e20e508 | 2012-10-04 19:42:20 +0000 | [diff] [blame] | 1400 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1401 | // RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1402 | // RUN: %clang --target=x86_64-unknown-linux -### %s -funsafe-math-optimizations\ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1403 | // RUN: --gcc-toolchain="" \ |
Benjamin Kramer | e20e508 | 2012-10-04 19:42:20 +0000 | [diff] [blame] | 1404 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1405 | // RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1406 | // RUN: %clang --target=x86_64-unknown-linux -### %s -Ofast\ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1407 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1408 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1409 | // RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s |
| 1410 | // RUN: %clang --target=x86_64-unknown-linux -### %s -Ofast -O3\ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1411 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1412 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1413 | // RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s |
| 1414 | // RUN: %clang --target=x86_64-unknown-linux -### %s -O3 -Ofast\ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1415 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1416 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1417 | // RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1418 | // RUN: %clang --target=x86_64-unknown-linux -### %s -ffast-math -fno-fast-math \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1419 | // RUN: --gcc-toolchain="" \ |
Benjamin Kramer | e20e508 | 2012-10-04 19:42:20 +0000 | [diff] [blame] | 1420 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1421 | // RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1422 | // RUN: %clang --target=x86_64-unknown-linux -### %s -Ofast -fno-fast-math \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1423 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1424 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1425 | // RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s |
| 1426 | // RUN: %clang --target=x86_64-unknown-linux -### %s -Ofast -fno-unsafe-math-optimizations \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1427 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1428 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1429 | // RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s |
| 1430 | // RUN: %clang --target=x86_64-unknown-linux -### %s -fno-fast-math -Ofast \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1431 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1432 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1433 | // RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s |
| 1434 | // RUN: %clang --target=x86_64-unknown-linux -### %s -fno-unsafe-math-optimizations -Ofast \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1435 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1436 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1437 | // RUN: | FileCheck --check-prefix=CHECK-CRTFASTMATH %s |
Benjamin Kramer | e20e508 | 2012-10-04 19:42:20 +0000 | [diff] [blame] | 1438 | // We don't have crtfastmath.o in the i386 tree, use it to check that file |
| 1439 | // detection works. |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1440 | // RUN: %clang --target=i386-unknown-linux -### %s -ffast-math \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1441 | // RUN: --gcc-toolchain="" \ |
Benjamin Kramer | e20e508 | 2012-10-04 19:42:20 +0000 | [diff] [blame] | 1442 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>&1 \ |
| 1443 | // RUN: | FileCheck --check-prefix=CHECK-NOCRTFASTMATH %s |
Rafael Espindola | e4664a9 | 2013-06-24 22:07:15 +0000 | [diff] [blame] | 1444 | // CHECK-CRTFASTMATH: usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtfastmath.o |
Benjamin Kramer | e20e508 | 2012-10-04 19:42:20 +0000 | [diff] [blame] | 1445 | // CHECK-NOCRTFASTMATH-NOT: crtfastmath.o |
Eric Christopher | 61f0868 | 2013-06-07 23:25:01 +0000 | [diff] [blame] | 1446 | |
| 1447 | // Check that we link in gcrt1.o when compiling with -pg |
Chandler Carruth | fbd4116 | 2013-06-20 09:42:40 +0000 | [diff] [blame] | 1448 | // RUN: %clang -pg --target=x86_64-unknown-linux -### %s \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1449 | // RUN: --gcc-toolchain="" \ |
Eric Christopher | 61f0868 | 2013-06-07 23:25:01 +0000 | [diff] [blame] | 1450 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>& 1 \ |
| 1451 | // RUN: | FileCheck --check-prefix=CHECK-PG %s |
| 1452 | // CHECK-PG: gcrt1.o |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1453 | |
| 1454 | // GCC forwards -u to the linker. |
| 1455 | // RUN: %clang -u asdf --target=x86_64-unknown-linux -### %s \ |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1456 | // RUN: --gcc-toolchain="" \ |
Stephen Hines | c568f1e | 2014-07-21 00:47:37 -0700 | [diff] [blame] | 1457 | // RUN: --sysroot=%S/Inputs/basic_linux_tree 2>& 1 \ |
| 1458 | // RUN: | FileCheck --check-prefix=CHECK-u %s |
| 1459 | // CHECK-u: "-u" "asdf" |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 1460 | |
| 1461 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1462 | // RUN: --target=armeb-unknown-linux \ |
| 1463 | // RUN: --gcc-toolchain="" \ |
| 1464 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 1465 | // RUN: | FileCheck --check-prefix=CHECK-ARMEB %s |
| 1466 | // CHECK-ARMEB: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 1467 | // CHECK-ARMEB-NOT: "--be8" |
| 1468 | // CHECK-ARMEB: "-m" "armebelf_linux_eabi" |
| 1469 | |
| 1470 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 1471 | // RUN: --target=armebv7-unknown-linux \ |
| 1472 | // RUN: --gcc-toolchain="" \ |
| 1473 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 1474 | // RUN: | FileCheck --check-prefix=CHECK-ARMV7EB %s |
| 1475 | // CHECK-ARMV7EB: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 1476 | // CHECK-ARMV7EB: "--be8" |
| 1477 | // CHECK-ARMV7EB: "-m" "armebelf_linux_eabi" |