Skip to content
  1. Oct 03, 2011
    • Chandler Carruth's avatar
      Relax an assertion here a bit. This doesn't really matter, as we won't · 35cd702e
      Chandler Carruth authored
      include *any* path on crtbegin.o unless we actually find such a file via
      one of the search paths. We still strictly check the search paths right
      after this, so we'll catch any issues there.
      
      The reason for this is that the driver does some normalization of the
      path on the actual object file, and this changes the textual format of
      the string on Windows. It no longer matches the textual format of the
      sysroot flag.
      
      llvm-svn: 140998
      35cd702e
    • Chandler Carruth's avatar
      Test that we include a GCC-triple-prefixed tree. While I don't know of · 2c5e91e2
      Chandler Carruth authored
      any distros that use this, building a multilib GCC from mainline will
      install linker scripts here.
      
      llvm-svn: 140996
      2c5e91e2
    • Chandler Carruth's avatar
      Teach the logic for locating an installed GCC about the system root. · 5fdc7cba
      Chandler Carruth authored
      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.
      
      llvm-svn: 140995
      5fdc7cba
    • Chandler Carruth's avatar
      Add initial support for applying the sysroot to library search paths. · 2a649c7a
      Chandler Carruth authored
      This is still very much a WIP, but sysroot was completely broken before
      this so we are moving closer to correctness.
      
      The crux of this is that 'ld' (on Linux, the only place I'm touching
      here) doesn't apply the sysroot to any flags given to it. Instead, the
      driver must translate all the paths it adds to the link step with the
      system root. This is easily observed by building a GCC that supports
      sysroot, and checking its driver output.
      
      This patch just fixes the non-multilib library search paths. We should
      also use this in many other places, but first things first.
      
      This also allows us to make the Linux 'ld' test independent of the host
      system. This in turn will allow me to check in test tree configurations
      based on various different distro's configuration. Again, WIP.
      
      llvm-svn: 140990
      2a649c7a
    • Chandler Carruth's avatar
      Rework the selection of builtin library search paths on Linux to · 413e5ac2
      Chandler Carruth authored
      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
      413e5ac2
  2. Oct 01, 2011
Loading