crc: Make the build of crc function dependent on a Kconfig

Add CONFIG_CRC for building CRC related routines.
CRC routines are now being built for each application, whether used or
not and are add in the build system unconditionally.

Keep CONFIG_CRC enabled by default for now and until all users have
converted to use the new option.

Partial fix for #50654

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2022-09-26 12:13:43 -04:00 committed by Carles Cufí
commit cffe98d9de
26 changed files with 37 additions and 5 deletions

View file

@ -10,5 +10,6 @@
config FCB
bool "Flash Circular Buffer support"
depends on FLASH_MAP
select CRC
help
Enable support of Flash Circular Buffer.

View file

@ -5,6 +5,7 @@
config NVS
bool "Non-volatile Storage"
select CRC
help
Enable support of Non-volatile Storage.

View file

@ -6,6 +6,7 @@ menuconfig MCUMGR
bool "mcumgr Support"
select NET_BUF
select ZCBOR
select CRC
help
This option enables the mcumgr management library.

View file

@ -9,6 +9,7 @@ menuconfig OSDP
select RING_BUFFER
imply SERIAL_SUPPORT_INTERRUPT
imply UART_INTERRUPT_DRIVEN
select CRC
help
Add support for Open Supervised Device Protocol (OSDP)

View file

@ -3,6 +3,7 @@
menuconfig MODBUS
bool "Modbus support"
select CRC
if MODBUS

View file

@ -4,6 +4,7 @@
config DNS_RESOLVER
bool "DNS resolver"
depends on NET_NATIVE
select CRC
help
This option enables the DNS client side support for Zephyr