aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2017-10-10 08:07:05 +0000
committerEnji Cooper <ngie@FreeBSD.org>2017-10-10 08:07:05 +0000
commit98be9985919bdccfaaaec80febec2e34acb5e8c3 (patch)
treec0ab92716bcfcc5bd0993c0194fb5200e6b274ed
parent77e4ea3b9196f76bbebc6fa3535eb6ad7ff39eea (diff)
Add appropriate safety belts for riscv so it compiles out of the box when MK_COVERAGE ==yes
Notes
svn path=/projects/runtime-coverage/; revision=324486
-rw-r--r--Makefile2
-rw-r--r--share/mk/src.opts.mk6
2 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b486c23bef3c..fa277fbe98e8 100644
--- a/Makefile
+++ b/Makefile
@@ -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.
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
index 7f2087281a59..b7a53518aaeb 100644
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -240,6 +240,7 @@ BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB
.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