diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gen-random-bout/Makefile | 1 | ||||
-rw-r--r-- | tools/kleaver/Makefile | 2 | ||||
-rw-r--r-- | tools/kleaver/main.cpp | 9 | ||||
-rw-r--r-- | tools/klee-replay/klee-replay.c | 4 | ||||
-rw-r--r-- | tools/klee/Makefile | 2 | ||||
-rw-r--r-- | tools/klee/main.cpp | 27 |
6 files changed, 17 insertions, 28 deletions
diff --git a/tools/gen-random-bout/Makefile b/tools/gen-random-bout/Makefile index 97315af2..5e1d8cf3 100644 --- a/tools/gen-random-bout/Makefile +++ b/tools/gen-random-bout/Makefile @@ -3,5 +3,6 @@ LEVEL=../.. TOOLNAME = gen-random-bout USEDLIBS = kleeBasic.a +NO_INSTALL=1 include $(LEVEL)/Makefile.common diff --git a/tools/kleaver/Makefile b/tools/kleaver/Makefile index f66d0598..10b19a20 100644 --- a/tools/kleaver/Makefile +++ b/tools/kleaver/Makefile @@ -19,7 +19,7 @@ LINK_COMPONENTS = support include $(LEVEL)/Makefile.common -LIBS += -lstp +LIBS += $(STP_LDFLAGS) ifeq ($(ENABLE_METASMT),1) include $(METASMT_ROOT)/share/metaSMT/metaSMT.makefile diff --git a/tools/kleaver/main.cpp b/tools/kleaver/main.cpp index fafe955f..af337abe 100644 --- a/tools/kleaver/main.cpp +++ b/tools/kleaver/main.cpp @@ -12,8 +12,8 @@ #include "klee/Common.h" #include "klee/util/ExprPPrinter.h" #include "klee/util/ExprVisitor.h" - #include "klee/util/ExprSMTLIBPrinter.h" +#include "klee/Internal/Support/PrintVersion.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/CommandLine.h" @@ -24,12 +24,6 @@ #include <sys/stat.h> #include <unistd.h> -// FIXME: Ugh, this is gross. But otherwise our config.h conflicts with LLVMs. -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION #include "llvm/Support/Signals.h" @@ -451,6 +445,7 @@ int main(int argc, char **argv) { bool success = true; llvm::sys::PrintStackTraceOnErrorSignal(); + llvm::cl::SetVersionPrinter(klee::printVersion); llvm::cl::ParseCommandLineOptions(argc, argv); std::string ErrorStr; diff --git a/tools/klee-replay/klee-replay.c b/tools/klee-replay/klee-replay.c index 73e2783e..6b4fb8f4 100644 --- a/tools/klee-replay/klee-replay.c +++ b/tools/klee-replay/klee-replay.c @@ -418,6 +418,10 @@ void klee_prefer_cex(void *buffer, uintptr_t condition) { ; } +void klee_posix_prefer_cex(void *buffer, uintptr_t condition) { + ; +} + void klee_make_symbolic(void *addr, size_t nbytes, const char *name) { /* XXX remove model version code once new tests gen'd */ if (obj_index >= input->numObjects) { diff --git a/tools/klee/Makefile b/tools/klee/Makefile index b9506b47..eb80d845 100644 --- a/tools/klee/Makefile +++ b/tools/klee/Makefile @@ -20,7 +20,7 @@ LINK_COMPONENTS += irreader endif include $(LEVEL)/Makefile.common -LIBS += -lstp +LIBS += $(STP_LDFLAGS) ifeq ($(ENABLE_METASMT),1) include $(METASMT_ROOT)/share/metaSMT/metaSMT.makefile diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp index 8a246685..aba247e7 100644 --- a/tools/klee/main.cpp +++ b/tools/klee/main.cpp @@ -13,13 +13,7 @@ #include "klee/Internal/Support/Debug.h" #include "klee/Internal/Support/ModuleUtil.h" #include "klee/Internal/System/Time.h" - -// FIXME: Ugh, this is gross. But otherwise our config.h conflicts with LLVMs. -#undef PACKAGE_BUGREPORT -#undef PACKAGE_NAME -#undef PACKAGE_STRING -#undef PACKAGE_TARNAME -#undef PACKAGE_VERSION +#include "klee/Internal/Support/PrintVersion.h" #if LLVM_VERSION_CODE > LLVM_VERSION(3, 2) #include "llvm/IR/Constants.h" @@ -600,7 +594,7 @@ std::string KleeHandler::getRunTimeLibraryPath(const char *argv0) { { KLEE_DEBUG_WITH_TYPE("klee_runtime", llvm::dbgs() << "Using installed KLEE library runtime: "); - libDir = KLEE_INSTALL_LIB_DIR ; + libDir = KLEE_INSTALL_RUNTIME_DIR ; } else { @@ -619,10 +613,6 @@ std::string KleeHandler::getRunTimeLibraryPath(const char *argv0) { //===----------------------------------------------------------------------===// // main Driver function // -#if ENABLE_STPLOG == 1 -extern "C" void STPLOG_init(const char *); -#endif - static std::string strip(std::string &in) { unsigned len = in.size(); unsigned lead = 0, trail = len; @@ -634,11 +624,12 @@ static std::string strip(std::string &in) { } static void parseArguments(int argc, char **argv) { + cl::SetVersionPrinter(klee::printVersion); #if LLVM_VERSION_CODE >= LLVM_VERSION(3, 2) // This version always reads response files - cl::ParseCommandLineOptions(argc, (const char**) argv, " klee\n"); + cl::ParseCommandLineOptions(argc, argv, " klee\n"); #else - cl::ParseCommandLineOptions(argc, (char**) argv, " klee\n", /*ReadResponseFiles=*/ true); + cl::ParseCommandLineOptions(argc, argv, " klee\n", /*ReadResponseFiles=*/ true); #endif } @@ -1092,6 +1083,8 @@ static llvm::Module *linkWithUclibc(llvm::Module *mainModule, StringRef libDir) replaceOrRenameFunction(mainModule, "__libc_open", "open"); replaceOrRenameFunction(mainModule, "__libc_fcntl", "fcntl"); + // Take care of fortified functions + replaceOrRenameFunction(mainModule, "__fprintf_chk", "fprintf"); // XXX we need to rearchitect so this can also be used with // programs externally linked with uclibc. @@ -1143,11 +1136,7 @@ static llvm::Module *linkWithUclibc(llvm::Module *mainModule, StringRef libDir) } #endif -int main(int argc, char **argv, char **envp) { -#if ENABLE_STPLOG == 1 - STPLOG_init("stplog.c"); -#endif - +int main(int argc, char **argv, char **envp) { atexit(llvm_shutdown); // Call llvm_shutdown() on exit. llvm::InitializeNativeTarget(); |