Patch to make gccld link natively, revised and extended... again :)

Here is the latest version of the native linker patch.

This differs from the previous patch in one major way... It no longer takes
the crude hack of screening for 'llvm' in the -L path. Instead, gccld now
actively screens for -L paths that contain bytecode shared libraries or true
llvm bytecode archives. Those -L paths that do contain them are omitted from
the call to the system linker.

This should resolve http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=525

We can not just issue an error when the user feeds an -L path to the llvm-g++
compiler, because llvm-g++ _itself_ appends it's lib directories to the call
to gccld.

The result is that llvm-g++'s bytecode archive files (see libstdc++.a and
libc.a) are included in _any_ call to gccld by llvm-g++.

Hopefully this is the correct fix once and for all.

Thanks,

Adam Treat

gccld_native_linker.diff.gz (3.21 KB)