mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 11:33:28 +02:00
tools/nolibc: add __nolibc_has_feature()
Certain compiler features are signaled via the __has_feature() preprocessor builtin. Add a nolibc wrapper for it, similar to __nolibc_has_attribute(). Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://lore.kernel.org/r/20250419-nolibc-ubsan-v2-1-060b8a016917@weissschuh.net
This commit is contained in:
parent
60ccc16f53
commit
8399f14666
|
|
@ -12,6 +12,12 @@
|
|||
# define __nolibc_has_attribute(attr) 0
|
||||
#endif
|
||||
|
||||
#if defined(__has_feature)
|
||||
# define __nolibc_has_feature(feature) __has_feature(feature)
|
||||
#else
|
||||
# define __nolibc_has_feature(feature) 0
|
||||
#endif
|
||||
|
||||
#if __nolibc_has_attribute(naked)
|
||||
# define __nolibc_entrypoint __attribute__((naked))
|
||||
# define __nolibc_entrypoint_epilogue()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user