Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Oct 2017 08:07:05 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r324486 - in projects/runtime-coverage: . share/mk
Message-ID:  <201710100807.v9A875QC057653@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Tue Oct 10 08:07:05 2017
New Revision: 324486
URL: https://svnweb.freebsd.org/changeset/base/324486

Log:
  Add appropriate safety belts for riscv so it compiles out of the box when MK_COVERAGE ==yes

Modified:
  projects/runtime-coverage/Makefile
  projects/runtime-coverage/share/mk/src.opts.mk

Modified: projects/runtime-coverage/Makefile
==============================================================================
--- projects/runtime-coverage/Makefile	Tue Oct 10 07:42:36 2017	(r324485)
+++ projects/runtime-coverage/Makefile	Tue Oct 10 08:07:05 2017	(r324486)
@@ -444,7 +444,7 @@ TARGET_ARCHES_riscv?=	riscv64 riscv64sf
 TARGET_ARCHES_${target}?= ${target}
 .endfor
 
-MAKE_PARAMS_riscv?=	CROSS_TOOLCHAIN=riscv64-gcc
+MAKE_PARAMS_riscv?=	CROSS_TOOLCHAIN=riscv64-gcc MK_COVERAGE=no
 
 # XXX Remove architectures only supported by external toolchain from universe
 # if required toolchain packages are missing.

Modified: projects/runtime-coverage/share/mk/src.opts.mk
==============================================================================
--- projects/runtime-coverage/share/mk/src.opts.mk	Tue Oct 10 07:42:36 2017	(r324485)
+++ projects/runtime-coverage/share/mk/src.opts.mk	Tue Oct 10 08:07:05 2017	(r324486)
@@ -240,6 +240,7 @@ BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BO
 .endif
 .if ${__T:Mriscv*} != ""
 BROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V"
+BROKEN_OPTIONS+=COVERAGE # External toolchain (GNU-based) doesn't have libgcov.a .
 BROKEN_OPTIONS+=TESTS   # "undefined reference to `_Unwind_Resume'"
 BROKEN_OPTIONS+=CXX     # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'"
 .endif
@@ -410,6 +411,7 @@ MK_GCC_BOOTSTRAP:= no
 .if ${MK_TOOLCHAIN} == "no"
 MK_BINUTILS:=	no
 MK_CLANG:=	no
+MK_COVERAGE:=	no
 MK_GCC:=	no
 MK_GDB:=	no
 MK_INCLUDES:=	no
@@ -467,13 +469,15 @@ MK_${var}_SUPPORT:= yes
 MK_LLDB:=	no
 .endif
 
+.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800
+# Cross-toolchains unfortunately don't install libgcov.a .
+MK_COVERAGE:=no
 # gcc 4.8 and newer supports libc++, so suppress gnuc++ in that case.
 # while in theory we could build it with that, we don't want to do
 # that since it creates too much confusion for too little gain.
 # XXX: This is incomplete and needs X_COMPILER_TYPE/VERSION checks too
 #      to prevent Makefile.inc1 from bootstrapping unneeded dependencies
 #      and to support 'make delete-old' when supplying an external toolchain.
-.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800
 MK_GNUCXX:=no
 MK_GCC:=no
 .endif



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710100807.v9A875QC057653>