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 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 5 | // RUN: -target i386-unknown-linux \ |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 6 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 7 | // RUN: | FileCheck --check-prefix=CHECK-LD-32 %s |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 8 | // CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | b6fdf8f | 2011-10-03 08:16:09 +0000 | [diff] [blame] | 9 | // 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] | 10 | // 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] | 11 | // 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] | 12 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.." |
| 13 | // CHECK-LD-32: "-L[[SYSROOT]]/lib" |
| 14 | // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 15 | // |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 16 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 17 | // RUN: -target x86_64-unknown-linux \ |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 18 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
Chandler Carruth | c4cc403 | 2011-10-01 00:37:39 +0000 | [diff] [blame] | 19 | // RUN: | FileCheck --check-prefix=CHECK-LD-64 %s |
Chandler Carruth | fde8d14 | 2011-10-03 06:41:08 +0000 | [diff] [blame] | 20 | // CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | b6fdf8f | 2011-10-03 08:16:09 +0000 | [diff] [blame] | 21 | // 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] | 22 | // 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] | 23 | // 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] | 24 | // CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 25 | // CHECK-LD-64: "-L[[SYSROOT]]/lib" |
| 26 | // CHECK-LD-64: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 27 | // |
| 28 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 29 | // RUN: -target i386-unknown-linux -m32 \ |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 30 | // RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \ |
| 31 | // RUN: | FileCheck --check-prefix=CHECK-32-TO-32 %s |
| 32 | // CHECK-32-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 33 | // CHECK-32-TO-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0/crtbegin.o" |
| 34 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0" |
| 35 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib/../lib32" |
| 36 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../lib32" |
| 37 | // CHECK-32-TO-32: "-L[[SYSROOT]]/lib/../lib32" |
| 38 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32" |
| 39 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib" |
| 40 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.." |
| 41 | // CHECK-32-TO-32: "-L[[SYSROOT]]/lib" |
| 42 | // CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib" |
| 43 | // |
| 44 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 45 | // RUN: -target i386-unknown-linux -m64 \ |
Chandler Carruth | 38ec546 | 2011-10-03 09:00:50 +0000 | [diff] [blame] | 46 | // RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \ |
| 47 | // RUN: | FileCheck --check-prefix=CHECK-32-TO-64 %s |
| 48 | // CHECK-32-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 49 | // CHECK-32-TO-64: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0/64/crtbegin.o" |
| 50 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/64" |
| 51 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib/../lib64" |
| 52 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../lib64" |
| 53 | // CHECK-32-TO-64: "-L[[SYSROOT]]/lib/../lib64" |
| 54 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64" |
| 55 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0" |
| 56 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib" |
| 57 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.." |
| 58 | // CHECK-32-TO-64: "-L[[SYSROOT]]/lib" |
| 59 | // CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | c5306b0 | 2011-10-03 09:08:26 +0000 | [diff] [blame] | 60 | // |
| 61 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 62 | // RUN: -target x86_64-unknown-linux -m64 \ |
Chandler Carruth | c5306b0 | 2011-10-03 09:08:26 +0000 | [diff] [blame] | 63 | // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ |
| 64 | // RUN: | FileCheck --check-prefix=CHECK-64-TO-64 %s |
| 65 | // CHECK-64-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 66 | // CHECK-64-TO-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o" |
| 67 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 68 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib64" |
| 69 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib64" |
| 70 | // CHECK-64-TO-64: "-L[[SYSROOT]]/lib/../lib64" |
| 71 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64" |
| 72 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 73 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 74 | // CHECK-64-TO-64: "-L[[SYSROOT]]/lib" |
| 75 | // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib" |
| 76 | // |
| 77 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 78 | // RUN: -target x86_64-unknown-linux -m32 \ |
Chandler Carruth | c5306b0 | 2011-10-03 09:08:26 +0000 | [diff] [blame] | 79 | // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ |
| 80 | // RUN: | FileCheck --check-prefix=CHECK-64-TO-32 %s |
| 81 | // CHECK-64-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 82 | // CHECK-64-TO-32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32/crtbegin.o" |
| 83 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32" |
| 84 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib32" |
| 85 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib32" |
| 86 | // CHECK-64-TO-32: "-L[[SYSROOT]]/lib/../lib32" |
| 87 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32" |
| 88 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 89 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" |
| 90 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.." |
| 91 | // CHECK-64-TO-32: "-L[[SYSROOT]]/lib" |
| 92 | // CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 93 | // |
| 94 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Chandler Carruth | 9f31437 | 2012-04-06 16:32:06 +0000 | [diff] [blame] | 95 | // RUN: -target x86_64-unknown-linux -m32 \ |
| 96 | // RUN: -gcc-toolchain %S/Inputs/multilib_64bit_linux_tree/usr \ |
| 97 | // RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \ |
| 98 | // RUN: | FileCheck --check-prefix=CHECK-64-TO-32-SYSROOT %s |
| 99 | // CHECK-64-TO-32-SYSROOT: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 100 | // CHECK-64-TO-32-SYSROOT: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32/crtbegin.o" |
| 101 | // CHECK-64-TO-32-SYSROOT: "-L{{[^"]*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32" |
| 102 | // CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/lib/../lib32" |
| 103 | // CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/usr/lib/../lib32" |
| 104 | // CHECK-64-TO-32-SYSROOT: "-L{{[^"]*}}/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0" |
| 105 | // CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/lib" |
| 106 | // CHECK-64-TO-32-SYSROOT: "-L[[SYSROOT]]/usr/lib" |
| 107 | // |
| 108 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 109 | // RUN: -target i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 110 | // RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \ |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 111 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 112 | // RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-32 %s |
| 113 | // CHECK-INSTALL-DIR-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 114 | // CHECK-INSTALL-DIR-32: "{{.*}}/Inputs/fake_install_tree/bin/../lib/gcc/i386-unknown-linux/4.7.0/crtbegin.o" |
| 115 | // 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] | 116 | // |
| 117 | // Check that with 64-bit builds, we don't actually use the install directory |
| 118 | // as its version of GCC is lower than our sysrooted version. |
| 119 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 120 | // RUN: -target x86_64-unknown-linux -m64 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 121 | // RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \ |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 122 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 123 | // RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-64 %s |
| 124 | // CHECK-INSTALL-DIR-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 125 | // CHECK-INSTALL-DIR-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o" |
| 126 | // 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] | 127 | // |
| 128 | // Check that we support unusual patch version formats, including missing that |
| 129 | // component. |
| 130 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 131 | // RUN: -target i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 132 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing1/bin \ |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 133 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 134 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION1 %s |
| 135 | // CHECK-GCC-VERSION1: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 136 | // CHECK-GCC-VERSION1: "{{.*}}/Inputs/gcc_version_parsing1/bin/../lib/gcc/i386-unknown-linux/4.7/crtbegin.o" |
| 137 | // 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] | 138 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 139 | // RUN: -target i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 140 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing2/bin \ |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 141 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 142 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION2 %s |
| 143 | // CHECK-GCC-VERSION2: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 144 | // CHECK-GCC-VERSION2: "{{.*}}/Inputs/gcc_version_parsing2/bin/../lib/gcc/i386-unknown-linux/4.7.x/crtbegin.o" |
| 145 | // 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] | 146 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 147 | // RUN: -target i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 148 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing3/bin \ |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 149 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 150 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION3 %s |
| 151 | // CHECK-GCC-VERSION3: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 152 | // CHECK-GCC-VERSION3: "{{.*}}/Inputs/gcc_version_parsing3/bin/../lib/gcc/i386-unknown-linux/4.7.99-rc5/crtbegin.o" |
| 153 | // 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] | 154 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 155 | // RUN: -target i386-unknown-linux -m32 \ |
Chandler Carruth | cb2e00f | 2011-11-05 23:24:30 +0000 | [diff] [blame] | 156 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing4/bin \ |
| 157 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 158 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION4 %s |
| 159 | // CHECK-GCC-VERSION4: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 160 | // CHECK-GCC-VERSION4: "{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99/crtbegin.o" |
| 161 | // 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] | 162 | // |
| 163 | // Test a very broken version of multiarch that shipped in Ubuntu 11.04. |
| 164 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 165 | // RUN: -target i386-unknown-linux \ |
Chandler Carruth | d936d9d | 2011-11-09 03:46:20 +0000 | [diff] [blame] | 166 | // RUN: --sysroot=%S/Inputs/ubuntu_11.04_multiarch_tree \ |
| 167 | // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-11-04 %s |
| 168 | // CHECK-UBUNTU-11-04: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 169 | // CHECK-UBUNTU-11-04: "{{.*}}/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/crtbegin.o" |
| 170 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5" |
| 171 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../i386-linux-gnu" |
| 172 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu" |
| 173 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.." |
| 174 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/lib" |
| 175 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib" |
Hal Finkel | 39993dd | 2011-12-08 20:36:19 +0000 | [diff] [blame] | 176 | // |
Jiangning Liu | ff104a1 | 2012-07-31 08:06:29 +0000 | [diff] [blame] | 177 | // Check multi arch support on Ubuntu 12.04 LTS. |
| 178 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 179 | // RUN: -target arm-unknown-linux-gnueabihf \ |
| 180 | // RUN: --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \ |
| 181 | // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-12-04-ARM-HF %s |
| 182 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 183 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf/crt1.o" |
| 184 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf/crti.o" |
| 185 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/crtbegin.o" |
| 186 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabihf/4.6.3" |
| 187 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf" |
| 188 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/lib/arm-linux-gnueabihf" |
| 189 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/arm-linux-gnueabihf" |
| 190 | // CHECK-UBUNTU-12-04-ARM-HF: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../.." |
| 191 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/crtend.o" |
| 192 | // CHECK-UBUNTU-12-04-ARM-HF: "{{.*}}/usr/lib/gcc/arm-linux-gnueabihf/4.6.3/../../../arm-linux-gnueabihf/crtn.o" |
| 193 | // |
| 194 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 195 | // RUN: -target arm-unknown-linux-gnueabi \ |
| 196 | // RUN: --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \ |
| 197 | // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-12-04-ARM %s |
| 198 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 199 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi/crt1.o" |
| 200 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi/crti.o" |
| 201 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/crtbegin.o" |
| 202 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabi/4.6.1" |
| 203 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi" |
| 204 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/lib/arm-linux-gnueabi" |
| 205 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/arm-linux-gnueabi" |
| 206 | // CHECK-UBUNTU-12-04-ARM: "-L[[SYSROOT]]/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../.." |
| 207 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/crtend.o" |
| 208 | // CHECK-UBUNTU-12-04-ARM: "{{.*}}/usr/lib/gcc/arm-linux-gnueabi/4.6.1/../../../arm-linux-gnueabi/crtn.o" |
| 209 | // |
Hal Finkel | 39993dd | 2011-12-08 20:36:19 +0000 | [diff] [blame] | 210 | // Test the setup that shipped in SUSE 10.3 on ppc64. |
| 211 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 212 | // RUN: -target powerpc64-suse-linux \ |
Hal Finkel | 39993dd | 2011-12-08 20:36:19 +0000 | [diff] [blame] | 213 | // RUN: --sysroot=%S/Inputs/suse_10.3_ppc64_tree \ |
| 214 | // RUN: | FileCheck --check-prefix=CHECK-SUSE-10-3-PPC64 %s |
| 215 | // CHECK-SUSE-10-3-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 216 | // CHECK-SUSE-10-3-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64/crtbegin.o" |
| 217 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64" |
| 218 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib64" |
| 219 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64" |
| 220 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 221 | // |
Jiangning Liu | 6cc9dc8 | 2012-07-30 11:05:56 +0000 | [diff] [blame] | 222 | // Check dynamic-linker for different archs |
| 223 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 224 | // RUN: -target arm-linux-gnueabi \ |
| 225 | // RUN: | FileCheck --check-prefix=CHECK-ARM %s |
| 226 | // CHECK-ARM: "{{.*}}ld{{(.exe)?}}" |
| 227 | // CHECK-ARM: "-m" "armelf_linux_eabi" |
| 228 | // CHECK-ARM: "-dynamic-linker" "{{.*}}/lib/ld-linux.so.3" |
| 229 | // |
| 230 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 231 | // RUN: -target arm-linux-gnueabihf \ |
| 232 | // RUN: | FileCheck --check-prefix=CHECK-ARM-HF %s |
| 233 | // CHECK-ARM-HF: "{{.*}}ld{{(.exe)?}}" |
| 234 | // CHECK-ARM-HF: "-m" "armelf_linux_eabi" |
| 235 | // CHECK-ARM-HF: "-dynamic-linker" "{{.*}}/lib/ld-linux-armhf.so.3" |
| 236 | // |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 237 | // 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] | 238 | // and provide correct path to the dynamic linker and emulation mode when build |
| 239 | // for MIPS platforms. |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 240 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 241 | // RUN: -target mips-linux-gnu -ccc-clang-archs mips \ |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 242 | // RUN: | FileCheck --check-prefix=CHECK-MIPS %s |
| 243 | // CHECK-MIPS: "{{.*}}ld{{(.exe)?}}" |
Simon Atanasyan | 8491cb2 | 2012-04-06 20:14:27 +0000 | [diff] [blame] | 244 | // CHECK-MIPS: "-m" "elf32btsmip" |
| 245 | // CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib/ld.so.1" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 246 | // CHECK-MIPS-NOT: "--hash-style={{gnu|both}}" |
| 247 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 248 | // RUN: -target mipsel-linux-gnu -ccc-clang-archs mipsel \ |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 249 | // RUN: | FileCheck --check-prefix=CHECK-MIPSEL %s |
| 250 | // CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}" |
Simon Atanasyan | 8491cb2 | 2012-04-06 20:14:27 +0000 | [diff] [blame] | 251 | // CHECK-MIPSEL: "-m" "elf32ltsmip" |
| 252 | // CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib/ld.so.1" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 253 | // CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}" |
| 254 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 255 | // RUN: -target mips64-linux-gnu -ccc-clang-archs mips64 \ |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 256 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64 %s |
| 257 | // CHECK-MIPS64: "{{.*}}ld{{(.exe)?}}" |
Simon Atanasyan | 8491cb2 | 2012-04-06 20:14:27 +0000 | [diff] [blame] | 258 | // CHECK-MIPS64: "-m" "elf64btsmip" |
| 259 | // CHECK-MIPS64: "-dynamic-linker" "{{.*}}/lib64/ld.so.1" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 260 | // CHECK-MIPS64-NOT: "--hash-style={{gnu|both}}" |
| 261 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
Sebastian Pop | 9ec60df | 2012-01-20 22:01:23 +0000 | [diff] [blame] | 262 | // RUN: -target mips64el-linux-gnu -ccc-clang-archs mips64el \ |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 263 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64EL %s |
| 264 | // CHECK-MIPS64EL: "{{.*}}ld{{(.exe)?}}" |
Simon Atanasyan | 8491cb2 | 2012-04-06 20:14:27 +0000 | [diff] [blame] | 265 | // CHECK-MIPS64EL: "-m" "elf64ltsmip" |
| 266 | // CHECK-MIPS64EL: "-dynamic-linker" "{{.*}}/lib64/ld.so.1" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame] | 267 | // CHECK-MIPS64EL-NOT: "--hash-style={{gnu|both}}" |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 268 | // |
| 269 | // Thoroughly exercise the Debian multiarch environment. |
| 270 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 271 | // RUN: -target i686-linux-gnu \ |
| 272 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 273 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86 %s |
| 274 | // CHECK-DEBIAN-X86: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 275 | // CHECK-DEBIAN-X86: "{{.*}}/usr/lib/gcc/i686-linux-gnu/4.5/crtbegin.o" |
| 276 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5" |
| 277 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../../i386-linux-gnu" |
| 278 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu" |
| 279 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../.." |
| 280 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/lib" |
| 281 | // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib" |
| 282 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 283 | // RUN: -target x86_64-linux-gnu \ |
| 284 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 285 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86-64 %s |
| 286 | // CHECK-DEBIAN-X86-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 287 | // CHECK-DEBIAN-X86-64: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.5/crtbegin.o" |
| 288 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5" |
| 289 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../../x86_64-linux-gnu" |
| 290 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/x86_64-linux-gnu" |
| 291 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../.." |
| 292 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/lib" |
| 293 | // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib" |
| 294 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 295 | // RUN: -target powerpc-linux-gnu \ |
| 296 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 297 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC %s |
| 298 | // CHECK-DEBIAN-PPC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 299 | // CHECK-DEBIAN-PPC: "{{.*}}/usr/lib/gcc/powerpc-linux-gnu/4.5/crtbegin.o" |
| 300 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5" |
| 301 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../../powerpc-linux-gnu" |
| 302 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/powerpc-linux-gnu" |
| 303 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../.." |
| 304 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/lib" |
| 305 | // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib" |
| 306 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 307 | // RUN: -target powerpc64-linux-gnu \ |
| 308 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 309 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC64 %s |
| 310 | // CHECK-DEBIAN-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 311 | // CHECK-DEBIAN-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-linux-gnu/4.5/crtbegin.o" |
| 312 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5" |
| 313 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../../powerpc64-linux-gnu" |
| 314 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/powerpc64-linux-gnu" |
| 315 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../.." |
| 316 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/lib" |
| 317 | // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib" |
Simon Atanasyan | 4f148d9 | 2012-04-26 08:35:58 +0000 | [diff] [blame] | 318 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 319 | // RUN: -target mips-linux-gnu \ |
| 320 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 321 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS %s |
| 322 | // CHECK-DEBIAN-MIPS: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 323 | // CHECK-DEBIAN-MIPS: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.5/crtbegin.o" |
| 324 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5" |
| 325 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../../mips-linux-gnu" |
| 326 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/mips-linux-gnu" |
| 327 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../.." |
| 328 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/lib" |
| 329 | // CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib" |
| 330 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 331 | // RUN: -target mipsel-linux-gnu \ |
| 332 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 333 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPSEL %s |
| 334 | // CHECK-DEBIAN-MIPSEL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 335 | // CHECK-DEBIAN-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.5/crtbegin.o" |
| 336 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5" |
| 337 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../../mipsel-linux-gnu" |
| 338 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/mipsel-linux-gnu" |
| 339 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../.." |
| 340 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/lib" |
| 341 | // CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib" |
Simon Atanasyan | b8c4381 | 2012-04-26 19:57:02 +0000 | [diff] [blame] | 342 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 343 | // RUN: -target mips64-linux-gnu \ |
| 344 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 345 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64 %s |
| 346 | // CHECK-DEBIAN-MIPS64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 347 | // CHECK-DEBIAN-MIPS64: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.5/64/crtbegin.o" |
| 348 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/64" |
| 349 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5" |
| 350 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.5/../../.." |
| 351 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/lib" |
| 352 | // CHECK-DEBIAN-MIPS64: "-L[[SYSROOT]]/usr/lib" |
| 353 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 354 | // RUN: -target mips64el-linux-gnu \ |
| 355 | // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ |
| 356 | // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS64EL %s |
| 357 | // CHECK-DEBIAN-MIPS64EL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 358 | // CHECK-DEBIAN-MIPS64EL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.5/64/crtbegin.o" |
| 359 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/64" |
| 360 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5" |
| 361 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.5/../../.." |
| 362 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/lib" |
| 363 | // CHECK-DEBIAN-MIPS64EL: "-L[[SYSROOT]]/usr/lib" |
Chandler Carruth | 155c54c | 2012-02-26 09:03:21 +0000 | [diff] [blame] | 364 | // |
Evgeniy Stepanov | a6ddc02 | 2012-04-25 08:59:22 +0000 | [diff] [blame] | 365 | // Test linker invocation on Android. |
| 366 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 367 | // RUN: -target arm-linux-androideabi \ |
| 368 | // RUN: --sysroot=%S/Inputs/basic_android_tree \ |
| 369 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID %s |
| 370 | // CHECK-ANDROID: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 371 | // CHECK-ANDROID: "{{.*}}/crtbegin_dynamic.o" |
| 372 | // CHECK-ANDROID: "-L[[SYSROOT]]/usr/lib" |
| 373 | // CHECK-ANDROID-NOT: "gcc_s" |
| 374 | // CHECK-ANDROID: "-lgcc" |
| 375 | // CHECK-ANDROID-NOT: "gcc_s" |
| 376 | // CHECK-ANDROID: "{{.*}}/crtend_android.o" |
| 377 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 378 | // RUN: -target arm-linux-androideabi \ |
| 379 | // RUN: --sysroot=%S/Inputs/basic_android_tree \ |
| 380 | // RUN: -shared \ |
| 381 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s |
| 382 | // CHECK-ANDROID-SO: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 383 | // CHECK-ANDROID-SO: "{{.*}}/crtbegin_so.o" |
| 384 | // CHECK-ANDROID-SO: "-L[[SYSROOT]]/usr/lib" |
| 385 | // CHECK-ANDROID-SO-NOT: "gcc_s" |
| 386 | // CHECK-ANDROID-SO: "-lgcc" |
| 387 | // CHECK-ANDROID-SO-NOT: "gcc_s" |
| 388 | // CHECK-ANDROID-SO: "{{.*}}/crtend_so.o" |
| 389 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 390 | // RUN: -target arm-linux-androideabi \ |
| 391 | // RUN: --sysroot=%S/Inputs/basic_android_tree \ |
| 392 | // RUN: -static \ |
| 393 | // RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s |
| 394 | // CHECK-ANDROID-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 395 | // CHECK-ANDROID-STATIC: "{{.*}}/crtbegin_static.o" |
| 396 | // CHECK-ANDROID-STATIC: "-L[[SYSROOT]]/usr/lib" |
| 397 | // CHECK-ANDROID-STATIC-NOT: "gcc_s" |
| 398 | // CHECK-ANDROID-STATIC: "-lgcc" |
| 399 | // CHECK-ANDROID-STATIC-NOT: "gcc_s" |
| 400 | // CHECK-ANDROID-STATIC: "{{.*}}/crtend_android.o" |