The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/conf/kern.opts.mk

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 # $FreeBSD: releng/12.0/sys/conf/kern.opts.mk 338643 2018-09-13 14:52:59Z emaste $
    2 
    3 # Options set in the build system that affect the kernel somehow.
    4 
    5 #
    6 # Define MK_* variables (which are either "yes" or "no") for users
    7 # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the
    8 # make(1) environment.
    9 # These should be tested with `== "no"' or `!= "no"' in makefiles.
   10 # The NO_* variables should only be set by makefiles for variables
   11 # that haven't been converted over.
   12 #
   13 
   14 # Note: bsd.own.mk must be included before the rest of kern.opts.mk to make
   15 # building on 10.x and earlier work. This should be removed when that's no
   16 # longer supported since it confounds the defaults (since it uses the host's
   17 # notion of defaults rather than what's default in current when building
   18 # within sys/modules).
   19 .include <bsd.own.mk>
   20 
   21 # These options are used by the kernel build process (kern.mk and kmod.mk)
   22 # They have to be listed here so we can build modules outside of the
   23 # src tree.
   24 
   25 __DEFAULT_YES_OPTIONS = \
   26     AUTOFS \
   27     BHYVE \
   28     BLUETOOTH \
   29     CCD \
   30     CDDL \
   31     CRYPT \
   32     CUSE \
   33     EFI \
   34     FORMAT_EXTENSIONS \
   35     INET \
   36     INET6 \
   37     IPFILTER \
   38     IPSEC_SUPPORT \
   39     ISCSI \
   40     KERNEL_SYMBOLS \
   41     MODULE_DRM \
   42     MODULE_DRM2 \
   43     NETGRAPH \
   44     PF \
   45     REPRODUCIBLE_BUILD \
   46     SOURCELESS_HOST \
   47     SOURCELESS_UCODE \
   48     TESTS \
   49     USB_GADGET_EXAMPLES \
   50     ZFS
   51 
   52 __DEFAULT_NO_OPTIONS = \
   53     EXTRA_TCP_STACKS \
   54     KERNEL_RETPOLINE \
   55     NAND \
   56     OFED \
   57     RATELIMIT
   58 
   59 # Some options are totally broken on some architectures. We disable
   60 # them. If you need to enable them on an experimental basis, you
   61 # must change this code.
   62 # Note: These only apply to the list of modules we build by default
   63 # and sometimes what is in the opt_*.h files by default.
   64 # Kernel config files are unaffected, though some targets can be
   65 # affected by KERNEL_SYMBOLS, FORMAT_EXTENSIONS, CTF and SSP.
   66 
   67 # Things that don't work based on the CPU
   68 .if ${MACHINE_CPUARCH} == "arm"
   69 . if ${MACHINE_ARCH:Marmv[67]*} == ""
   70 BROKEN_OPTIONS+= CDDL ZFS
   71 . endif
   72 .endif
   73 
   74 .if ${MACHINE_CPUARCH} == "mips"
   75 BROKEN_OPTIONS+= CDDL ZFS SSP
   76 .endif
   77 
   78 .if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} == "powerpc"
   79 BROKEN_OPTIONS+= ZFS
   80 .endif
   81 
   82 .if ${MACHINE_CPUARCH} == "riscv"
   83 BROKEN_OPTIONS+= FORMAT_EXTENSIONS
   84 .endif
   85 
   86 # Things that don't work because the kernel doesn't have the support
   87 # for them.
   88 .if ${MACHINE} != "i386" && ${MACHINE} != "amd64"
   89 BROKEN_OPTIONS+= OFED
   90 .endif
   91 
   92 # Things that don't work based on toolchain support.
   93 .if ${MACHINE} != "i386" && ${MACHINE} != "amd64"
   94 BROKEN_OPTIONS+= KERNEL_RETPOLINE
   95 .endif
   96 
   97 # EFI doesn't exist on mips, powerpc, sparc or riscv.
   98 .if ${MACHINE:Mmips} || ${MACHINE:Mpowerpc} || ${MACHINE:Msparc64} || ${MACHINE:Mriscv}
   99 BROKEN_OPTIONS+=EFI
  100 .endif
  101 
  102 # expanded inline from bsd.mkopt.mk to avoid share/mk dependency
  103 
  104 # Those that default to yes
  105 .for var in ${__DEFAULT_YES_OPTIONS}
  106 .if !defined(MK_${var})
  107 .if defined(WITHOUT_${var})                     # WITHOUT always wins
  108 MK_${var}:=     no
  109 .else
  110 MK_${var}:=     yes
  111 .endif
  112 .else
  113 .if ${MK_${var}} != "yes" && ${MK_${var}} != "no"
  114 .error "Illegal value for MK_${var}: ${MK_${var}}"
  115 .endif
  116 .endif # !defined(MK_${var})
  117 .endfor
  118 .undef __DEFAULT_YES_OPTIONS
  119 
  120 # Those that default to no
  121 .for var in ${__DEFAULT_NO_OPTIONS}
  122 .if !defined(MK_${var})
  123 .if defined(WITH_${var}) && !defined(WITHOUT_${var}) # WITHOUT always wins
  124 MK_${var}:=     yes
  125 .else
  126 MK_${var}:=     no
  127 .endif
  128 .else
  129 .if ${MK_${var}} != "yes" && ${MK_${var}} != "no"
  130 .error "Illegal value for MK_${var}: ${MK_${var}}"
  131 .endif
  132 .endif # !defined(MK_${var})
  133 .endfor
  134 .undef __DEFAULT_NO_OPTIONS
  135 
  136 #
  137 # MK_* options which are always no, usually because they are
  138 # unsupported/badly broken on this architecture.
  139 #
  140 .for var in ${BROKEN_OPTIONS}
  141 MK_${var}:=     no
  142 .endfor
  143 .undef BROKEN_OPTIONS
  144 #end of bsd.mkopt.mk expanded inline.
  145 
  146 #
  147 # MK_*_SUPPORT options which default to "yes" unless their corresponding
  148 # MK_* variable is set to "no".
  149 #
  150 .for var in \
  151     INET \
  152     INET6
  153 .if defined(WITHOUT_${var}_SUPPORT) || ${MK_${var}} == "no"
  154 MK_${var}_SUPPORT:= no
  155 .else
  156 .if defined(KERNBUILDDIR)       # See if there's an opt_foo.h
  157 .if !defined(OPT_${var})
  158 OPT_${var}!= cat ${KERNBUILDDIR}/opt_${var:tl}.h; echo
  159 .export OPT_${var}
  160 .endif
  161 .if ${OPT_${var}} == ""         # nothing -> no
  162 MK_${var}_SUPPORT:= no
  163 .else
  164 MK_${var}_SUPPORT:= yes
  165 .endif
  166 .else                           # otherwise, yes
  167 MK_${var}_SUPPORT:= yes
  168 .endif
  169 .endif
  170 .endfor
  171 
  172 # Some modules only compile successfully if option FDT is set, due to #ifdef FDT
  173 # wrapped around declarations.  Module makefiles can optionally compile such
  174 # things using .if !empty(OPT_FDT)
  175 .if !defined(OPT_FDT) && defined(KERNBUILDDIR)
  176 OPT_FDT!= sed -n '/FDT/p' ${KERNBUILDDIR}/opt_platform.h
  177 .export OPT_FDT
  178 .endif

Cache object: 0aad2d23a4a5aa5f734618316c8c8384


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.