From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 4ESnKUaZi2ZFRwEAe85BDQ:P1 (envelope-from ) for ; Mon, 08 Jul 2024 07:46:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 4ESnKUaZi2ZFRwEAe85BDQ (envelope-from ) for ; Mon, 08 Jul 2024 09:46:14 +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=f00GzLXn; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1720424774; 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=4LM3LNkvGqJGpQkX39GPFwrDnxb2m1MG+AuoLCPTThQ=; b=ltwP3UK7LPboUEFKESOJ7u+mO/2chmLeJSJNAfrK14Q7XTDHb0gLBRyU6Iizmd6/Sinz81 4z8A0CRrhv7fs5eweJtulAs8Teqgw9SihAkbP2wPNZNJIgB9jUBZNB1l1LFd7OjnRlioYM oy1wPo2G8X80sixtf4LGiH5YjorRLmvyZ1gTmE+Sel2M4kzr46Na+7yIRF5UYEL+QPBi64 7YMdkU0JqCoSj2WGs6bFmc5IbZFnIcGSNhrFMbpBKeIrzrautnk71RNaaPAkisaeP7feTD m2cGuqnnrklxZ1aY43S6zr6H1k4rtohXxKzX0KPWejVgin4cnxheC2L3/5Gp3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=soeren-tempel.net header.s=opensmtpd header.b=f00GzLXn; 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"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=soeren-tempel.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720424774; a=rsa-sha256; cv=none; b=XW5MkWQN4gieXoPDF1AUsx/yzWnbc60jBqNaHc6U0+DWTEWzGOaCe3SGLCa5Ng6t+75neL dZPS31FIez5iVtGj1Ye9WfmJiMlUhvnepNtBSU4Rh8N7FIghDkF8XKtzfmo6Frht4KHpYy QhmdWYevKXgaT0sLIhPscawEfQBqG3+dNz2qvlTurMGdKx66AbH+gY5J1DrMI7X6yT6uNF 5eTU8ogcGMpjHfSCiL2y4CbwXgaI++rL33GxjvdfHuAaVTTbLul30troXnZIt4rTPUL5pG SzyCa0XqCuZlf4CRv1oZ6nPkDJ431POHwHfrSqsS6PZBX5qy11p7bUoT/tISzw== 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 8F1BD76A59 for ; Mon, 8 Jul 2024 09:46:14 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQj4Y-0007Fu-A6; Mon, 08 Jul 2024 03:46:07 -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 1sQj4P-0007DT-JC for guix-patches@gnu.org; Mon, 08 Jul 2024 03:45: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 1sQj4P-0003Xk-4i for guix-patches@gnu.org; Mon, 08 Jul 2024 03:45:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sQj4T-00065g-QW for guix-patches@gnu.org; Mon, 08 Jul 2024 03:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71925] [PATCH v4 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: Mon, 08 Jul 2024 07:46:01 +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.172042471923352 (code B ref 71925); Mon, 08 Jul 2024 07:46:01 +0000 Received: (at 71925) by debbugs.gnu.org; 8 Jul 2024 07:45:19 +0000 Received: from localhost ([127.0.0.1]:49582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQj3m-00064W-KK for submit@debbugs.gnu.org; Mon, 08 Jul 2024 03:45:19 -0400 Received: from magnesium.8pit.net ([45.76.88.171]:41054) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sQj3k-00064K-BN; Mon, 08 Jul 2024 03:45:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=opensmtpd; bh=4LM3LNkv GqJGpQkX39GPFwrDnxb2m1MG+AuoLCPTThQ=; h=date:subject:cc:to:from; d=soeren-tempel.net; b=f00GzLXn9XOFmLd2OSlXaN5fCxHa0l40ZFeLlntZCfq3CV8 8IG4t+5ZxawsCBW2BzpJCLLoZoYy7B8P9cCY2sKTFDmmpuYxvk2U7WyaUWo8WB2N6mQnzJ Idl5pmXEMsM5MkngVRq0H6ECjxXBzLdAm84Va9WqdieLauufkdFdvM= Received: from localhost (dynamic-2a02-3102-49da-001b-167b-bb16-88d3-7747.310.pool.telefonica.de [2a02:3102:49da:1b:167b:bb16:88d3:7747]) by magnesium.8pit.net (OpenSMTPD) with ESMTPSA id 01829049 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:YES); Mon, 8 Jul 2024 09:45:07 +0200 (CEST) From: soeren@soeren-tempel.net Date: Mon, 8 Jul 2024 09:44:25 +0200 Message-ID: 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-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: 3.61 X-Migadu-Queue-Id: 8F1BD76A59 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: 3.61 X-TUID: xcJLnLiH9/92 From: Sören Tempel * gnu/packages/check.scm (klee-uclibc): New variable. --- Changes since v3: Move klee-uclibc library to `/lib/klee/libc.a`. gnu/packages/check.scm | 58 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 550a5d0f1d..e02dc1b23d 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/klee"))))))) + ;; 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