Page MenuHomeFreeBSD

D51827.id160057.diff
No OneTemporary

D51827.id160057.diff

diff --git a/share/mk/bsd.mkopt.mk b/share/mk/bsd.mkopt.mk
--- a/share/mk/bsd.mkopt.mk
+++ b/share/mk/bsd.mkopt.mk
@@ -42,6 +42,12 @@
# always += this variable.
#
+__ALL_OPTIONS:= \
+ ${__DEFAULT_NO_OPTIONS} \
+ ${__DEFAULT_YES_OPTIONS} \
+ ${__REQUIRED_OPTIONS} \
+ ${__DEFAULT_DEPENDENT_OPTIONS:H}
+
#
# MK_* options which default to "yes".
#
@@ -144,3 +150,19 @@
MK_${vv:H}:= ${MK_${vv:H}}
.endfor
.undef __DEFAULT_DEPENDENT_OPTIONS
+
+#
+# Define SRC_OPT_DEFS and SRC_OPT_LIST
+#
+SRC_OPT_DEFS?=-D__${MACHINE_ARCH}__
+SRC_OPT_LIST?=TARGET=${MACHINE} TARGET_ARCH=${MACHINE_ARCH}
+.for option in ${__ALL_OPTIONS}
+.if ${MK_${option}} == yes
+SRC_OPT_DEFS+=-D${option}
+SRC_OPT_LIST+=WITH_${option}=1
+.else
+SRC_OPT_DEFS+=-U${option}
+SRC_OPT_LIST+=WITHOUT_${option}=1
+.endif
+.endfor
+.undef __ALL_OPTIONS
diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk
--- a/share/mk/src.opts.mk
+++ b/share/mk/src.opts.mk
@@ -296,9 +296,9 @@
.include <bsd.compiler.mk>
.if ${__T} == "i386" || ${__T} == "amd64"
-__DEFAULT_NO_OPTIONS += FDT
+__DEFAULT_NO_OPTIONS+= FDT
.else
-__DEFAULT_YES_OPTIONS += FDT
+__DEFAULT_YES_OPTIONS+= FDT
.endif
.if ${__T:Marm*} == "" && ${__T:Mriscv64*} == ""
@@ -519,8 +519,4 @@
.endif
.endfor
-#
-# Set defaults for the MK_*_SUPPORT variables.
-#
-
.endif # !target(__<src.opts.mk>__)

File Metadata

Mime Type
text/plain
Expires
Wed, May 20, 1:12 AM (12 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33332935
Default Alt Text
D51827.id160057.diff (1 KB)

Event Timeline