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.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp
index f21dff79c6..90cebb4df0 100644
--- a/tools/gccld/gccld.cpp
+++ b/tools/gccld/gccld.cpp
@@ -120,7 +120,8 @@ static inline bool LoadLibraryFromDirectory(const std::string &LibName,
bool &isArchive) {
if (FileExists(Directory + "lib" + LibName + ".a")) {
std::string ErrorMessage;
- if (Verbose) std::cerr << "Loading '" << Directory << LibName << ".a'\n";
+ if (Verbose) std::cerr << " Loading '" << Directory << "lib"
+ << LibName << ".a'\n";
if (!ReadArchiveFile(Directory + "lib" + LibName + ".a", Objects,
&ErrorMessage)) { // Read the archive file
isArchive = true;
@@ -128,7 +129,7 @@ static inline bool LoadLibraryFromDirectory(const std::string &LibName,
}
if (Verbose) {
- std::cerr << "Error loading archive '" + Directory + "lib"+LibName+".a'";
+ std::cerr << " Error loading archive '" + Directory +"lib"+LibName+".a'";
if (!ErrorMessage.empty()) std::cerr << ": " << ErrorMessage;
std::cerr << "\n";
}
@@ -305,6 +306,10 @@ int main(int argc, char **argv) {
": error linking in '" + InputFilenames[i] + "'");
}
+ // Remove any consecutive duplicates of the same library...
+ Libraries.erase(std::unique(Libraries.begin(), Libraries.end()),
+ Libraries.end());
+
// Link in all of the libraries next...
for (unsigned i = 0; i != Libraries.size(); ++i) {
if (Verbose) std::cerr << "Linking in library: -l" << Libraries[i] << "\n";