From 413e5ac2a583e9d0d9cd72345c38b237f5755cac Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 3 Oct 2011 05:28:29 +0000 Subject: Rework the selection of builtin library search paths on Linux to precisely match the pattern and logic used by the GCC driver on Linux as of a recent SVN checkout. This happens to follow a *much* more principled approach. There is a strict hierarchy of paths examined, first with multilib-suffixing, second without such suffixing. Any and all of these directories which exist will be added to the library search path when using GCC. There were many places where Clang followed different paths, omitted critical entries, and worst of all (in terms of challenges to debugging) got the entries in a subtly wrong order. If this breaks Clang on a distro you use, please let me know, and I'll work with you to figure out what is needed to work on that distro. I've checked the behavior of the latest release of Ubuntu, OpenSUSE, Fedora, and Gentoo. I'll be testing it on those as well as Debian stable and unstable and ArchLinux. I may even dig out a Slackware install. No real regression tests yet, those will follow once I add enough support for sysroot to simulate various distro layouts in the testsuite. llvm-svn: 140981 --- clang/test/Driver/linux-ld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/test') diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c index bdf699ae1ba..745b03c7a6a 100644 --- a/clang/test/Driver/linux-ld.c +++ b/clang/test/Driver/linux-ld.c @@ -2,8 +2,8 @@ // // RUN: %clang -no-canonical-prefixes -ccc-host-triple i386-unknown-linux %s -### -o %t.o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-LD-32 %s -// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" {{.*}} "-L/lib/../lib{{(32)?}}" "-L/usr/lib/../lib{{(32)?}}" +// CHECK-LD-32: "{{.*}}ld{{(.exe)?}}" {{.*}} "-L/lib" "-L/usr/lib" // // RUN: %clang -no-canonical-prefixes -ccc-host-triple x86_64-unknown-linux %s -### -o %t.o 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-LD-64 %s -// CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" {{.*}} "-L/lib/../lib{{(64)?}}" "-L/usr/lib/../lib{{(64)?}}" +// CHECK-LD-64: "{{.*}}ld{{(.exe)?}}" {{.*}} "-L/lib" "-L/usr/lib" -- cgit v1.2.3