GNU bug report logs - #73717
[PATCH] gnu: Add yosys-clang.

Previous Next

Package: guix-patches;

Reported by: Cayetano Santos <csantosb <at> inventati.org>

Date: Wed, 9 Oct 2024 07:46:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#73717: closed ([PATCH] gnu: Add yosys-clang.)
Date: Tue, 07 Jan 2025 18:06:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 07 Jan 2025 19:04:49 +0100
with message-id <87ed1ezeim.fsf <at> gnu.org>
and subject line Re: [bug#73717] [PATCH v1] gnu: Add yosys-clang.
has caused the debbugs.gnu.org bug report #73717,
regarding [PATCH] gnu: Add yosys-clang.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
73717: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73717
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Cayetano Santos <csantosb <at> inventati.org>
To: guix-patches <at> gnu.org
Cc: Cayetano Santos <csantosb <at> inventati.org>
Subject: [PATCH] gnu: Add yosys-clang.
Date: Wed,  9 Oct 2024 09:45:02 +0200
* 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



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: Simon Tournier <zimon.toutoune <at> gmail.com>, paren <at> disroot.org,
 73717-done <at> debbugs.gnu.org, Tobias Geerinckx-Rice <me <at> tobias.gr>,
 jgart <jgart <at> dismail.de>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Christopher Baines <guix <at> cbaines.net>
Subject: Re: [bug#73717] [PATCH v1] gnu: Add yosys-clang.
Date: Tue, 07 Jan 2025 19:04:49 +0100
Cayetano Santos <csantosb <at> inventati.org> skribis:

> * gnu/packages/fpga.scm (yosys-clang): New variable.
>
> Change-Id: Iedbd418adc152c325d106830d9d33b73f01e65da

Finally applied.  Thank you, and apologies for the delay!

Ludo’.


This bug report was last modified 135 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.