From d722d851d9ad311c1807d269a75df110a608c2ff Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Thu, 16 Apr 2020 22:01:33 +0100 Subject: [PATCH] verilator_config.vlt: Hopefully suppress deprecation warnings for 4.026 --- builds/Resources/Include_verilator.mk | 6 ++++++ builds/Resources/Verilator_resources/verilator_config.vlt | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/builds/Resources/Include_verilator.mk b/builds/Resources/Include_verilator.mk index 3a76abb..4845f6e 100644 --- a/builds/Resources/Include_verilator.mk +++ b/builds/Resources/Include_verilator.mk @@ -50,6 +50,12 @@ SIM_EXE_FILE = exe_HW_sim VERILATOR_FLAGS = --stats --x-assign fast --x-initial fast --noassert # VERILATOR_FLAGS = --stats -O3 -CFLAGS -O3 -LDFLAGS -static --x-assign fast --x-initial fast --noassert +# XXX: Allow lint_off DEPRECATED for older Verilator versions. +# This was added around the same time as -msg was deprecated, so we need +# to suppress the deprecation messages without breaking older versions. +# See verilator_config.vlt. Remove once 4.026 can be relied upon. +VERILATOR_FLAGS += -Wfuture-DEPRECATED + # Verilator flags: use the following to include code to generate VCDs # Select trace-depth according to your module hierarchy # VERILATOR_FLAGS += --trace --trace-depth 2 -CFLAGS -DVM_TRACE diff --git a/builds/Resources/Verilator_resources/verilator_config.vlt b/builds/Resources/Verilator_resources/verilator_config.vlt index c0e8c0e..81ad329 100644 --- a/builds/Resources/Verilator_resources/verilator_config.vlt +++ b/builds/Resources/Verilator_resources/verilator_config.vlt @@ -2,6 +2,12 @@ // Flags for verilator +// -msg is deprecated in 4.026 (Jan 2020) and replaced by -rule. Use -msg and +// ignore deprecation warnings until we can rely on -rule support. We also rely +// on -Wfuture-DEPRECATED since that warning category didn't even exist prior +// to 4.026. For some reason this needs to be in a pragma comment rather than +// in `verilator_config for -Wfuture-DEPRECATED to affect it. +// verilator lint_off DEPRECATED `verilator_config lint_off -msg WIDTH lint_off -msg CASEINCOMPLETE @@ -10,3 +16,4 @@ lint_off -msg INITIALDLY lint_off -msg UNSIGNED lint_off -msg CMPCONST `verilog +// verilator lint_on DEPRECATED