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. 3 // 4 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 5 // RUN: -target i386-unknown-linux \ 6 // RUN: --sysroot=%S/Inputs/basic_linux_tree \ 7 // RUN: | FileCheck --check-prefix=CHECK-LD-32 %s 8 // CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 9 // CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0/crtbegin.o" 10 // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0" 11 // CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib" 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" 15 // 16 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 17 // RUN: -target x86_64-unknown-linux \ 18 // RUN: --sysroot=%S/Inputs/basic_linux_tree \ 19 // RUN: | FileCheck --check-prefix=CHECK-LD-64 %s 20 // CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 21 // CHECK-LD-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o" 22 // CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0" 23 // CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib" 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" 27 // 28 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 29 // RUN: -target 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: -target 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" 60 // 61 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 62 // RUN: -target 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: -target 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" 93 // 94 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 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 \ 109 // RUN: -target i386-unknown-linux -m32 \ 110 // RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \ 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:[^"]+]]" 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" 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 \ 120 // RUN: -target x86_64-unknown-linux -m64 \ 121 // RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \ 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" 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 \ 131 // RUN: -target i386-unknown-linux -m32 \ 132 // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing1/bin \ 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:[^"]+]]" 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" 138 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 139 // RUN: -target i386-unknown-linux -m32 \ 140 // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing2/bin \ 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:[^"]+]]" 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" 146 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 147 // RUN: -target i386-unknown-linux -m32 \ 148 // RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing3/bin \ 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:[^"]+]]" 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" 154 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 155 // RUN: -target i386-unknown-linux -m32 \ 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" 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 \ 165 // RUN: -target i386-unknown-linux \ 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" 176 // 177 // Test the setup that shipped in SUSE 10.3 on ppc64. 178 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 179 // RUN: -target powerpc64-suse-linux \ 180 // RUN: --sysroot=%S/Inputs/suse_10.3_ppc64_tree \ 181 // RUN: | FileCheck --check-prefix=CHECK-SUSE-10-3-PPC64 %s 182 // CHECK-SUSE-10-3-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 183 // CHECK-SUSE-10-3-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64/crtbegin.o" 184 // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64" 185 // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib64" 186 // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64" 187 // CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64" 188 // 189 // Check that we do not pass --hash-style=gnu and --hash-style=both to linker 190 // and provide correct path to the dynamic linker and emulation mode when build 191 // for MIPS platforms. 192 // RUN: %clang %s -### -o %t.o 2>&1 \ 193 // RUN: -target mips-linux-gnu -ccc-clang-archs mips \ 194 // RUN: | FileCheck --check-prefix=CHECK-MIPS %s 195 // CHECK-MIPS: "{{.*}}ld{{(.exe)?}}" 196 // CHECK-MIPS: "-m" "elf32btsmip" 197 // CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib/ld.so.1" 198 // CHECK-MIPS-NOT: "--hash-style={{gnu|both}}" 199 // RUN: %clang %s -### -o %t.o 2>&1 \ 200 // RUN: -target mipsel-linux-gnu -ccc-clang-archs mipsel \ 201 // RUN: | FileCheck --check-prefix=CHECK-MIPSEL %s 202 // CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}" 203 // CHECK-MIPSEL: "-m" "elf32ltsmip" 204 // CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib/ld.so.1" 205 // CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}" 206 // RUN: %clang %s -### -o %t.o 2>&1 \ 207 // RUN: -target mips64-linux-gnu -ccc-clang-archs mips64 \ 208 // RUN: | FileCheck --check-prefix=CHECK-MIPS64 %s 209 // CHECK-MIPS64: "{{.*}}ld{{(.exe)?}}" 210 // CHECK-MIPS64: "-m" "elf64btsmip" 211 // CHECK-MIPS64: "-dynamic-linker" "{{.*}}/lib64/ld.so.1" 212 // CHECK-MIPS64-NOT: "--hash-style={{gnu|both}}" 213 // RUN: %clang %s -### -o %t.o 2>&1 \ 214 // RUN: -target mips64el-linux-gnu -ccc-clang-archs mips64el \ 215 // RUN: | FileCheck --check-prefix=CHECK-MIPS64EL %s 216 // CHECK-MIPS64EL: "{{.*}}ld{{(.exe)?}}" 217 // CHECK-MIPS64EL: "-m" "elf64ltsmip" 218 // CHECK-MIPS64EL: "-dynamic-linker" "{{.*}}/lib64/ld.so.1" 219 // CHECK-MIPS64EL-NOT: "--hash-style={{gnu|both}}" 220 // 221 // Thoroughly exercise the Debian multiarch environment. 222 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 223 // RUN: -target i686-linux-gnu \ 224 // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ 225 // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86 %s 226 // CHECK-DEBIAN-X86: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 227 // CHECK-DEBIAN-X86: "{{.*}}/usr/lib/gcc/i686-linux-gnu/4.5/crtbegin.o" 228 // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5" 229 // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../../i386-linux-gnu" 230 // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu" 231 // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../.." 232 // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/lib" 233 // CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib" 234 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 235 // RUN: -target x86_64-linux-gnu \ 236 // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ 237 // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86-64 %s 238 // CHECK-DEBIAN-X86-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 239 // CHECK-DEBIAN-X86-64: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.5/crtbegin.o" 240 // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5" 241 // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../../x86_64-linux-gnu" 242 // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/x86_64-linux-gnu" 243 // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../.." 244 // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/lib" 245 // CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib" 246 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 247 // RUN: -target powerpc-linux-gnu \ 248 // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ 249 // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC %s 250 // CHECK-DEBIAN-PPC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 251 // CHECK-DEBIAN-PPC: "{{.*}}/usr/lib/gcc/powerpc-linux-gnu/4.5/crtbegin.o" 252 // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5" 253 // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../../powerpc-linux-gnu" 254 // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/powerpc-linux-gnu" 255 // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../.." 256 // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/lib" 257 // CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib" 258 // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ 259 // RUN: -target powerpc64-linux-gnu \ 260 // RUN: --sysroot=%S/Inputs/debian_multiarch_tree \ 261 // RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC64 %s 262 // CHECK-DEBIAN-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" 263 // CHECK-DEBIAN-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-linux-gnu/4.5/crtbegin.o" 264 // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5" 265 // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../../powerpc64-linux-gnu" 266 // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/powerpc64-linux-gnu" 267 // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../.." 268 // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/lib" 269 // CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib" 270 // 271