Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.sys.mk
| Show First 20 Lines • Show All 315 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. | ||||
| .if ${COMPILER_FEATURES:Mstackclash} | .if ${COMPILER_FEATURES:Mstackclash} | ||||
| SSP_CFLAGS?= -fstack-protector-strong -fstack-clash-protection | SSP_CFLAGS?= -fstack-protector-strong -fstack-clash-protection | ||||
| .else | .else | ||||
| SSP_CFLAGS?= -fstack-protector-strong | SSP_CFLAGS?= -fstack-protector-strong | ||||
| .endif | .endif | ||||
| CFLAGS+= ${SSP_CFLAGS} | CFLAGS+= ${SSP_CFLAGS} | ||||
| .endif # SSP | .endif # SSP | ||||
| .if ${FORTIFY_SOURCE} > 0 | |||||
| CFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE} | .if empty(CFLAGS:M-D_FORTIFY_SOURCE*) | ||||
| CXXFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE} | CFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE.${.IMPSRC:T}:U${FORTIFY_SOURCE}} | ||||
| .endif | |||||
| .if empty(CXXFLAGS:M-D_FORTIFY_SOURCE*) | |||||
| CXXFLAGS+= -D_FORTIFY_SOURCE=${FORTIFY_SOURCE.${.IMPSRC:T}:U${FORTIFY_SOURCE}} | |||||
| .endif | .endif | ||||
| # Additional flags passed in CFLAGS and CXXFLAGS when MK_DEBUG_FILES is | # Additional flags passed in CFLAGS and CXXFLAGS when MK_DEBUG_FILES is | ||||
| # enabled. | # enabled. | ||||
| DEBUG_FILES_CFLAGS?= -g -gz=zlib | DEBUG_FILES_CFLAGS?= -g -gz=zlib | ||||
| # Allow user-specified additional warning flags, plus compiler and file | # Allow user-specified additional warning flags, plus compiler and file | ||||
| # specific flag overrides, unless we've overridden this... | # specific flag overrides, unless we've overridden this... | ||||
| ▲ Show 20 Lines • Show All 207 Lines • Show Last 20 Lines | |||||