Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.sys.mk
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | |||||
# Don't use -Wstack-protector as it breaks world with -Werror. | # Don't use -Wstack-protector as it breaks world with -Werror. | ||||
SSP_CFLAGS?= -fstack-protector-strong | SSP_CFLAGS?= -fstack-protector-strong | ||||
.else | .else | ||||
SSP_CFLAGS?= -fstack-protector | SSP_CFLAGS?= -fstack-protector | ||||
.endif | .endif | ||||
CFLAGS+= ${SSP_CFLAGS} | CFLAGS+= ${SSP_CFLAGS} | ||||
.endif # SSP && !ARM && !MIPS | .endif # SSP && !ARM && !MIPS | ||||
.if ${MK_ASAN} != "no" && ${MK_SSP} != "no" && ${SSP_CFLAGS} != "" && \ | |||||
(!defined(NO_SHARED) || ${NO_SHARED} == "no" || ${NO_SHARED} == "NO") | |||||
ASANFLAGS?= -fsanitize=address | |||||
CFLAGS+= ${ASANFLAGS} | |||||
CXXFLAGS+= ${ASANFLAGS} | |||||
LDFLAGS+= ${ASANFLAGS} | |||||
LD_NO_UNDEF= | |||||
.else | |||||
LD_NO_UNDEF= -Wl,--no-undefined | |||||
.endif | |||||
# Allow user-specified additional warning flags, plus compiler specific flag overrides. | # Allow user-specified additional warning flags, plus compiler specific flag overrides. | ||||
# Unless we've overriden this... | # Unless we've overriden this... | ||||
.if ${MK_WARNS} != "no" | .if ${MK_WARNS} != "no" | ||||
CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${COMPILER_TYPE}} | CFLAGS+= ${CWARNFLAGS} ${CWARNFLAGS.${COMPILER_TYPE}} | ||||
.endif | .endif | ||||
CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} | CFLAGS+= ${CFLAGS.${COMPILER_TYPE}} | ||||
CXXFLAGS+= ${CXXFLAGS.${COMPILER_TYPE}} | CXXFLAGS+= ${CXXFLAGS.${COMPILER_TYPE}} | ||||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |