2014-05-17 01:47:06 +00:00
|
|
|
|
2014-05-17 20:31:34 +00:00
|
|
|
# Note: This file is also duplicated in the sys/conf/kern.pre.mk so
|
|
|
|
# it will always grab SRCCONF, even if it isn't being built in-tree
|
|
|
|
# to preserve historical (and useful) behavior. Changes here need to
|
|
|
|
# be reflected there so SRCCONF isn't included multiple times.
|
|
|
|
|
2015-12-01 20:56:16 +00:00
|
|
|
.if !defined(_WITHOUT_SRCCONF)
|
2014-05-17 01:47:06 +00:00
|
|
|
# Allow user to configure things that only effect src tree builds.
|
|
|
|
SRCCONF?= /etc/src.conf
|
2016-04-22 20:31:29 +00:00
|
|
|
.if !empty(SRCCONF) && \
|
|
|
|
(exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && \
|
|
|
|
!target(_srcconf_included_)
|
2015-09-17 21:49:29 +00:00
|
|
|
|
|
|
|
# Validate that the user didn't try setting an env-only variable in
|
|
|
|
# their src.conf. This benefits from already including bsd.mkopt.mk.
|
2017-11-02 18:09:07 +00:00
|
|
|
.for var in ${__ENV_ONLY_OPTIONS:O:u}
|
2015-09-17 21:49:29 +00:00
|
|
|
__presrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno:Dyes}
|
|
|
|
.endfor
|
|
|
|
|
2015-05-30 15:08:52 +00:00
|
|
|
.sinclude "${SRCCONF}"
|
2014-07-28 23:36:21 +00:00
|
|
|
_srcconf_included_: .NOTMAIN
|
2015-09-17 21:49:29 +00:00
|
|
|
|
|
|
|
# Validate the env-only variables.
|
2017-11-02 18:09:07 +00:00
|
|
|
.for var in ${__ENV_ONLY_OPTIONS:O:u}
|
2015-09-17 21:49:29 +00:00
|
|
|
__postrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno:Dyes}
|
|
|
|
.if ${__presrcconf_${var}} != ${__postrcconf_${var}}
|
2015-09-17 21:51:48 +00:00
|
|
|
.error Option ${var} may only be defined in ${SRC_ENV_CONF}, environment, or make argument, not ${SRCCONF}.
|
2014-05-17 01:47:06 +00:00
|
|
|
.endif
|
2015-09-17 21:49:29 +00:00
|
|
|
.undef __presrcconf_${var}
|
|
|
|
.undef __postrcconf_${var}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.endif # SRCCONF
|
2015-12-01 20:56:16 +00:00
|
|
|
.endif
|
2015-06-19 14:56:24 +00:00
|
|
|
|
2020-04-07 17:04:24 +00:00
|
|
|
# The following should be removed no earlier than LLVM11 being imported into the
|
|
|
|
# tree, to ensure we don't regress the build. LLVM11 and GCC10 will switch the
|
|
|
|
# default over to -fno-common, making this redundant.
|
2020-04-10 14:01:07 +00:00
|
|
|
CFCOMMONFLAG?= -fno-common
|
|
|
|
CFLAGS+= ${CFCOMMONFLAG}
|
2020-04-07 17:04:24 +00:00
|
|
|
|
2020-09-18 17:17:46 +00:00
|
|
|
DEFAULTWARNS= 6
|
|
|
|
|
2015-06-13 19:20:56 +00:00
|
|
|
# tempting, but bsd.compiler.mk causes problems this early
|
2015-06-19 14:56:24 +00:00
|
|
|
# probably need to remove dependence on bsd.own.mk
|
2015-06-13 19:20:56 +00:00
|
|
|
#.include "src.opts.mk"
|