]> granicus.if.org Git - clang/commit
Teach the logic for locating an installed GCC about the system root.
authorChandler Carruth <chandlerc@gmail.com>
Mon, 3 Oct 2011 08:02:58 +0000 (08:02 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 3 Oct 2011 08:02:58 +0000 (08:02 +0000)
commit663abc976af682b9426918b3c534d132a2b09a64
tree09ab04f8efa647653e66a25322422d9b7e2adf17
parentfde8d14ea3061ff82e9dfddb23f17648c103eae6
Teach the logic for locating an installed GCC about the system root.
This requires fixing a latent bug -- if we used the default host triple
instead of an autodetected triple to locate GCC's installation, we
didn't go back and fix the GCC triple. Correct that with a pile of
hacks. This entire routine needs a major refactoring which I'm saving
for a subsequent commit. Essentially, the detection of the GCC triple
should be hoisted into the same routine as we locate the GCC
installation: the first is intrinsically tied to the latter. Then the
routine will just return the triple and base directory.

Also start to bring the rest of the library search path logic under
test, including locating crtbegin.o. Still need to test the multilib and
other behaviors, but there are also bugs in the way of that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140995 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains.cpp
test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/i386-unknown-linux/4.6.0/crtbegin.o [new file with mode: 0644]
test/Driver/Inputs/basic_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/crtbegin.o [new file with mode: 0644]
test/Driver/linux-ld.c