summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCayetano Santos <csantosb@inventati.org>2024-10-11 21:31:54 +0200
committerLudovic Courtès <ludo@gnu.org>2024-11-20 12:23:40 +0100
commitd33b748cf6a10f88ecfc698cc7af289c6ed4be3a (patch)
tree5c218c3d9237420be8701216f6be4491e009dbee
parent31ae47e5a3a9ca48972e7b6e5a1b0e3a0f1e7dab (diff)
gnu: Add ghdl-clang.
* guix-science/packages/electronics.scm (ghdl-clang): New variable.
-rw-r--r--guix-science/packages/electronics.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/guix-science/packages/electronics.scm b/guix-science/packages/electronics.scm
index 0f85912..3d79976 100644
--- a/guix-science/packages/electronics.scm
+++ b/guix-science/packages/electronics.scm
@@ -124,3 +124,54 @@
124 "This package gathers GNAT binaries from FSF GCC releases of the Alire 124 "This package gathers GNAT binaries from FSF GCC releases of the Alire
125Project.") 125Project.")
126 (license license:gpl3+))) 126 (license license:gpl3+)))
127
128(define-public ghdl-clang
129 (package
130 (name "ghdl-clang")
131 (version "4.1.0")
132 (source
133 (origin
134 (method git-fetch)
135 (uri (git-reference
136 (url "https://github.com/ghdl/ghdl")
137 (commit (string-append "v" version))))
138 (file-name (git-file-name name version))
139 (sha256
140 (base32 "1wq231slpm594qr5ad441igancxr6b0hczgql0cx2xpapmx8gx5l"))))
141 (build-system gnu-build-system)
142 (arguments
143 (list
144 ;; XXX: This would check DT_RUNPATH, but patchelf populate DT_RPATH,
145 ;; not DT_RUNPATH.
146 #:validate-runpath? #f
147 #:out-of-source? #t
148 #:phases #~(modify-phases %standard-phases
149 (replace 'configure
150 (lambda* (#:key inputs #:allow-other-keys)
151 (let ((libc (assoc-ref inputs "libc")))
152 (invoke "./configure"
153 "--with-llvm-config"
154 "--enable-libghdl"
155 "--enable-synth"
156 "--disable-gplcompat"
157 (string-append "--prefix="
158 #$output)))))
159 (delete 'check)
160 (replace 'build
161 (lambda* (#:key inputs #:allow-other-keys)
162 (invoke "make" "ghdl_llvm" "-j"
163 (number->string (parallel-job-count)))
164 (invoke "patchelf" "--set-interpreter"
165 (search-input-file inputs
166 #$(glibc-dynamic-linker))
167 "ghdl_llvm")
168 (invoke "make" "-j"
169 (number->string (parallel-job-count))))))))
170 (propagated-inputs (list clang-toolchain))
171 (inputs (list gnat patchelf))
172 (home-page "https://github.com/ghdl/ghdl")
173 (synopsis "Compiler for VHDL code using clang backend")
174 (description
175 "GHDL analyses, elaborates and simulates VHDL sources. It may also be
176used as an experimental synthesizer backend.")
177 (license license:gpl2+)))