diff mbox series

[bug#73717,v1] gnu: Add yosys-clang.

Message ID b01e48ba001d03f82a90cb73505edab56a7f03cc.1730192146.git.csantosb@inventati.org
State New
Headers show
Series [bug#73717,v1] gnu: Add yosys-clang. | expand

Commit Message

Cayetano Santos Oct. 29, 2024, 8:55 a.m. UTC
* gnu/packages/fpga.scm (yosys-clang): New variable.

Change-Id: Iedbd418adc152c325d106830d9d33b73f01e65da
---
 gnu/packages/fpga.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)


base-commit: d44beb9b4ad836781928a0c5667e94c0d6df13f0
diff mbox series

Patch

diff --git a/gnu/packages/fpga.scm b/gnu/packages/fpga.scm
index 68f36d501f..5ede463dde 100644
--- a/gnu/packages/fpga.scm
+++ b/gnu/packages/fpga.scm
@@ -224,6 +224,26 @@  (define-public yosys
     (description "Yosys synthesizes Verilog-2005.")
     (license license:isc)))
 
+(define-public yosys-clang
+  (package
+    (inherit yosys)
+    (name "yosys-clang")
+    (arguments
+     (substitute-keyword-arguments (package-arguments yosys)
+       ((#:make-flags _ #f)
+        #~(list "CC=clang"
+                "CXX=clang++"
+                (string-append "PREFIX=" #$output)))
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            (replace 'configure
+              (lambda* (#:key make-flags #:allow-other-keys)
+                (apply invoke "make" "config-clang" make-flags)))))))
+    (inputs
+     (modify-inputs (package-inputs yosys)
+       (append clang)))
+    (synopsis "FPGA Verilog RTL synthesizer (Clang variant)")))
+
 (define-public icestorm
   (let ((commit "2bc541743ada3542c6da36a50e66303b9cbd2059")
         (revision "4"))