Changeset View
Changeset View
Standalone View
Standalone View
sys/conf/kern.pre.mk
Show First 20 Lines • Show All 140 Lines • ▼ Show 20 Lines | |||||
GCOV_ENABLED!= grep GCOV opt_global.h || true ; echo | GCOV_ENABLED!= grep GCOV opt_global.h || true ; echo | ||||
.if !empty(GCOV_ENABLED) | .if !empty(GCOV_ENABLED) | ||||
.if ${COMPILER_TYPE} == "gcc" | .if ${COMPILER_TYPE} == "gcc" | ||||
GCOV_CFLAGS+= -fprofile-arcs -ftest-coverage | GCOV_CFLAGS+= -fprofile-arcs -ftest-coverage | ||||
.endif | .endif | ||||
.endif | .endif | ||||
AUTO_VAR_INIT_ENABLED!= grep AUTO_VAR_INIT opt_global.h || true ; echo | |||||
emaste: At some point we need a better way to handle this for all such options | |||||
.if !empty(AUTO_VAR_INIT_ENABLED) | |||||
.if ${COMPILER_TYPE} == "clang" | |||||
CFLAGS+= -ftrivial-auto-var-init=pattern | |||||
MOD_CFLAGS+= -ftrivial-auto-var-init=pattern | |||||
.else | |||||
.warning AUTO_VAR_INIT enabled, but no compiler support | |||||
CFLAGS+= -DAUTO_VAR_INIT_MISSING | |||||
.endif | |||||
.endif | |||||
CFLAGS+= ${GCOV_CFLAGS} | CFLAGS+= ${GCOV_CFLAGS} | ||||
# Put configuration-specific C flags last (except for ${PROF}) so that they | # Put configuration-specific C flags last (except for ${PROF}) so that they | ||||
# can override the others. | # can override the others. | ||||
CFLAGS+= ${CONF_CFLAGS} | CFLAGS+= ${CONF_CFLAGS} | ||||
.if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} | .if defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mbuild-id} | ||||
LDFLAGS+= --build-id=sha1 | LDFLAGS+= --build-id=sha1 | ||||
▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines |
At some point we need a better way to handle this for all such options