title: Clang++ --gcc-toolchain and gcc 4.9.3 linking issues
body: <p>(Ubuntu 16.04.1)</p>
  
  <p>By default on 16.04.1 clang is picking the gcc tool chain for 5.4.  Unfortunately I have a library that <strong>requires</strong> pre-5.0 ABI <strong>and</strong> I do NOT have access to the source, nor has the implementer released a new version. I've been trying to use the --gcc-toolchain option, but I can NOT get it to work.  (ctrbegin.o and crtend.o don't get the proper prefix at link.) </p>
  
  <pre><code>$ clang++-3.8 -v -print-search-dirs
  
  clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
  Target: x86_64-pc-linux-gnu
  Thread model: posix
  InstalledDir: /usr/bin
  Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5.4.0
  Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/6.0.0
  Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
  Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.3
  Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
  Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/6.0.0
  Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
  Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
  Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
  Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
  Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
  Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
  Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0
  Candidate multilib: .;@m64
  Selected multilib: .;@m64
  programs: =/usr/bin:/usr/lib/llvm-3.8/bin:/usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../x86_64-linux-gnu/bin
  
  libraries: =/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0:
  /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0:
  /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../x86_64-linux-gnu:
  /lib/x86_64-linux-gnu:
  /lib/../lib64:
  /usr/lib/x86_64-linux-gnu:
  /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../..:
  /usr/lib/llvm-3.8/bin/../lib:
  /lib:
  /usr/lib
  </code></pre>
  
  <p>When I attempt to specify the --gcc-toolchain, clang seems to accept, then completely ignore the value. (Same thing happens with clang++-3.5 on 16.04.1.)</p>
  
  <p><strong>Is this the proper syntax?</strong> Notice that the library directories are missing from the output.  </p>
  
  <pre><code>$ clang++-3.8 -v --gcc-toolchain=/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.3 -print-search-dirs
  
  clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
  Target: x86_64-pc-linux-gnu
  Thread model: posix
  InstalledDir: /usr/bin
  programs: =/usr/bin:/usr/lib/llvm-3.8/bin:/..//bin
  
  libraries: =/usr/lib/llvm-3.8/bin/../lib/clang/3.8.0:/lib/x86_64-linux-gnu:/lib/../lib64:/usr/lib/x86_64-linux-gnu:/usr/lib/llvm-3.8/bin/../lib:/lib:/usr/lib
  </code></pre>
  
  <p>I have tried MANY variations on the above theme. (4.9, removing the relative path, etc.) I've tried the -isystem option and the -cxx-isystem option. (Both suggested as solutions to similar issues.)</p>
  
  <p><strong>What am i missing?</strong>  (I hope it is simple and a head smack is in order!)</p>