Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into

every file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10976 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
John Criswell 2004-01-26 20:59:41 +00:00
parent 48e9f26df5
commit 7f7d16b62f
6 changed files with 8 additions and 8 deletions

View 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";

View 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"));

View 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(),

View 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(),

View 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";

View 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::