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 | 663abc9 | 2011-10-03 08:02:58 +0000 | [diff] [blame] | 5 | // RUN: -ccc-host-triple 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 \ |
| 17 | // RUN: -ccc-host-triple x86_64-unknown-linux \ |
| 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 \ |
| 29 | // RUN: -ccc-host-triple i386-unknown-linux -m32 \ |
| 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 \ |
| 45 | // RUN: -ccc-host-triple i386-unknown-linux -m64 \ |
| 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 \ |
| 62 | // RUN: -ccc-host-triple x86_64-unknown-linux -m64 \ |
| 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 \ |
| 78 | // RUN: -ccc-host-triple x86_64-unknown-linux -m32 \ |
| 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 \ |
| 95 | // RUN: -ccc-host-triple i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 96 | // RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \ |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 97 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 98 | // RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-32 %s |
| 99 | // CHECK-INSTALL-DIR-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 100 | // CHECK-INSTALL-DIR-32: "{{.*}}/Inputs/fake_install_tree/bin/../lib/gcc/i386-unknown-linux/4.7.0/crtbegin.o" |
| 101 | // 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] | 102 | // |
| 103 | // Check that with 64-bit builds, we don't actually use the install directory |
| 104 | // as its version of GCC is lower than our sysrooted version. |
| 105 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 106 | // RUN: -ccc-host-triple x86_64-unknown-linux -m64 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 107 | // RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \ |
Chandler Carruth | 5058e3a | 2011-10-05 01:01:57 +0000 | [diff] [blame] | 108 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 109 | // RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-64 %s |
| 110 | // CHECK-INSTALL-DIR-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 111 | // CHECK-INSTALL-DIR-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o" |
| 112 | // 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] | 113 | // |
| 114 | // Check that we support unusual patch version formats, including missing that |
| 115 | // component. |
| 116 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 117 | // RUN: -ccc-host-triple i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 118 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing1/bin \ |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 119 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 120 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION1 %s |
| 121 | // CHECK-GCC-VERSION1: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 122 | // CHECK-GCC-VERSION1: "{{.*}}/Inputs/gcc_version_parsing1/bin/../lib/gcc/i386-unknown-linux/4.7/crtbegin.o" |
| 123 | // 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] | 124 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 125 | // RUN: -ccc-host-triple i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 126 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing2/bin \ |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 127 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 128 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION2 %s |
| 129 | // CHECK-GCC-VERSION2: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 130 | // CHECK-GCC-VERSION2: "{{.*}}/Inputs/gcc_version_parsing2/bin/../lib/gcc/i386-unknown-linux/4.7.x/crtbegin.o" |
| 131 | // 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] | 132 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 133 | // RUN: -ccc-host-triple i386-unknown-linux -m32 \ |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 134 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing3/bin \ |
Chandler Carruth | dbc2144 | 2011-10-05 03:09:51 +0000 | [diff] [blame] | 135 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 136 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION3 %s |
| 137 | // CHECK-GCC-VERSION3: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
Chandler Carruth | 1203600 | 2011-10-05 06:38:03 +0000 | [diff] [blame] | 138 | // CHECK-GCC-VERSION3: "{{.*}}/Inputs/gcc_version_parsing3/bin/../lib/gcc/i386-unknown-linux/4.7.99-rc5/crtbegin.o" |
| 139 | // 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] | 140 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 141 | // RUN: -ccc-host-triple i386-unknown-linux -m32 \ |
| 142 | // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing4/bin \ |
| 143 | // RUN: --sysroot=%S/Inputs/basic_linux_tree \ |
| 144 | // RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION4 %s |
| 145 | // CHECK-GCC-VERSION4: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 146 | // CHECK-GCC-VERSION4: "{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99/crtbegin.o" |
| 147 | // 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] | 148 | // |
| 149 | // Test a very broken version of multiarch that shipped in Ubuntu 11.04. |
| 150 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 151 | // RUN: -ccc-host-triple i386-unknown-linux \ |
| 152 | // RUN: --sysroot=%S/Inputs/ubuntu_11.04_multiarch_tree \ |
| 153 | // RUN: | FileCheck --check-prefix=CHECK-UBUNTU-11-04 %s |
| 154 | // CHECK-UBUNTU-11-04: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 155 | // CHECK-UBUNTU-11-04: "{{.*}}/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/crtbegin.o" |
| 156 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5" |
| 157 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../i386-linux-gnu" |
| 158 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu" |
| 159 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.." |
| 160 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/lib" |
| 161 | // CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib" |
Hal Finkel | 39993dd | 2011-12-08 20:36:19 +0000 | [diff] [blame] | 162 | // |
| 163 | // Test the setup that shipped in SUSE 10.3 on ppc64. |
| 164 | // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ |
| 165 | // RUN: -ccc-host-triple powerpc64-suse-linux \ |
| 166 | // RUN: --sysroot=%S/Inputs/suse_10.3_ppc64_tree \ |
| 167 | // RUN: | FileCheck --check-prefix=CHECK-SUSE-10-3-PPC64 %s |
| 168 | // CHECK-SUSE-10-3-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" |
| 169 | // CHECK-SUSE-10-3-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64/crtbegin.o" |
| 170 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64" |
| 171 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib64" |
| 172 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64" |
| 173 | // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64" |
Chandler Carruth | b05dcdd | 2011-12-17 21:57:25 +0000 | [diff] [blame^] | 174 | // |
| 175 | // Check that we do not pass --hash-style=gnu and --hash-style=both to linker |
| 176 | // when build for MIPS platforms. |
| 177 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 178 | // RUN: -ccc-host-triple mips-linux-gnu -ccc-clang-archs mips \ |
| 179 | // RUN: | FileCheck --check-prefix=CHECK-MIPS %s |
| 180 | // CHECK-MIPS: "{{.*}}ld{{(.exe)?}}" |
| 181 | // CHECK-MIPS-NOT: "--hash-style={{gnu|both}}" |
| 182 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 183 | // RUN: -ccc-host-triple mipsel-linux-gnu -ccc-clang-archs mipsel \ |
| 184 | // RUN: | FileCheck --check-prefix=CHECK-MIPSEL %s |
| 185 | // CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}" |
| 186 | // CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}" |
| 187 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 188 | // RUN: -ccc-host-triple mips64-linux-gnu -ccc-clang-archs mips64 \ |
| 189 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64 %s |
| 190 | // CHECK-MIPS64: "{{.*}}ld{{(.exe)?}}" |
| 191 | // CHECK-MIPS64-NOT: "--hash-style={{gnu|both}}" |
| 192 | // RUN: %clang %s -### -o %t.o 2>&1 \ |
| 193 | // RUN: -ccc-host-triple mips64el-linux-gnu -ccc-clang-archs mips64el \ |
| 194 | // RUN: | FileCheck --check-prefix=CHECK-MIPS64EL %s |
| 195 | // CHECK-MIPS64EL: "{{.*}}ld{{(.exe)?}}" |
| 196 | // CHECK-MIPS64EL-NOT: "--hash-style={{gnu|both}}" |