aboutsummaryrefslogtreecommitdiff
path: root/tools/gccld/gccld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gccld/gccld.cpp')
-rw-r--r--tools/gccld/gccld.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp
index f520ad0ff9..67db704779 100644
--- a/tools/gccld/gccld.cpp
+++ b/tools/gccld/gccld.cpp
@@ -285,6 +285,7 @@ int main(int argc, char **argv, char **envp) {
// gcc accepts -l<lib> and implicitly searches /lib and /usr/lib.
LibPaths.push_back("/lib");
LibPaths.push_back("/usr/lib");
+ LibPaths.push_back("/usr/X11R6/lib/");
// We don't need to link in libc! In fact, /usr/lib/libc.so may not be a
// shared object at all! See RH 8: plain text.
std::vector<std::string>::iterator libc =
@@ -295,7 +296,7 @@ int main(int argc, char **argv, char **envp) {
for (std::vector<std::string>::iterator i = Libraries.begin(),
e = Libraries.end(); i != e; ++i) {
std::string FullLibraryPath = FindLib(*i, LibPaths, true);
- if (!FullLibraryPath.empty())
+ if (!FullLibraryPath.empty() && IsSharedObject(FullLibraryPath))
Out2 << " -load=" << FullLibraryPath << " \\\n";
}
Out2 << " $0.bc $*\n";