Only enable trace-cmp on Clang and modern GCC.
It's was only added to GCC 8.1 so don't try to enable it for earlier releases. Reported by: lwhsu Sponsored by: DARPA, AFRL
This commit is contained in:
parent
ebadf79ae6
commit
bf60d6d3e9
@ -3808,7 +3808,7 @@ kern/kern_idle.c standard
|
||||
kern/kern_intr.c standard
|
||||
kern/kern_jail.c standard
|
||||
kern/kern_kcov.c optional kcov \
|
||||
compile-with "${NORMAL_C} -fno-sanitize-coverage=trace-pc,trace-cmp"
|
||||
compile-with "${NORMAL_C} -fno-sanitize=all"
|
||||
kern/kern_khelp.c standard
|
||||
kern/kern_kthread.c standard
|
||||
kern/kern_ktr.c optional ktr
|
||||
|
@ -120,7 +120,12 @@ SAN_CFLAGS+= -fsanitize=undefined
|
||||
|
||||
COVERAGE_ENABLED!= grep COVERAGE opt_global.h || true ; echo
|
||||
.if !empty(COVERAGE_ENABLED)
|
||||
.if ${COMPILER_TYPE} == "clang" || \
|
||||
(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 80100)
|
||||
SAN_CFLAGS+= -fsanitize-coverage=trace-pc,trace-cmp
|
||||
.else
|
||||
SAN_CFLAGS+= -fsanitize-coverage=trace-pc
|
||||
.endif
|
||||
.endif
|
||||
|
||||
CFLAGS+= ${SAN_CFLAGS}
|
||||
|
Loading…
Reference in New Issue
Block a user