此页面(来自 Arnim Läuger,2005 年)解释说工具链 {GHDL + gcov} 可以执行 VHDL 代码覆盖。
问题:它是否仍然适用于最新版本的 GCC、GCOV 和 GHDL?
以下命令失败
$ ghdl -a -Wc,-ftest-coverage -Wc,-fprofile-arcs tb_example.vhd
ghdl: unknown option '-Wc,-ftest-coverage' for command '-a'
我的设置如下:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gnat/bin/../libexec/gcc/x86_64-pc-linux-gnu/4.9.4/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../src/configure --enable-languages=ada,c,c++ --enable-dual-exceptions --enable-_cxa_atexit --enable-threads=posix --with-bugurl=URL:mailto:report@adacore.com --disable-nls --without-libiconv-prefix --disable-libstdcxx-pch --disable-libada --enable-checking=release --disable-multilib --with-mpfr=/boron.a/gnatmail/sandbox/gpl-2016/x86_64-linux/mpfr_stable/install --with-gmp=/boron.a/gnatmail/sandbox/gpl-2016/x86_64-linux/gmp_stable/install --with-mpc=/boron.a/gnatmail/sandbox/gpl-2016/x86_64-linux/mpc_stable/install --with-build-time-tools=/boron.a/gnatmail/sandbox/gpl-2016/x86_64-linux/gcc/build/buildtools/bin --prefix=/boron.a/gnatmail/sandbox/gpl-2016/x86_64-linux/gcc/pkg --build=x86_64-pc-linux-gnu
Thread model: posix
gcc version 4.9.4 20160426 (for GNAT GPL 2016 20160515) (GCC)
$ gcov -v
gcov (GCC) 4.9.4 20160426 (for GNAT GPL 2016 20160515)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
$ ghdl -v
GHDL 0.34dev (20151126) [Dunoon edition]
Compiled with GNAT Version: GPL 2016 (20160515-49)
mcode code generator
Written by Tristan Gingold.
Copyright (C) 2003 - 2015 Tristan Gingold.
GHDL is free software, covered by the GNU General Public License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cat /proc/version
Linux version 4.4.0-34-generic (buildd@lgw01-20) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) ) #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016
我使用Building with mcode 后端程序安装了 GHDL。莫非是万恶之源?
感谢帮助!