GNU bug report logs -
#71925
[PATCH 0/2] Add klee-uclibc.
Previous Next
Reported by: soeren <at> soeren-tempel.net
Date: Wed, 3 Jul 2024 19:07:02 UTC
Severity: normal
Tags: patch
Done: Sören Tempel <soeren <at> soeren-tempel.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
From: Sören Tempel <soeren <at> soeren-tempel.net>
* gnu/packages/check.scm (klee): Use klee-uclibc.
---
Changes since v3: Move klee-uclibc library to `/lib/klee/libc.a`.
gnu/packages/check.scm | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index e02dc1b23d..c4eaaef18f 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1062,13 +1062,32 @@ (define-public klee
(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")
This bug report was last modified 185 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.