mirror of
https://github.com/apache/nuttx.git
synced 2026-05-25 01:39:44 +08:00
libc: add support for C23 stdbit.h with bit manipulation macros
Build Documentation / build-html (push) Has been cancelled
Build Documentation / build-html (push) Has been cancelled
- Introduced Kconfig options for stdbit.h, allowing architecture-specific and generic implementations. - Added new documentation for stdbit.h, detailing its usage and configuration. - Updated CMake and Makefile to handle the inclusion of stdbit.h based on configuration settings. This enhances the NuttX library with optional C23 bit manipulation utilities, improving functionality for architectures that support it. Signed-off-by: Arjav Patel <arjav1528@gmail.com>
This commit is contained in:
committed by
Alan C. Assis
parent
47c7169825
commit
e2f3950d45
@@ -212,6 +212,15 @@ include/stdarg.h: include/nuttx/lib/stdarg.h
|
||||
$(Q) cp -f include/nuttx/lib/stdarg.h include/stdarg.h
|
||||
endif
|
||||
|
||||
# Target used to copy include/nuttx/lib/stdbit.h. If CONFIG_ARCH_STDBIT_H or
|
||||
# CONFIG_LIBC_STDBIT_GENERIC is set, copy stdbit.h to include/ for C23 bit
|
||||
# utilities.
|
||||
|
||||
ifeq ($(firstword $(filter y, $(CONFIG_ARCH_STDBIT_H) $(CONFIG_LIBC_STDBIT_GENERIC))),y)
|
||||
include/stdbit.h: include/nuttx/lib/stdbit.h
|
||||
$(Q) cp -f include/nuttx/lib/stdbit.h include/stdbit.h
|
||||
endif
|
||||
|
||||
# Target used to copy include/nuttx/lib/setjmp.h. If CONFIG_ARCH_SETJMP_H is
|
||||
# defined, then there is an architecture specific setjmp.h header file
|
||||
# that will be included indirectly from include/lib/setjmp.h. But first, we
|
||||
@@ -470,6 +479,10 @@ ifeq ($(CONFIG_ARCH_STDARG_H),y)
|
||||
context: include/stdarg.h
|
||||
endif
|
||||
|
||||
ifeq ($(firstword $(filter y, $(CONFIG_ARCH_STDBIT_H) $(CONFIG_LIBC_STDBIT_GENERIC))),y)
|
||||
context: include/stdbit.h
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_SETJMP_H),y)
|
||||
context: include/setjmp.h
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user