]> granicus.if.org Git - clang/commitdiff
Test a multilib setup on a 64-bit host. This is the far more common
authorChandler Carruth <chandlerc@gmail.com>
Mon, 3 Oct 2011 09:08:26 +0000 (09:08 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 3 Oct 2011 09:08:26 +0000 (09:08 +0000)
configuration, although the test still stubs out more directories than
are necessary or common in order to exercise all of the lookup paths
observed with upstream GCC.

This finishes testing the distribution-independent and
GCC-installation-independent parts of the library path search logic.
More testing is still needed for the triple detection, GCC-installation
detection, and handling distributions with unusual configurations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141000 91177308-0d34-0410-b5e6-96231b3b80d8

12 files changed:
test/Driver/Inputs/multilib_64bit_linux_tree/lib/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/lib32/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/lib64/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32/crtbegin.o [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib32/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib64/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/lib/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/lib32/.keep [new file with mode: 0644]
test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/lib64/.keep [new file with mode: 0644]
test/Driver/linux-ld.c

diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/lib/.keep b/test/Driver/Inputs/multilib_64bit_linux_tree/lib/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/lib32/.keep b/test/Driver/Inputs/multilib_64bit_linux_tree/lib32/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/lib64/.keep b/test/Driver/Inputs/multilib_64bit_linux_tree/lib64/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/.keep b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32/crtbegin.o b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/32/crtbegin.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib32/.keep b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib32/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib64/.keep b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib64/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/lib/.keep b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/lib/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/lib32/.keep b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/lib32/.keep
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/lib64/.keep b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/lib64/.keep
new file mode 100644 (file)
index 0000000..e69de29
index cb448b8751f5d2c8b390246e9e81212fd2e72759..a7319fbb188f9548d1c759c507ba8e88eb5176b6 100644 (file)
 // 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"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN:     -ccc-host-triple x86_64-unknown-linux -m64 \
+// 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 \
+// RUN:     -ccc-host-triple x86_64-unknown-linux -m32 \
+// 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"