diff options
author | Sören Tempel <soeren@soeren-tempel.net> | 2024-07-08 09:44:26 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2024-07-13 08:10:03 +0200 |
commit | 087bd6916ddd03d5f92d0a77d0e5f849e957ddb9 (patch) | |
tree | 012077a46c020c83e125c793aaf60e681c2d3b6b /gnu | |
parent | 3bdaa223b363b6986baa4bfa11f629f6ba974bba (diff) | |
download | guix-087bd6916ddd03d5f92d0a77d0e5f849e957ddb9.tar.gz guix-087bd6916ddd03d5f92d0a77d0e5f849e957ddb9.zip |
gnu: klee: Build with klee-uclibc support.
* gnu/packages/check.scm (klee): Use klee-uclibc.
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/check.scm | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 44cf069b00..3bfcf5a37e 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1063,13 +1063,32 @@ with the @code{klee} package.") (base32 "1nma6dqi8chjb97llsa8mzyskgsg4dx56lm8j514j5wmr8vkafz6")))) (arguments (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda _ + (substitute* "CMakeLists.txt" + (("\\$\\{KLEE_UCLIBC_PATH\\}/lib/libc\\.a") + "${KLEE_UCLIBC_PATH}")))) + (add-after 'install 'wrap-hooks + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (lib (string-append out "/lib"))) + ;; Ensure that KLEE finds runtime libraries (e.g. uclibc). + (wrap-program (string-append bin "/klee") + `("KLEE_RUNTIME_LIBRARY_PATH" = + (,(string-append lib "/klee/runtime/")))))))) #:configure-flags #~(list (string-append "-DLLVMCC=" (search-input-file %build-inputs "/bin/clang")) (string-append "-DLLVMCXX=" - (search-input-file %build-inputs "/bin/clang++"))))) + (search-input-file %build-inputs "/bin/clang++")) + (string-append "-DKLEE_UCLIBC_PATH=" + (search-input-file %build-inputs "/lib/klee/libc.a")) + "-DENABLE_POSIX_RUNTIME=ON"))) (native-inputs (list clang-13 llvm-13 python-lit)) - (inputs (list gperftools sqlite z3)) + (inputs (list bash-minimal klee-uclibc gperftools sqlite z3)) (build-system cmake-build-system) (home-page "https://klee-se.org/") (synopsis "Symbolic execution engine") |