Revised patch to make gccld link native .so's

Here is a revised patch after some suggestions:

1. Removed extraneous changes (the white space changes that are -/+
whitespace), and the commented out code.
2. Keep the warning for linking dynamic libraries in LinkLibraries.cpp

I still don't have a good solution to the problem of -L paths that include
bytecode versions of the native libraries we're trying to link. Consider the
following situation...

A directory in our -L path has a native library that we need to
link. It also contains a bytecode library.

Another directory in our -L path has a bytecode version of and a
native version of

What do we do?

llvm-g++ -Wl,-native -shared -o test.o -L/foobar -lfoo -L/barfoo

/foobar --native --bytecode

/barfoo --bytecode --native

Now, it is possible to test for this situation, but even if we know that it is
going to happen, how do we tell gcc or the system linker how to do the
correct thing?

linker.diff.gz (2.42 KB)