In order for external toolchains to work with --coverage, libgcov.a needs to be present. This isn't the case for amd64 and riscv64.
A commit references this bug: Author: ngie Date: Sun Oct 22 21:39:58 UTC 2017 New revision: 324874 URL: https://svnweb.freebsd.org/changeset/base/324874 Log: Remove BROKEN_OPTIONS/MK_COVERAGE=no for gcc cross-toolchain reliant archs The cross-toolchain gcc toolchains aren't installing libgcov.a, but the host toolchain variants are. Don't hack around broken packages in the base system. PR: 223174 Changes: projects/runtime-coverage/share/mk/src.opts.mk
A commit references this bug: Author: ngie Date: Sun Oct 22 22:05:37 UTC 2017 New revision: 324875 URL: https://svnweb.freebsd.org/changeset/base/324875 Log: Disable MK_COVERAGE in Makefile.inc1 when working with broken gcc packages It makes more sense to do this in the top-level Makefile, instead of down in src.opts.mk . PR: 223174 Changes: projects/runtime-coverage/Makefile.inc1
lwhsu@ maintains devel/riscv64-gcc -- giving bug to him.
Hi Enji, Is this bug still relevant? If not, I'd like to close it. FWIW I don't see libgcov.a included as part of any of the amd64 gcc ports. Mitchell
This has lapsed. If the runtime-coverage work resumes, a new bug should be opened against devel/freebsd-gcc, which is the preferred GCC cross-toolchain these days.