2011-10-03 14:41:08 +08:00
|
|
|
// General tests that ld invocations on Linux targets sane. Note that we use
|
|
|
|
// sysroot to make these tests independent of the host system.
|
2011-10-01 08:37:39 +08:00
|
|
|
//
|
2011-10-03 14:41:08 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target i386-unknown-linux \
|
2011-10-03 14:41:08 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
2011-10-01 08:37:39 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-32 %s
|
2011-10-03 14:41:08 +08:00
|
|
|
// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2011-10-03 16:16:09 +08:00
|
|
|
// CHECK-LD-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0/crtbegin.o"
|
2011-10-03 16:02:58 +08:00
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0"
|
2011-10-03 16:09:02 +08:00
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib"
|
2011-10-03 16:02:58 +08:00
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-LD-32: "-L[[SYSROOT]]/usr/lib"
|
2011-10-01 08:37:39 +08:00
|
|
|
//
|
2011-10-03 14:41:08 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target x86_64-unknown-linux \
|
2011-10-03 14:41:08 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
2011-10-01 08:37:39 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-LD-64 %s
|
2011-10-03 14:41:08 +08:00
|
|
|
// CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2011-10-03 16:16:09 +08:00
|
|
|
// CHECK-LD-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o"
|
2011-10-03 16:02:58 +08:00
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
2011-10-03 16:09:02 +08:00
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
2011-10-03 16:02:58 +08:00
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-LD-64: "-L[[SYSROOT]]/usr/lib"
|
2011-10-03 17:00:50 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target i386-unknown-linux -m32 \
|
2011-10-03 17:00:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-32-TO-32 %s
|
|
|
|
// CHECK-32-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-32-TO-32: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0/crtbegin.o"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib/../lib32"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../lib32"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/lib/../lib32"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-32-TO-32: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target i386-unknown-linux -m64 \
|
2011-10-03 17:00:50 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-32-TO-64 %s
|
|
|
|
// CHECK-32-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-32-TO-64: "{{.*}}/usr/lib/gcc/i386-unknown-linux/4.6.0/64/crtbegin.o"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib/../lib64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../lib64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../../../i386-unknown-linux/lib"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/i386-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-32-TO-64: "-L[[SYSROOT]]/usr/lib"
|
2011-10-03 17:08:26 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target x86_64-unknown-linux -m64 \
|
2011-10-03 17:08:26 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-64-TO-64 %s
|
|
|
|
// CHECK-64-TO-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-64-TO-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib64"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib64"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/../lib64"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target x86_64-unknown-linux -m32 \
|
2011-10-03 17:08:26 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-64-TO-32 %s
|
|
|
|
// CHECK-64-TO-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-64-TO-32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32/crtbegin.o"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../lib32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../lib32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/lib/../lib32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/../lib32"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib"
|
2011-10-05 09:01:57 +08:00
|
|
|
//
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target i386-unknown-linux -m32 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \
|
2011-10-05 09:01:57 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-32 %s
|
|
|
|
// CHECK-INSTALL-DIR-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2011-10-05 14:38:03 +08:00
|
|
|
// CHECK-INSTALL-DIR-32: "{{.*}}/Inputs/fake_install_tree/bin/../lib/gcc/i386-unknown-linux/4.7.0/crtbegin.o"
|
|
|
|
// CHECK-INSTALL-DIR-32: "-L{{.*}}/Inputs/fake_install_tree/bin/../lib/gcc/i386-unknown-linux/4.7.0"
|
2011-10-05 09:01:57 +08:00
|
|
|
//
|
|
|
|
// Check that with 64-bit builds, we don't actually use the install directory
|
|
|
|
// as its version of GCC is lower than our sysrooted version.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target x86_64-unknown-linux -m64 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \
|
2011-10-05 09:01:57 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-64 %s
|
|
|
|
// CHECK-INSTALL-DIR-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-INSTALL-DIR-64: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o"
|
|
|
|
// CHECK-INSTALL-DIR-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
|
2011-10-05 11:09:51 +08:00
|
|
|
//
|
|
|
|
// Check that we support unusual patch version formats, including missing that
|
|
|
|
// component.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target i386-unknown-linux -m32 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing1/bin \
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION1 %s
|
|
|
|
// CHECK-GCC-VERSION1: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2011-10-05 14:38:03 +08:00
|
|
|
// CHECK-GCC-VERSION1: "{{.*}}/Inputs/gcc_version_parsing1/bin/../lib/gcc/i386-unknown-linux/4.7/crtbegin.o"
|
|
|
|
// CHECK-GCC-VERSION1: "-L{{.*}}/Inputs/gcc_version_parsing1/bin/../lib/gcc/i386-unknown-linux/4.7"
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target i386-unknown-linux -m32 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing2/bin \
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION2 %s
|
|
|
|
// CHECK-GCC-VERSION2: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2011-10-05 14:38:03 +08:00
|
|
|
// CHECK-GCC-VERSION2: "{{.*}}/Inputs/gcc_version_parsing2/bin/../lib/gcc/i386-unknown-linux/4.7.x/crtbegin.o"
|
|
|
|
// CHECK-GCC-VERSION2: "-L{{.*}}/Inputs/gcc_version_parsing2/bin/../lib/gcc/i386-unknown-linux/4.7.x"
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target i386-unknown-linux -m32 \
|
2011-10-05 14:38:03 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing3/bin \
|
2011-10-05 11:09:51 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION3 %s
|
|
|
|
// CHECK-GCC-VERSION3: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
2011-10-05 14:38:03 +08:00
|
|
|
// CHECK-GCC-VERSION3: "{{.*}}/Inputs/gcc_version_parsing3/bin/../lib/gcc/i386-unknown-linux/4.7.99-rc5/crtbegin.o"
|
|
|
|
// CHECK-GCC-VERSION3: "-L{{.*}}/Inputs/gcc_version_parsing3/bin/../lib/gcc/i386-unknown-linux/4.7.99-rc5"
|
2011-11-06 07:24:30 +08:00
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target i386-unknown-linux -m32 \
|
2011-11-06 07:24:30 +08:00
|
|
|
// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing4/bin \
|
|
|
|
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION4 %s
|
|
|
|
// CHECK-GCC-VERSION4: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-GCC-VERSION4: "{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99/crtbegin.o"
|
|
|
|
// CHECK-GCC-VERSION4: "-L{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99"
|
2011-11-09 11:46:20 +08:00
|
|
|
//
|
|
|
|
// Test a very broken version of multiarch that shipped in Ubuntu 11.04.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target i386-unknown-linux \
|
2011-11-09 11:46:20 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/ubuntu_11.04_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-11-04 %s
|
|
|
|
// CHECK-UBUNTU-11-04: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-UBUNTU-11-04: "{{.*}}/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/crtbegin.o"
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5"
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../../i386-linux-gnu"
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu"
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5/../../../.."
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-UBUNTU-11-04: "-L[[SYSROOT]]/usr/lib"
|
2011-12-09 04:36:19 +08:00
|
|
|
//
|
|
|
|
// Test the setup that shipped in SUSE 10.3 on ppc64.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target powerpc64-suse-linux \
|
2011-12-09 04:36:19 +08:00
|
|
|
// RUN: --sysroot=%S/Inputs/suse_10.3_ppc64_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-SUSE-10-3-PPC64 %s
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64/crtbegin.o"
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/64"
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-suse-linux/4.1.2/../../../../lib64"
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/lib/../lib64"
|
|
|
|
// CHECK-SUSE-10-3-PPC64: "-L[[SYSROOT]]/usr/lib/../lib64"
|
2011-12-18 05:57:25 +08:00
|
|
|
//
|
|
|
|
// Check that we do not pass --hash-style=gnu and --hash-style=both to linker
|
|
|
|
// when build for MIPS platforms.
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target mips-linux-gnu -ccc-clang-archs mips \
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS %s
|
|
|
|
// CHECK-MIPS: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target mipsel-linux-gnu -ccc-clang-archs mipsel \
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPSEL %s
|
|
|
|
// CHECK-MIPSEL: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target mips64-linux-gnu -ccc-clang-archs mips64 \
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS64 %s
|
|
|
|
// CHECK-MIPS64: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS64-NOT: "--hash-style={{gnu|both}}"
|
|
|
|
// RUN: %clang %s -### -o %t.o 2>&1 \
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: -target mips64el-linux-gnu -ccc-clang-archs mips64el \
|
2011-12-18 05:57:25 +08:00
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL %s
|
|
|
|
// CHECK-MIPS64EL: "{{.*}}ld{{(.exe)?}}"
|
|
|
|
// CHECK-MIPS64EL-NOT: "--hash-style={{gnu|both}}"
|
2012-02-26 17:03:21 +08:00
|
|
|
//
|
|
|
|
// Thoroughly exercise the Debian multiarch environment.
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target i686-linux-gnu \
|
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86 %s
|
|
|
|
// CHECK-DEBIAN-X86: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-DEBIAN-X86: "{{.*}}/usr/lib/gcc/i686-linux-gnu/4.5/crtbegin.o"
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../../i386-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/i386-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-X86: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target x86_64-linux-gnu \
|
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-X86-64 %s
|
|
|
|
// CHECK-DEBIAN-X86-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-DEBIAN-X86-64: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.5/crtbegin.o"
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../../x86_64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/x86_64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-X86-64: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target powerpc-linux-gnu \
|
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC %s
|
|
|
|
// CHECK-DEBIAN-PPC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-DEBIAN-PPC: "{{.*}}/usr/lib/gcc/powerpc-linux-gnu/4.5/crtbegin.o"
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../../powerpc-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/powerpc-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib/gcc/powerpc-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-PPC: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
|
|
|
|
// RUN: -target powerpc64-linux-gnu \
|
|
|
|
// RUN: --sysroot=%S/Inputs/debian_multiarch_tree \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-PPC64 %s
|
|
|
|
// CHECK-DEBIAN-PPC64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
|
|
|
|
// CHECK-DEBIAN-PPC64: "{{.*}}/usr/lib/gcc/powerpc64-linux-gnu/4.5/crtbegin.o"
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5"
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../../powerpc64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/powerpc64-linux-gnu"
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64-linux-gnu/4.5/../../.."
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/lib"
|
|
|
|
// CHECK-DEBIAN-PPC64: "-L[[SYSROOT]]/usr/lib"
|
|
|
|
//
|