[cfe-commits] r141167 - in /cfe/trunk: lib/Driver/ToolChains.cpp test/Driver/Inputs/fake_install_tree/bin/ test/Driver/Inputs/fake_install_tree/bin/.keep test/Driver/Inputs/gcc_version_parsing1/bin/ test/Driver/Inputs/gcc_version_parsing1/bin/.keep test/Driver/Inputs/gcc_version_parsing2/bin/ test/Driver/Inputs/gcc_version_parsing2/bin/.keep test/Driver/Inputs/gcc_version_parsing3/bin/ test/Driver/Inputs/gcc_version_parsing3/bin/.keep test/Driver/linux-ld.c
Chandler Carruth
chandlerc at gmail.com
Tue Oct 4 23:38:39 PDT 2011
Author: chandlerc
Date: Wed Oct 5 01:38:03 2011
New Revision: 141167
URL: http://llvm.org/viewvc/llvm-project?rev=141167&view=rev
Log:
Use the InstalledDir correctly, and test it correctly as well. =/ Should
have noticed this previously, sorry.
Added:
cfe/trunk/test/Driver/Inputs/fake_install_tree/bin/
cfe/trunk/test/Driver/Inputs/fake_install_tree/bin/.keep
cfe/trunk/test/Driver/Inputs/gcc_version_parsing1/bin/
cfe/trunk/test/Driver/Inputs/gcc_version_parsing1/bin/.keep
cfe/trunk/test/Driver/Inputs/gcc_version_parsing2/bin/
cfe/trunk/test/Driver/Inputs/gcc_version_parsing2/bin/.keep
cfe/trunk/test/Driver/Inputs/gcc_version_parsing3/bin/
cfe/trunk/test/Driver/Inputs/gcc_version_parsing3/bin/.keep
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/test/Driver/linux-ld.c
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=141167&r1=141166&r2=141167&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Oct 5 01:38:03 2011
@@ -1589,7 +1589,7 @@
D.PrefixDirs.end());
Prefixes.push_back(D.SysRoot);
Prefixes.push_back(D.SysRoot + "/usr");
- Prefixes.push_back(D.InstalledDir);
+ Prefixes.push_back(D.InstalledDir + "/..");
// Loop over the various components which exist and select the best GCC
// installation available. GCC installs are ranked by version number.
Added: cfe/trunk/test/Driver/Inputs/fake_install_tree/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/fake_install_tree/bin/.keep?rev=141167&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/gcc_version_parsing1/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/gcc_version_parsing1/bin/.keep?rev=141167&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/gcc_version_parsing2/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/gcc_version_parsing2/bin/.keep?rev=141167&view=auto
==============================================================================
(empty)
Added: cfe/trunk/test/Driver/Inputs/gcc_version_parsing3/bin/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/gcc_version_parsing3/bin/.keep?rev=141167&view=auto
==============================================================================
(empty)
Modified: cfe/trunk/test/Driver/linux-ld.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/linux-ld.c?rev=141167&r1=141166&r2=141167&view=diff
==============================================================================
--- cfe/trunk/test/Driver/linux-ld.c (original)
+++ cfe/trunk/test/Driver/linux-ld.c Wed Oct 5 01:38:03 2011
@@ -93,18 +93,18 @@
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -ccc-host-triple i386-unknown-linux -m32 \
-// RUN: -ccc-install-dir %S/Inputs/fake_install_tree \
+// RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-32 %s
// CHECK-INSTALL-DIR-32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
-// CHECK-INSTALL-DIR-32: "{{.*}}/Inputs/fake_install_tree/lib/gcc/i386-unknown-linux/4.7.0/crtbegin.o"
-// CHECK-INSTALL-DIR-32: "-L{{.*}}/Inputs/fake_install_tree/lib/gcc/i386-unknown-linux/4.7.0"
+// 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"
//
// 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 \
// RUN: -ccc-host-triple x86_64-unknown-linux -m64 \
-// RUN: -ccc-install-dir %S/Inputs/fake_install_tree \
+// RUN: -ccc-install-dir %S/Inputs/fake_install_tree/bin \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-INSTALL-DIR-64 %s
// CHECK-INSTALL-DIR-64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -115,25 +115,25 @@
// component.
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -ccc-host-triple i386-unknown-linux -m32 \
-// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing1 \
+// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing1/bin \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION1 %s
// CHECK-GCC-VERSION1: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
-// CHECK-GCC-VERSION1: "{{.*}}/Inputs/gcc_version_parsing1/lib/gcc/i386-unknown-linux/4.7/crtbegin.o"
-// CHECK-GCC-VERSION1: "-L{{.*}}/Inputs/gcc_version_parsing1/lib/gcc/i386-unknown-linux/4.7"
+// 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"
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -ccc-host-triple i386-unknown-linux -m32 \
-// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing2 \
+// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing2/bin \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION2 %s
// CHECK-GCC-VERSION2: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
-// CHECK-GCC-VERSION2: "{{.*}}/Inputs/gcc_version_parsing2/lib/gcc/i386-unknown-linux/4.7.x/crtbegin.o"
-// CHECK-GCC-VERSION2: "-L{{.*}}/Inputs/gcc_version_parsing2/lib/gcc/i386-unknown-linux/4.7.x"
+// 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"
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -ccc-host-triple i386-unknown-linux -m32 \
-// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing3 \
+// RUN: -ccc-install-dir %S/Inputs/gcc_version_parsing3/bin \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-GCC-VERSION3 %s
// CHECK-GCC-VERSION3: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
-// CHECK-GCC-VERSION3: "{{.*}}/Inputs/gcc_version_parsing3/lib/gcc/i386-unknown-linux/4.7.99-rc5/crtbegin.o"
-// CHECK-GCC-VERSION3: "-L{{.*}}/Inputs/gcc_version_parsing3/lib/gcc/i386-unknown-linux/4.7.99-rc5"
+// 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"
More information about the cfe-commits
mailing list