Only build USB-related modules if MK_USB != no
This change moves the thunderbolt module and other USB modules under a MK_USB != no conditional to ensure that users not desiring USB support can easily build systems without USB-specific drivers using this knob. MFC after: 1 week Reviewed By: imp Differential Revision: https://reviews.freebsd.org/D55576
This commit is contained in:
@@ -47,6 +47,7 @@ __DEFAULT_YES_OPTIONS = \
|
|||||||
SOURCELESS_UCODE \
|
SOURCELESS_UCODE \
|
||||||
SPLIT_KERNEL_DEBUG \
|
SPLIT_KERNEL_DEBUG \
|
||||||
TESTS \
|
TESTS \
|
||||||
|
USB \
|
||||||
USB_GADGET_EXAMPLES \
|
USB_GADGET_EXAMPLES \
|
||||||
ZFS
|
ZFS
|
||||||
|
|
||||||
@@ -207,6 +208,10 @@ MK_KERNEL_SYMBOLS:= no
|
|||||||
MK_DTRACE:= no
|
MK_DTRACE:= no
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if ${MK_USB} == "no"
|
||||||
|
MK_USB_GADGET_EXAMPLES:= no
|
||||||
|
.endif
|
||||||
|
|
||||||
# Some modules only compile successfully if option FDT is set, due to #ifdef FDT
|
# Some modules only compile successfully if option FDT is set, due to #ifdef FDT
|
||||||
# wrapped around declarations. Module makefiles can optionally compile such
|
# wrapped around declarations. Module makefiles can optionally compile such
|
||||||
# things using .if !empty(OPT_FDT)
|
# things using .if !empty(OPT_FDT)
|
||||||
|
|||||||
+6
-2
@@ -103,10 +103,14 @@ LINUXKPI_GENSRCS+= \
|
|||||||
pci_iov_if.h \
|
pci_iov_if.h \
|
||||||
pcib_if.h \
|
pcib_if.h \
|
||||||
vnode_if.h \
|
vnode_if.h \
|
||||||
usb_if.h \
|
|
||||||
opt_usb.h \
|
|
||||||
opt_stack.h
|
opt_stack.h
|
||||||
|
|
||||||
|
.if ${MK_USB} != "no"
|
||||||
|
LINUXKPI_GENSRCS+= \
|
||||||
|
usb_if.h \
|
||||||
|
opt_usb.h
|
||||||
|
.endif
|
||||||
|
|
||||||
LINUXKPI_INCLUDES+= \
|
LINUXKPI_INCLUDES+= \
|
||||||
-I${SYSDIR}/compat/linuxkpi/common/include \
|
-I${SYSDIR}/compat/linuxkpi/common/include \
|
||||||
-I${SYSDIR}/compat/linuxkpi/dummy/include \
|
-I${SYSDIR}/compat/linuxkpi/dummy/include \
|
||||||
|
|||||||
+10
-6
@@ -356,7 +356,7 @@ SUBDIR= \
|
|||||||
${_rtw89} \
|
${_rtw89} \
|
||||||
rtwn \
|
rtwn \
|
||||||
rtwn_pci \
|
rtwn_pci \
|
||||||
rtwn_usb \
|
${_rtwn_usb} \
|
||||||
${_rtwnfw} \
|
${_rtwnfw} \
|
||||||
${_s3} \
|
${_s3} \
|
||||||
${_safe} \
|
${_safe} \
|
||||||
@@ -411,7 +411,7 @@ SUBDIR= \
|
|||||||
${_ufshci} \
|
${_ufshci} \
|
||||||
uinput \
|
uinput \
|
||||||
unionfs \
|
unionfs \
|
||||||
usb \
|
${_usb} \
|
||||||
${_vesa} \
|
${_vesa} \
|
||||||
${_vf_i2c} \
|
${_vf_i2c} \
|
||||||
virtio \
|
virtio \
|
||||||
@@ -710,6 +710,14 @@ SUBDIR+= ktest
|
|||||||
SUBDIR+= tests
|
SUBDIR+= tests
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if ${MK_USB} != "no" || defined(ALL_MODULES)
|
||||||
|
_rtwn_usb= rtwn_usb
|
||||||
|
_usb= usb
|
||||||
|
. if ${MACHINE_CPUARCH} == "amd64"
|
||||||
|
_thunderbolt= thunderbolt
|
||||||
|
. endif
|
||||||
|
.endif
|
||||||
|
|
||||||
.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
|
.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
|
||||||
SUBDIR+= zfs
|
SUBDIR+= zfs
|
||||||
.endif
|
.endif
|
||||||
@@ -938,10 +946,6 @@ _bcm283x_pwm= bcm283x_pwm
|
|||||||
_neta= neta
|
_neta= neta
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MACHINE_CPUARCH} == "amd64"
|
|
||||||
_thunderbolt= thunderbolt
|
|
||||||
.endif
|
|
||||||
|
|
||||||
.if !(${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 110000)
|
.if !(${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} < 110000)
|
||||||
# LLVM 10 crashes when building if_malo_pci.c, fixed in LLVM11:
|
# LLVM 10 crashes when building if_malo_pci.c, fixed in LLVM11:
|
||||||
# https://bugs.llvm.org/show_bug.cgi?id=44351
|
# https://bugs.llvm.org/show_bug.cgi?id=44351
|
||||||
|
|||||||
Reference in New Issue
Block a user