Compare commits

...
Sign in to create a new pull request.

30 commits

Author SHA1 Message Date
Nolan Poe
aafbc5153d Only enable CCWARN on arm64 and amd64 2025-08-31 00:57:10 -07:00
Packit
a3e6557801 Update to 5.040 upstream release
- Resolves: rhbz#2378999

Upstream tag: v5.040
Upstream commit: 51cdf52d

Commit authored by Packit automation (https://packit.dev/)
2025-08-31 04:29:38 +00:00
Nolan Poe
b12a9b1d2c Merge #12 Stop building for 32-bit x86 2025-08-05 15:07:15 +00:00
Fedora Release Engineering
a6ee74841b Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 20:03:08 +00:00
Jerry James
8d599b3407 Stop building for 32-bit x86 2025-07-16 16:22:18 -06:00
Nolan Poe
b45a9349fa
Add python3-distro 2025-04-27 20:31:27 -07:00
Packit
37db271241 Update to 5.036 upstream release
- Resolves: rhbz#2362594

Upstream tag: v5.036
Upstream commit: eca2b4c9

Commit authored by Packit automation (https://packit.dev/)
2025-04-27 22:27:17 +00:00
Packit
e76a9731a0 Update to 5.034 upstream release
- Resolves: rhbz#2347446

Upstream tag: v5.034
Upstream commit: 436d3d76

Commit authored by Packit automation (https://packit.dev/)
2025-02-25 01:52:58 +00:00
Fedora Release Engineering
df65618072 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 14:16:22 +00:00
Nolan Poe
c39b8c4702
Differentiate version tags between EPEL and Fedora 2025-01-01 13:24:43 -08:00
Nolan Poe
9eca3ffd96
Update to 5.032 upstream release
- Resolves: rhbz#2292595

Upstream tag: v5.032
Upstream commit: 8ff77e9d

Commit authored by Packit automation (https://packit.dev/)
2025-01-01 13:17:19 -08:00
Nolan Poe
4833d86a59
Update packit.yaml to use upstream tagging scheme 2025-01-01 13:11:04 -08:00
Nolan Poe
465ea27146 Merge branch 'epel10' 2024-12-13 20:03:34 -08:00
Nolan Poe
f557b8d1a1 Do not use z3 and gperftools in CentOS/RHEL builds 2024-12-13 20:02:38 -08:00
Nolan Poe
200d4c7d31 Do not use z3 and gperftools in CentOS/RHEL builds 2024-12-13 19:58:27 -08:00
Nolan Poe
6bfdc10900 Do not build with tcmalloc and z3, which are unavailable in c10s 2024-12-13 19:40:21 -08:00
Nolan Poe
785e97611b minor typo 2024-12-13 19:21:14 -08:00
Nolan Poe
45381c4edd Update tests 2024-12-04 22:55:09 -08:00
Nolan Poe
6369594fa2 Disable some hardcoded paths in binary 2024-12-04 21:59:24 -08:00
Nolan Poe
af787fca69 Do not set build flags during testing 2024-12-04 21:34:04 -08:00
Nolan Poe
b9b5ba0b75 Packit support 2024-12-04 14:13:38 -08:00
Nolan Poe
6cbf78204e Re-enable warnings 2024-12-04 14:01:52 -08:00
Nolan Poe
70e60ee2f5 Add initial gating tests 2024-12-04 13:59:14 -08:00
Nolan Poe
1e8ab6a947 Remove legacy changelog 2024-12-04 13:50:52 -08:00
Nolan Poe
e6d0efe52e Update to 5.030 2024-11-30 14:42:41 -08:00
Nolan Poe
addfaf64af
Update to Verilator 5.028 2024-08-21 18:25:08 -07:00
Fedora Release Engineering
b41054f222 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 08:42:49 +00:00
Nolan Poe
604b025a52
Update to Verilator 5.026 2024-07-15 15:29:39 -07:00
Nolan Poe
978de543b6
Disable CCWARN on F39 2024-04-05 09:21:30 -07:00
Nolan Poe
50e0e16f3f
Update to 5.024 2024-04-05 09:21:28 -07:00
20 changed files with 129 additions and 335 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

8
.gitignore vendored
View file

@ -5,3 +5,11 @@ verilator-3.803.tgz
/verilator-5.014.tar.gz
/verilator-5.020.tar.gz
/verilator-5.022.tar.gz
/verilator-5.024.tar.gz
/verilator-5.026.tar.gz
/verilator-5.028.tar.gz
/verilator-5.030.tar.gz
/verilator-5.032.tar.gz
/verilator-5.034.tar.gz
/verilator-5.036.tar.gz
/verilator-5.040.tar.gz

View file

@ -1,27 +0,0 @@
commit 01dadb0a8d1c86493d310f400a084fa899915edb
Author: Kamil Rakoczy <kamilrakoczy1@gmail.com>
Date: Fri Mar 1 21:29:13 2024 +0100
Fix try-lock spuriously fails (#4931) (#4938)
diff --git a/src/V3ThreadPool.h b/src/V3ThreadPool.h
index 2d552c10a..09b2ba17c 100644
--- a/src/V3ThreadPool.h
+++ b/src/V3ThreadPool.h
@@ -139,7 +139,15 @@ class V3ThreadPool final {
std::abort();
}
- if (VL_UNCOVERABLE(!m_mutex.try_lock())) {
+ bool m_mutex_locked = m_mutex.try_lock();
+ // try_lock can sometimes spontaneously fail even when mutex is not locked,
+ // make sure this isn't the case
+ for (int i = 0; i < VL_LOCK_SPINS; ++i) {
+ if (VL_LIKELY(m_mutex_locked)) break;
+ VL_CPU_RELAX();
+ m_mutex_locked = m_mutex.try_lock();
+ }
+ if (VL_UNCOVERABLE(!m_mutex_locked)) {
if (VL_UNCOVERABLE(m_jobsInProgress != 0)) {
// ThreadPool shouldn't be destroyed when jobs are running and mutex is locked,
// something is wrong. Most likely Verilator is exiting as a result of failed

View file

@ -1,35 +0,0 @@
commit 04512e5d0484f26b75cf7386facceb929fbf2536
Author: Nolan Poe <npgo22@gmail.com>
Date: Sat Mar 9 13:44:25 2024 -0800
Add custom version for verilator --version packaging (#4954)
diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS
index fa22f84fd..82e6160b6 100644
--- a/docs/CONTRIBUTORS
+++ b/docs/CONTRIBUTORS
@@ -136,6 +136,7 @@ Mostafa Gamal
Nandu Raj
Nathan Kohagen
Nathan Myers
+Nolan Poe
Oleh Maksymenko
Patrick Stewart
Paul Swirhun
diff --git a/src/config_rev b/src/config_rev
index 0640d85b1..bbbcf9b3f 100755
--- a/src/config_rev
+++ b/src/config_rev
@@ -22,7 +22,11 @@ Args = parser.parse_args()
os.chdir(Args.directory)
-rev = 'UNKNOWN_REV'
+if 'VERILATOR_SRC_VERSION' in os.environ:
+ rev = os.environ['VERILATOR_SRC_VERSION']
+else:
+ rev = 'UNKNOWN_REV'
+
data = os.popen('git describe').read()
match = re.search(r'^(v[0-9].*)', data)

View file

@ -1,15 +0,0 @@
diff --git a/test_regress/driver.pl b/test_regress/driver.pl
index 1e643ec83..7430a9c26 100755
--- a/test_regress/driver.pl
+++ b/test_regress/driver.pl
@@ -1254,8 +1254,8 @@ sub compile {
"TEST_OBJ_DIR=$self->{obj_dir}",
"CPPFLAGS_DRIVER=-D" . uc($self->{name}),
($self->{verbose} ? "CPPFLAGS_DRIVER2=-DTEST_VERBOSE=1" : ""),
- ($param{benchmark} ? "" : "OPT_FAST=-O0"),
- ($param{benchmark} ? "" : "OPT_GLOBAL=-O0"),
+ ($param{benchmark} ? "" : "OPT_FAST=-O1"),
+ ($param{benchmark} ? "" : "OPT_GLOBAL=-O1"),
"$self->{vm_prefix}", # bypass default rule, as we don't need archive
($param{make_flags} || ""),
]);

View file

@ -1,49 +0,0 @@
commit 08c76b1da6e132b1e91f82136a8647f71f774904
Author: Nolan Poe <npgo22@gmail.com>
Date: Fri Mar 15 19:21:08 2024 -0700
Fix GCC14 warnings on template specialization syntax (#4974) (#4975)
diff --git a/src/V3OptionParser.cpp b/src/V3OptionParser.cpp
index b1855c462..e0d7fbd04 100644
--- a/src/V3OptionParser.cpp
+++ b/src/V3OptionParser.cpp
@@ -114,16 +114,33 @@ V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbCall, void(void), m_cb(), en::NONE);
V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbFOnOff, void(bool), m_cb(!hasPrefixFNo(optp)),
en::FONOFF);
V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbOnOff, void(bool), m_cb(!hasPrefixNo(optp)), en::ONOFF);
-template <>
-V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbVal<int>, void(int), m_cb(std::atoi(argp)), en::VALUE);
-template <>
-V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbVal<const char*>, void(const char*), m_cb(argp),
- en::VALUE);
V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbPartialMatch, void(const char*), m_cb(optp), en::NONE,
true);
V3OPTION_PARSER_DEF_ACT_CB_CLASS(ActionCbPartialMatchVal, void(const char*, const char*),
m_cb(optp, argp), en::VALUE, true);
+template <>
+class V3OptionParser::Impl::ActionCbVal<int> final : public ActionBase<en::VALUE> {
+ std::function<void(int)> m_cb;
+
+public:
+ using CbType = std::function<void(int)>;
+ explicit ActionCbVal(CbType cb)
+ : m_cb(std::move(cb)) {}
+ void exec(const char* optp, const char* argp) override { m_cb(std::atoi(argp)); }
+};
+
+template <>
+class V3OptionParser::Impl::ActionCbVal<const char*> final : public ActionBase<en::VALUE> {
+ std::function<void(const char*)> m_cb;
+
+public:
+ using CbType = std::function<void(const char*)>;
+ explicit ActionCbVal(CbType cb)
+ : m_cb(std::move(cb)) {}
+ void exec(const char* optp, const char* argp) override { m_cb(argp); }
+};
+
#undef V3OPTION_PARSER_DEF_ACT_CB_CLASS
//######################################################################

3
README.packit Normal file
View file

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 1.11.0.post1.dev7+gfdcdf3a32.

184
changelog
View file

@ -1,184 +0,0 @@
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.226-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.226-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Sat Sep 24 2022 Filipe Rosset <rosset.filipe@gmail.com> - 4.226-1
- Update to 4.226, enabled tests, spec cleanup and modernization
- Fixes rhbz#1933296 rhbz#2047099 and rhbz#2026957
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.108-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.108-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.108-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.108-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jan 25 2021 Filipe Rosset <rosset.filipe@gmail.com> - 4.108-1
- Update to 4.108 fixes rhbz#1901487
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.032-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri Apr 24 2020 Filipe Rosset <rosset.filipe@gmail.com> - 4.032-1
- Update to 4.032
* Sun Feb 16 2020 Filipe Rosset <rosset.filipe@gmail.com> - 4.028-1
- Update to 4.028
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.026-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jan 22 2020 Filipe Rosset <rosset.filipe@gmail.com> - 4.026-1
- Update to 4.026 fixes rhbz#1747211
* Thu Aug 22 2019 Filipe Rosset <rosset.filipe@gmail.com> - 4.016-1
- Updated to 4.016 fixes rhbz#1590822 rhbz#1643479 and rhbz#1700228
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.922-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri May 03 2019 Scott Tsai scottt.tw@gmail.com - 3.922-5
- Remove duplicate copies of 'examples' in /usr/share/doc
- https://bugzilla.redhat.com/show_bug.cgi?id=1592057#c3
* Fri May 03 2019 Marcus Müller <marcus@hostalia.de> - 3.922-4
- Made %{_bindir}/verilator et al executable, fixes rhbz #1592057
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.922-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.922-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sun Mar 18 2018 Filipe Rosset <rosset.filipe@gmail.com> - 3.922-1
- 3.922 bump, fixes rhbz #1557720
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 3.920-2
- Escape macros in %%changelog
* Wed Feb 07 2018 Filipe Rosset <rosset.filipe@gmail.com> - 3.920-1
- 3.920 bump
- Disabled tests until upstream fixes the issue
- Added BR to fix EPEL7 build
- Fixes rhbz #1250122 and rhbz #1494887
* Fri Sep 08 2017 Petr Pisar <ppisar@redhat.com> - 3.910-1
- 3.910 bump
- License corrected to (LGPLv3 or Artistic 2.0)
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.890-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.890-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.890-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.890-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Nov 28 2016 Filipe Rosset <rosset.filipe@gmail.com> - 3.890-2
- Attempt to rebuilt on rawhide due dependency problems
* Mon Nov 28 2016 Filipe Rosset <rosset.filipe@gmail.com> - 3.890-1
- Rebuilt for new upstream version 3.890
- Spec clean up plus fixes rhbz #1087393 and rhbz #1358609
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.874-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.874-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Jun 07 2015 Scott Tsai <scottt.tw@gmail.com> - 3.874-1
- Upstream 3.874
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 3.864-2
- Rebuilt for GCC 5 C++11 ABI change
* Mon Sep 22 2014 Scott Tsai <scottt.tw@gmail.com> 3.864-1
- Upstream 3.864
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.862-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Fri Jun 13 2014 Scott Tsai <scottt.tw@gmail.com> 3.862-1
- Upstream 3.862
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.845-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.845-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sat Feb 16 2013 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.845-1
- updated to 3.845
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.805-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.805-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.805-4
- Rebuilt for c++ ABI breakage
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.805-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.805-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Nov 07 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.805-1
- updated to 3.805
* Sat Sep 25 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.804-1
- updated to 3.804
* Sun Jul 11 2010 Chitlesh Goorah <chitlesh [AT] fedoraproject DOT org> - 3.803-1
- updated to 3.803
* Fri Jul 24 2009 Lane Brooks <dirjud [AT] gmail DOT com> - 3.712-1
- Updated to verilator 3.712
* Fri Jun 26 2009 Lane Brooks <dirjud [AT] gmail DOT com> - 3.711-1
- Updated to verilator 3.711
- Added Artistic file
- Fixed permissions on man file
* Tue Jun 9 2009 Lane Brooks <dirjud [AT] gmail DOT com> - 3.710-1
- Updated to verilator 3.710
- Removed GCC 4.3 patch (no longer necessary)
- Added SYSTEMPERL_INCLUDE to point to perl-SystemPerl rpm install location
* Fri Jan 9 2009 Lane Brooks <dirjud [AT] gmail DOT com> - 3.700-1
- Updated dependancy to newly packaged perl-SystemPerl and removed patch
- Updated to verilator 3.700
- Added GCC 4.3 patch
* Fri Jan 2 2009 Lane Brooks <dirjud [AT] gmail DOT com> - 3.681-2
- Moved examples from data dir to doc dir
* Thu Jan 1 2009 Lane Brooks <dirjud [AT] gmail DOT com> - 3.681-1
- Updated verilator 3.681
- Removed gcc 4.3 patch as verilator 3.681 incorporates this fix
- Removed shared object patch as it is possible to do this from Makefile
using environment variables
- Further updates to the spec file per Chitlesh's feedback
* Sun Oct 26 2008 Lane Brooks <dirjud [AT] gmail DOT com> - 3.680-3
- Improved spec file for Fedora integration based on initial feedback
* Thu Oct 23 2008 Lane Brooks <dirjud [AT] gmail DOT com> - 3.680-2
- Added shared object generation patch
* Thu Oct 16 2008 Lane Brooks <dirjud [AT] gmail DOT com> - 3.680-1
- Initial package based on SUSE packages from Guenter Dannoritzer <dannoritzer{%%}web{*}de>

7
gating.yaml Normal file
View file

@ -0,0 +1,7 @@
--- !Policy
product_versions:
- fedora-*
decision_contexts: [bodhi_update_push_testing, bodhi_update_push_stable]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

25
packit.yaml Normal file
View file

@ -0,0 +1,25 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/
upstream_project_url: https://github.com/verilator/verilator.git
upstream_tag_template: v{version}
jobs:
# https://packit.dev/docs/configuration/downstream/pull_from_upstream
# TODO make sure Monitoring status on the left side at https://src.fedoraproject.org/rpms/<your-package> is set to Monitoring
- job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-all
# https://packit.dev/docs/configuration/downstream/koji_build
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-all
# https://packit.dev/docs/configuration/downstream/bodhi_update
- job: bodhi_update
trigger: commit
dist_git_branches:
- fedora-branched

10
plans/main.fmf Normal file
View file

@ -0,0 +1,10 @@
discover:
how: fmf
execute:
how: tmt
/basic:
summary:
Basic functionality
discover+:
filter: "tier:0"

View file

@ -1 +1 @@
SHA512 (verilator-5.022.tar.gz) = 5b919ed5d4cf863434f10f39bbb3a5155d63f79765f5f1d5ae543023b0e350e0996507d250fbfb2e5129bbdf9a51cc5fd0b7154962747c89435648897525bc84
SHA512 (verilator-5.040.tar.gz) = 3997791963305f4556a8f3b87e050eba5ad9952c0eb041c5ac981276ef385219e5c162a01e1ec966e5e814a334caa4e92f8e939e9cfbc068b30935f5ee6e9804

View file

@ -0,0 +1,6 @@
module example (
input bit a_i,
output bit b_o
);
assign b_o = a_i;
endmodule

View file

@ -0,0 +1,2 @@
summary: Basic lint test
tag: basic

8
tests/basic/lint/test.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartTest
rlRun "verilator --lint-only -Wall example.sv"
rlPhaseEnd
rlJournalEnd

1
tests/basic/main.fmf Normal file
View file

@ -0,0 +1 @@
tier: 0

View file

@ -0,0 +1,2 @@
summary: Basic smoke test
tag: basic

8
tests/basic/smoke/test.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
. /usr/share/beakerlib/beakerlib.sh || exit 1
rlJournalStart
rlPhaseStartTest
rlRun "verilator --version"
rlPhaseEnd
rlJournalEnd

4
tests/main.fmf Normal file
View file

@ -0,0 +1,4 @@
test: ./test.sh
framework: beakerlib
require: verilator
tier: 1

View file

@ -1,39 +1,36 @@
# Blocked by perl-parallel-forker not being packaged
# https://bugzilla.redhat.com/show_bug.cgi?id=2268659
# Universal build flags
%bcond longtests 0
# Warnings in <F40 fails build
%if 0%{?fedora} <= 39
%ifarch ppc64le
%bcond ccwarn 0
%endif
# Only enable extended warnings on supported platforms
%ifarch x86_64 aarch64
%bcond ccwarn 1
%else
%bcond ccwarn 1
%bcond ccwarn 0
%endif
# tcmalloc and z3 are not available on EL
%if 0%{?rhel}%{?centos}
%bcond tcmalloc 0
%bcond z3 0
%else
%bcond tcmalloc 1
%bcond z3 1
%endif
# These are offered by the build, but there's no real demand to include them.
%bcond ccache 0
%bcond mold 0
Name: verilator
Version: 5.022
Version: 5.040
Release: %autorelease
Summary: A fast simulator for synthesizable Verilog
License: LGPL-3.0-only OR Artistic-2.0
URL: https://veripool.org/verilator/
Source0: https://github.com/verilator/verilator/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
Source: https://github.com/verilator/verilator/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz
# Backported from upstream to fix building
Patch0: 0001-fix-try-lock-spuriously-fails.patch
# Accepted upstream through GitHub, awaiting release
Patch1: 0002-Allow-for-custom-verilator-revision-in-version-check.patch
# Undesirable upstream, fixes warnings with FORTIFY_SOURCE
Patch2: 0003-Enable-optimization-in-tests.patch
# Accepted upstream through GitHub, awaiting release
Patch3: 0004-Fix-GCC14-warnings-on-template-specialization-syntax.patch
# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
BuildRequires: autoconf
BuildRequires: bison
@ -59,6 +56,7 @@ BuildRequires: perl(strict)
BuildRequires: perl(Time::HiRes)
BuildRequires: perl(vars)
BuildRequires: python3-devel
BuildRequires: python3-distro
BuildRequires: sed
%if %{with tcmalloc}
BuildRequires: gperftools-libs
@ -66,14 +64,23 @@ BuildRequires: gperftools-devel
%endif
%if %{with mold}
Requires: mold
BuildRequires: mold
%endif
%if %{with ccache}
Requires: ccache
BuildRequires: ccache
%endif
%if %{with z3}
Requires: z3
BuildRequires: z3
%endif
# required for further tests
BuildRequires: gdb
# devel is required to run verilator at all
Requires: %{name}-devel = %{version}-%{release}
%description
Verilator is the fastest free Verilog HDL simulator. It compiles
synthesizable Verilog, plus some PSL, SystemVerilog and Synthesis
@ -106,7 +113,7 @@ export VERILATOR_ROOT=%{_datadir}
autoconf
%configure \
--disable-partial-static \
--enable-defenv \
--disable-defenv \
%if %{with ccwarn}
--enable-ccwarn \
%else
@ -118,7 +125,7 @@ autoconf
--disable-longtests
%endif
# We cannot run autoreconf because upstream uses unqualifed stdlib identifiers
# We cannot run autoreconf because upstream uses unqualified stdlib identifiers
# that are included by autoconf-generated header files.
find -name Makefile_obj -exec sed -i \
-e 's|^\(COPT = .*\)|\1 %{optflags}|' \
@ -129,7 +136,12 @@ find -name Makefile_obj -exec sed -i \
sed -i 's#/usr/bin/env python3#/usr/bin/python3#g' docs/bin/*
%build
%if 0%{?rhel}%{?centos}
export VERILATOR_SRC_VERSION=epel-%{version}
%else
export VERILATOR_SRC_VERSION=fedora-%{version}
%endif
%make_build
%install
@ -144,8 +156,15 @@ mv %{buildroot}%{_datadir}/pkgconfig/verilator.pc %{buildroot}%{_libdir}/pkgconf
rm -rf %{buildroot}%{_datadir}/verilator/examples
rm -rf %{buildroot}%{_datadir}/verilator/tests
# The "tests" are all integration tests.
# They also define their own build flags,
# and fail if they are set to anything else.
%undefine _auto_set_build_flags
%check
make test
make test
%files