mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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:
parent
48e9f26df5
commit
7f7d16b62f
@ -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";
|
||||
|
@ -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"));
|
||||
|
@ -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(),
|
||||
|
@ -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(),
|
||||
|
@ -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";
|
||||
|
@ -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::
|
||||
|
Loading…
Reference in New Issue
Block a user