mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 05:31:37 -04:00
tools/nolibc: Add _NOLIBC_OPTIMIZER_HIDE_VAR() to compiler.h
Needed to stop compiler 'optimisations' bloating code. Equivalent to the definition in include/linux/compiler.h Signed-off-by: David Laight <david.laight.linux@gmail.com> Acked-by: Willy Tarreau <w@1wt.eu> Link: https://patch.msgid.link/20260308113742.12649-2-david.laight.linux@gmail.com Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
This commit is contained in:
committed by
Thomas Weißschuh
parent
cf34708824
commit
6702425cd5
@@ -71,4 +71,7 @@
|
||||
# define __nolibc_static_assert(_t)
|
||||
#endif
|
||||
|
||||
/* Make the optimizer believe the variable can be manipulated arbitrarily. */
|
||||
#define _NOLIBC_OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "+r" (var))
|
||||
|
||||
#endif /* _NOLIBC_COMPILER_H */
|
||||
|
||||
Reference in New Issue
Block a user