From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 WMzfCsY0BmeX2QAAe85BDQ:P1 (envelope-from ) for ; Wed, 09 Oct 2024 07:46:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id WMzfCsY0BmeX2QAAe85BDQ (envelope-from ) for ; Wed, 09 Oct 2024 09:46:14 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=LGGPXRiA; dkim=fail ("headers rsa verify failed") header.d=inventati.org header.s=stigmate header.b=aG9SX9Wu; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728459974; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=fwmB5f73dHJ5F/+clnjJtIEPwCx3noIDPkZ+zmOU05Y=; b=iwh1yU3WVwQCTJOue86fTpNliEhgi6zejM5bAOkwtBifaq5hu0kWRROXs+TPQVxXx6A7AU NrBeSNUCJ69b0hL/J32I1LQCuQ7EeoFINlIL2ezRLW/zMXxLCTBa/lSgha/8fP7XFLZ2vA ZPsXrEO7pB7z9CP/fvYOkgeCyJV3/ssB7Vq3Iy6ek9wCybf9g0JpD41lebeEzVupqxqAAc QkGXyMhAe32t73Pmc5A05Y77B4baMj4wq9O5U4lsFIXVGurcIXL8oM2sHxeo2d8U0O+Xpj y8SRPfCByRBc9COJMp5x5YaVPsuxPB5mhjXfSku8J6AVHAo/A/SK323PhnEuYA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=LGGPXRiA; dkim=fail ("headers rsa verify failed") header.d=inventati.org header.s=stigmate header.b=aG9SX9Wu; 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=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728459974; a=rsa-sha256; cv=none; b=l/HR8SuT/FP/9zfOBCH7s3eKel2xPJ4H7kM4CoDe039zN6cRNSw9PBHlF7b7onqAKLgAKL AK90sEvg9fdWoxkYOFUp/T2HyT8CO+kJ1stVr/cyXFb0Bbz83Sv/FVFLnWBESES2xn0G6I V895ryKMcutY4DK8+yua3Km2NF8CxRS0B6he9n/o5eqy8zzVxDBtn2tPzu3J678emfsqoq h44scy/vrBqIgGuD9CB7XJAX4JN9BWmQPwXFHSxCTssdERcQH0+hQj7o+mgpXeCJD8bvec KomdranRMkAp1cp/J+havEXkkYmtglhnTTwmUymhz9KOeag1gz7zq/W2r0ZH+A== 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 5C9617D8F6 for ; Wed, 09 Oct 2024 09:46:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syROO-0002zC-CK; Wed, 09 Oct 2024 03:45:56 -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 1syROM-0002z3-TU for guix-patches@gnu.org; Wed, 09 Oct 2024 03:45:54 -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 1syROL-0002T7-44 for guix-patches@gnu.org; Wed, 09 Oct 2024 03:45:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=fwmB5f73dHJ5F/+clnjJtIEPwCx3noIDPkZ+zmOU05Y=; b=LGGPXRiA6LL0XWZKzBKwd6IpPnPqdrObA+4KvXZtCzorjuwAQGN8xgQzukYijhDPsG67Lt2kaoYu+4Ns1WuADxEC02jj5kppqXA8+hVrU0ca+Qg6VgATmCMfrcNVBZXY78zdJe5ROYlL0o3pdI4sbOm7K4g7t/Mhk7sv5tSJB0KUUYnK9/MGCh3Vz1Kg1mtepXQANUnaAgm9g97iOMckfO/acAirKvULmc6rdaDX4NDIzqUeRYyeBsSh2uwPwbWWZjWGwXQPCTxazNgVOAxp2H0MKM3KJ4atTdzuHIIARrKWeWtToLbTUlM1RUIOXBfwoIisFpNjUtemCk6QZPHD6g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1syROU-0006fR-NQ for guix-patches@gnu.org; Wed, 09 Oct 2024 03:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73717] [PATCH] gnu: Add yosys-clang. Resent-From: Cayetano Santos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Oct 2024 07:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73717 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73717@debbugs.gnu.org Cc: Cayetano Santos X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172845994825605 (code B ref -1); Wed, 09 Oct 2024 07:46:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Oct 2024 07:45:48 +0000 Received: from localhost ([127.0.0.1]:55523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syROF-0006eu-OG for submit@debbugs.gnu.org; Wed, 09 Oct 2024 03:45:48 -0400 Received: from lists.gnu.org ([209.51.188.17]:45622) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syROC-0006ej-4g for submit@debbugs.gnu.org; Wed, 09 Oct 2024 03:45:45 -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 1syRO2-0002yU-5Z for guix-patches@gnu.org; Wed, 09 Oct 2024 03:45:34 -0400 Received: from confino.investici.org ([2a11:7980:1::2:0]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1syRNz-0002Pt-48 for guix-patches@gnu.org; Wed, 09 Oct 2024 03:45:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inventati.org; s=stigmate; t=1728459924; bh=fwmB5f73dHJ5F/+clnjJtIEPwCx3noIDPkZ+zmOU05Y=; h=From:To:Cc:Subject:Date:From; b=aG9SX9WumTW6esOxhVCufoReJeDZ4BySP35tInxN8fVD79JhcVnPm2veA4LXJxoLc zIPDkwQjf2uDr8J8mnoR8NSWzD2jf43fKrsGXYEsj9Q8VgPmPv/eJZC/6pQ/DoNZG9 wwVaJhz11GOG7wEQ5n885HzV3aji1YFvi2eXX2LU= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4XNlKw6ZrLz119r; Wed, 9 Oct 2024 07:45:24 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: cayetano.santos@inventati.org) by localhost (Postfix) with ESMTPSA id 4XNlKw5Pccz117F; Wed, 9 Oct 2024 07:45:24 +0000 (UTC) Date: Wed, 9 Oct 2024 09:45:02 +0200 Message-ID: <8b52ca0f1d61c5ff14501fb72658b0bee716af13.1728459902.git.csantosb@inventati.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a11:7980:1::2:0; envelope-from=csantosb@inventati.org; helo=confino.investici.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Reply-to: Cayetano Santos X-ACL-Warn: , Cayetano Santos via Guix-patches From: Cayetano Santos via Guix-patches via 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-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: 0.45 X-Spam-Score: 0.45 X-Migadu-Queue-Id: 5C9617D8F6 X-TUID: ZBcyis5kbjrK * gnu/packages/fpga.scm (yosys-clang): New variable. Change-Id: Iedbd418adc152c325d106830d9d33b73f01e65da --- gnu/packages/fpga.scm | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm index 68f36d501f..5204e041f9 100644 --- a/gnu/packages/fpga.scm +++ b/gnu/packages/fpga.scm @@ -224,6 +224,60 @@ (define-public yosys (description "Yosys synthesizes Verilog-2005.") (license license:isc))) +(define-public yosys-clang + (package + (inherit yosys) + (name "yosys-clang") + (arguments + (list + #:test-target "test" + #:make-flags #~(list "CC=clang" + "CXX=clang++" + (string-append "PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'fix-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "./backends/smt2/smtio.py" + (("\\['z3") + (string-append "['" (search-input-file inputs "/bin/z3")))) + (substitute* "./kernel/fstdata.cc" + (("vcd2fst") + (search-input-file inputs "/bin/vcd2fst"))) + (substitute* '("./passes/cmds/show.cc" + "./passes/cmds/viz.cc") + (("exec xdot") + (string-append "exec " (search-input-file inputs + "/bin/xdot"))) + (("dot -") + (string-append (search-input-file inputs "/bin/dot") " -")) + (("fuser") + (search-input-file inputs "/bin/fuser"))))) + (replace 'configure + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "config-clang" make-flags))) + (add-after 'configure 'use-external-abc + (lambda* (#:key inputs #:allow-other-keys) + (substitute* '("./Makefile") + (("ABCEXTERNAL \\?=") + (string-append "ABCEXTERNAL = " + (search-input-file inputs "/bin/abc")))))) + (add-after 'install 'add-symbolic-link + (lambda* (#:key inputs #:allow-other-keys) + ;; Previously this package provided a copy of the "abc" + ;; executable in its output, named "yosys-abc". Create a + ;; symbolic link so any external uses of that name continue to + ;; work. + (symlink (search-input-file inputs "/bin/abc") + (string-append #$output "/bin/yosys-abc")))) + (add-after 'install 'wrap + (lambda* (#:key inputs #:allow-other-keys) + (wrap-program (string-append #$output "/bin/yosys-witness") + `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH"))))))))) + (inputs + (modify-inputs (package-inputs yosys) + (append clang))))) + (define-public icestorm (let ((commit "2bc541743ada3542c6da36a50e66303b9cbd2059") (revision "4")) base-commit: d44beb9b4ad836781928a0c5667e94c0d6df13f0 -- 2.46.0