Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
authorJohn Criswell <criswell@uiuc.edu>
Mon, 26 Jan 2004 20:59:41 +0000 (20:59 +0000)
committerJohn Criswell <criswell@uiuc.edu>
Mon, 26 Jan 2004 20:59:41 +0000 (20:59 +0000)
every file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10976 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Linker/LinkArchives.cpp
lib/Support/PluginLoader.cpp
lib/Support/ToolRunner.cpp
tools/bugpoint/ToolRunner.cpp
tools/gccld/Linker.cpp
tools/llee/Makefile

index 7cd440d..296d87b 100644 (file)
@@ -56,8 +56,8 @@ std::string llvm::FindLib(const std::string &Filename,
     if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".bc"))
       return Directory + LibName + ".bc";
 
-    if (FileOpenable(Directory + LibName + ".so"))
-      return Directory + LibName + ".so";
+    if (FileOpenable(Directory + LibName + SHLIBEXT))
+      return Directory + LibName + SHLIBEXT;
 
     if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".a"))
       return Directory + LibName + ".a";
index be8833d..1e67b94 100644 (file)
@@ -37,5 +37,5 @@ namespace {
 
 // This causes operator= above to be invoked for every -load option.
 static cl::opt<PluginLoader, false, cl::parser<std::string> >
-LoadOpt("load", cl::ZeroOrMore, cl::value_desc("plugin.so"),
+LoadOpt("load", cl::ZeroOrMore, cl::value_desc("plugin" SHLIBEXT),
         cl::desc("Load the specified plugin"));
index b1fb64b..f81da62 100644 (file)
@@ -337,7 +337,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
 
 int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
                           std::string &OutputFile) {
-  OutputFile = getUniqueFilename(InputFile+".so");
+  OutputFile = getUniqueFilename(InputFile+SHLIBEXT);
   // Compile the C/asm file into a shared object
   const char* GCCArgs[] = {
     GCCPath.c_str(),
index b1fb64b..f81da62 100644 (file)
@@ -337,7 +337,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
 
 int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
                           std::string &OutputFile) {
-  OutputFile = getUniqueFilename(InputFile+".so");
+  OutputFile = getUniqueFilename(InputFile+SHLIBEXT);
   // Compile the C/asm file into a shared object
   const char* GCCArgs[] = {
     GCCPath.c_str(),
index 7cd440d..296d87b 100644 (file)
@@ -56,8 +56,8 @@ std::string llvm::FindLib(const std::string &Filename,
     if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".bc"))
       return Directory + LibName + ".bc";
 
-    if (FileOpenable(Directory + LibName + ".so"))
-      return Directory + LibName + ".so";
+    if (FileOpenable(Directory + LibName + SHLIBEXT))
+      return Directory + LibName + SHLIBEXT;
 
     if (!SharedObjectOnly && FileOpenable(Directory + LibName + ".a"))
       return Directory + LibName + ".a";
index a93c4de..50632e0 100644 (file)
@@ -16,7 +16,7 @@ all:: llee
 llee: $(DESTTOOLCURRENT)/llee
 
 $(DESTTOOLCURRENT)/llee: Makefile
-       echo exec env LD_PRELOAD=$(DESTLIBCURRENT)/execve.so $$\* > $@
+       echo exec env LD_PRELOAD=$(DESTLIBCURRENT)/execve$(SHLIBEXT) $$\* > $@
        chmod u+x $@
 
 clean::