From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MMhCC+/VimZHdgEAqHPOHw:P1 (envelope-from ) for ; Sun, 07 Jul 2024 17:52:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id MMhCC+/VimZHdgEAqHPOHw (envelope-from ) for ; Sun, 07 Jul 2024 19:52:47 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=Zgb253Gf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720373227; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1WcnA6fFeRb+Nsb49cv1WapiuB+dPgf2NdJG2XURaKA=; b=uobcfZFeL2i00un0VGMWI6I31b5EM/mkHwd7Zkdqdcrvidz5UparRolXlMl+fWMjHfToZ1 yVvSpUO7mrlOkt7dyZ7HEtpfTQePBQutX/PAdKcLOyba+n8hY4jZjuG0IkHs0KDuorNZvf +/h65mrusjVZC4jdxdCwqvJQpJrkDRyznUjoVlNdnZdDGP0CNzVwoh5oZyx6EIaCzZiVNm Ll1p3dTKhzBi+vE4Ul5qSNkUhzZoGMXK09u0JA5m/utvmsp3C58wLX4Lc9ghWkgkERv4y9 nP4xCXlsUllHF79/pyLvAaOh5ylW/TEfZxOAO20qIelIehTlZOK8+CcGa4DPCw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720373227; a=rsa-sha256; cv=none; b=KxmcVvpGynl1rBCkHx+Oc93TY/kCtRXXC/QvzoapmK/y2aDUNzfrvqDpicP+tX7u0un1B3 LPtGdAjub8zmnVrQaytLvr3D7lfoODz5BfStP/dTTlry9z0pH+evrNw01TJWRuorrDbA0X NHtv2NS5RWMQT2mK4R8ZiPNaIz2bj0ZcQ7CAgB+vgWJpitIzXc0zbi6dqe6UvZLv2ClOcE ozZV0cYP6pwFqKR9q/6vMbowPgaDE3tLZdlZ91+vXnC69ADRpZMWv6VlnWAQE2icNv9BMz 09cQSAMR8KLDR9iq+C8oN0Bv4Pl2l+okt/qpNF4NKCavutQhWudJb7Xmy9yBYw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=Zgb253Gf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 14F9B717B0 for ; Sun, 07 Jul 2024 19:27:07 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQVf9-0000OX-Vi; Sun, 07 Jul 2024 13:27:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sQVf8-0000OF-Fg for guix-patches@gnu.org; Sun, 07 Jul 2024 13:26:58 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sQVf8-0006R1-7f for guix-patches@gnu.org; Sun, 07 Jul 2024 13:26:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sQVfC-0005bZ-Be for guix-patches@gnu.org; Sun, 07 Jul 2024 13:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71925] [PATCH v2 1/2] gnu: Add klee-uclibc. References: In-Reply-To: Resent-From: soeren@soeren-tempel.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 07 Jul 2024 17:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71925 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71925@debbugs.gnu.org Cc: liliana.prikler@gmail.com Received: via spool by 71925-submit@debbugs.gnu.org id=B71925.172037321621526 (code B ref 71925); Sun, 07 Jul 2024 17:27:02 +0000 Received: (at 71925) by debbugs.gnu.org; 7 Jul 2024 17:26:56 +0000 Received: from localhost ([127.0.0.1]:49085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQVf6-0005b8-2L for submit@debbugs.gnu.org; Sun, 07 Jul 2024 13:26:56 -0400 Received: from magnesium.8pit.net ([45.76.88.171]:30794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQVf0-0005aq-DW; Sun, 07 Jul 2024 13:26:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=opensmtpd; bh=1WcnA6fF eRb+Nsb49cv1WapiuB+dPgf2NdJG2XURaKA=; h=date:subject:cc:to:from; d=soeren-tempel.net; b=Zgb253GfQdxRqedkwzzDKxoJntmxK9tSxeX/Fs62Nwf2iZM Ho3ZT3cKnrRQ+Czz2gDSTH6JpPlAd1q/eMQYyB1po9mf8Jgsjfp35s+sUBIEA1Wjpeg1Fo RjClHNT3/ay/3gXk3wGiO6t0HOhJH+nLnJOqRgPCshWH8dJVwDKKK8= Received: from localhost (dynamic-2a02-3102-49da-001b-8090-663c-294a-426c.310.pool.telefonica.de [2a02:3102:49da:1b:8090:663c:294a:426c]) by magnesium.8pit.net (OpenSMTPD) with ESMTPSA id 4d4aa9da (TLSv1.3:TLS_AES_256_GCM_SHA384:256:YES); Sun, 7 Jul 2024 19:26:43 +0200 (CEST) From: soeren@soeren-tempel.net Date: Sun, 7 Jul 2024 19:26:30 +0200 Message-ID: <05cf10c887315b7b2ee2a4ee5d43a6baea969d6c.1720373191.git.soeren@soeren-tempel.net> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.29 X-Spam-Score: -1.29 X-Migadu-Queue-Id: 14F9B717B0 X-Migadu-Scanner: mx11.migadu.com X-TUID: b5TMWdDmSKZQ From: Sören Tempel * gnu/packages/check.scm (klee-uclibc): New variable. --- gnu/packages/check.scm | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 550a5d0f1d..35e26ba6da 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -87,6 +87,7 @@ (define-module (gnu packages check) #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) #:use-module (gnu packages maths) + #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -989,6 +990,63 @@ (define-public greatest runner. It is quite unopinionated with most of its features being optional.") (license license:isc))) +(define-public klee-uclibc + (let ((commit "955d502cc1f0688e82348304b053ad787056c754")) + (package + (name "klee-uclibc") + (version (git-version "20230612" "0" commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/klee/klee-uclibc") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "12fnr5mq80cxwvv09gi844mi31jgi8067swagxnlxlhxj4mi125j")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;upstream uClibc tests do not work in the fork + #:strip-directories '() ;only ships a static library, so don't strip anything. + #:phases (modify-phases %standard-phases + ;; Disable locales as these would have to be downloaded and + ;; shouldn't really be needed for symbolic execution either. + (add-after 'unpack 'patch-config + (lambda _ + (substitute* "klee-premade-configs/x86_64/config" + (("UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=y") + "UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA=n") + (("UCLIBC_PREGENERATED_LOCALE_DATA=y") + "UCLIBC_PREGENERATED_LOCALE_DATA=n") + (("UCLIBC_HAS_LOCALE=y") + "UCLIBC_HAS_LOCALE=n") + (("UCLIBC_HAS_XLOCALE=y") + "UCLIBC_HAS_XLOCALE=n")))) + + ;; Upstream uses a custom non-GNU configure script written + ;; in Python, replace the default configure phase accordingly. + (replace 'configure + (lambda _ + (invoke "./configure" "--make-llvm-lib" + "--enable-release"))) + + ;; Custom install phase to only install the libc.a file manually. + ;; This is the only file which is used/needed by KLEE itself. + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (install-file "lib/libc.a" + (string-append (assoc-ref outputs "out") + "/lib"))))))) + ;; ncurses is only needed for the `make menuconfig` interface. + (native-inputs (list clang-13 llvm-13 python ncurses)) + (synopsis "Variant of uClibc tailored to symbolic execution") + (description + "Modified version of uClibc for symbolic execution of +Unix userland software. This library can only be used in conjunction +with the @code{klee} package.") + (home-page "https://klee-se.org/") + (license license:lgpl2.1)))) + (define-public klee (package (name "klee") base-commit: bab73e413b3421f4aa051e9438d147040a52e1be