summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Müller <mueller@kip.uni-heidelberg.de>2024-11-01 05:26:55 +0100
committerGitHub <noreply@github.com>2024-11-01 05:26:55 +0100
commit35aa02771ac8b3f08480ff39f8f9a990cc03b2b3 (patch)
tree0aa2e6440a9e50f32ea2ee33e7f6deac6ba9666c
parentb38a29f4df4aef19420238909fe185cf13ea05e4 (diff)
downloadspack-35aa02771ac8b3f08480ff39f8f9a990cc03b2b3.tar.gz
spack-35aa02771ac8b3f08480ff39f8f9a990cc03b2b3.tar.bz2
spack-35aa02771ac8b3f08480ff39f8f9a990cc03b2b3.tar.xz
spack-35aa02771ac8b3f08480ff39f8f9a990cc03b2b3.zip
verilator: add 5.028, fix builds when using gcc on newer versions (#47168)
-rw-r--r--var/spack/repos/builtin/packages/verilator/fix_compile_gch.patch13
-rw-r--r--var/spack/repos/builtin/packages/verilator/package.py3
2 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/verilator/fix_compile_gch.patch b/var/spack/repos/builtin/packages/verilator/fix_compile_gch.patch
new file mode 100644
index 0000000000..761eeb9fa7
--- /dev/null
+++ b/var/spack/repos/builtin/packages/verilator/fix_compile_gch.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Makefile_obj.in b/src/Makefile_obj.in
+index 18947923a..d29baa840 100644
+--- a/src/Makefile_obj.in
++++ b/src/Makefile_obj.in
+@@ -363,7 +363,7 @@ $(TGT): $(PREDEP_H) $(OBJS)
+ .SECONDARY:
+
+ %.gch: %
+- $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} ${CFG_CXXFLAGS_PCH} $< -o $@
++ $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} ${CFG_CXXFLAGS_PCH} -c $< -o $@
+ %.o: %.cpp
+ $(OBJCACHE) ${CXX} ${CXXFLAGS} ${CPPFLAGSWALL} -c $< -o $@
+ %.o: %.c
diff --git a/var/spack/repos/builtin/packages/verilator/package.py b/var/spack/repos/builtin/packages/verilator/package.py
index 7500e252d9..0399839d04 100644
--- a/var/spack/repos/builtin/packages/verilator/package.py
+++ b/var/spack/repos/builtin/packages/verilator/package.py
@@ -42,6 +42,7 @@ class Verilator(AutotoolsPackage):
version("master", branch="master")
+ version("5.028", sha256="02d4b6f34754b46a97cfd70f5fcbc9b730bd1f0a24c3fc37223397778fcb142c")
version("5.026", sha256="87fdecf3967007d9ee8c30191ff2476f2a33635d0e0c6e3dbf345cc2f0c50b78")
version("5.024", sha256="88b04c953e7165c670d6a700f202cef99c746a0867b4e2efe1d7ea789dee35f3")
version("5.022", sha256="3c2f5338f4b6ce7e2f47a142401acdd18cbf4c5da06092618d6d036c0afef12d")
@@ -86,6 +87,8 @@ class Verilator(AutotoolsPackage):
conflicts("%gcc@:6", msg="C++14 support required")
+ patch("fix_compile_gch.patch", level=1, when="@5.0.18:")
+
# we need to fix the CXX and LINK paths, as they point to the spack
# wrapper scripts which aren't usable without spack
filter_compiler_wrappers("verilated.mk", relative_root="include")