gnu: iverilog: Enable cross compile.

* gnu/packages/electronics.scm (iverilog)[arguments]: Add #:make-flags
and remove ’ensure-native-baked-CC/CXX #:phase.

Merges guix/guix!5696

Change-Id: I53cbdc77a426403dcd965a4e51b04e34fdd590d2
This commit is contained in:
Cayetano Santos 2026-01-17 11:02:34 +01:00
parent 6c6e7ada01
commit 0908abf25c
No known key found for this signature in database
GPG key ID: BF5CDF4DF6BF6682

View file

@ -633,18 +633,10 @@ Simulator Trace} files.")
(arguments
(list
#:bootstrap-scripts #~(list "autoconf.sh")
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'ensure-native-baked-CC/CXX
(lambda _
;; The compilers used to build are retained in
;; bin/iverilog-vpi, which is a Makefile
;; script. Normalize these to just 'gcc' and 'g++' to
;; avoid having these set to cross compilers.
(substitute* "Makefile.in"
(("s;@IVCC@;\\$\\(CC);")
"s;@IVCC@;gcc;")
(("s;@IVCXX@;\\$\\(CXX);")
"s;@IVCXX@;g++;")))))))
#:make-flags
#~(list (string-append "CC=" #$(cc-for-target))
(string-append "CXX=" #$(cxx-for-target))
(string-append "PREFIX=" #$output))))
(native-inputs (list autoconf bison flex gperf))
(inputs (list zlib))
(home-page "https://steveicarus.github.io/iverilog/")