diff options
author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-04-24 14:48:12 +0300 |
---|---|---|
committer | Thomas Weißschuh <linux@weissschuh.net> | 2025-05-21 16:31:50 +0300 |
commit | 3785289f97e2118b157332ffaae9fd2ec71237c8 (patch) | |
tree | b7c8310fa6399bb3a38cbb8a61024dcb34820399 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | a6a054c8ad32b04c2e5d3cc5592fa737a2bb771f (diff) | |
download | linux-3785289f97e2118b157332ffaae9fd2ec71237c8.tar.xz |
tools/nolibc: include nolibc.h early from all header files
Inclusion of any nolibc header file should also bring all other headers.
On the other hand it should also be possible to include any nolibc header
files
in any order.
Currently this is implemented by including the catch-all nolibc.h after the
headers own definitions.
This is problematic if one nolibc header depends on another one.
The first header has to include the other one before defining any symbols.
That in turn will include the rest of nolibc while the current header has
not defined anything yet. If any other part of nolibc depends on
definitions from the current header, errors are encountered.
This is already the case today. Effectively nolibc can only be included in
the order of nolibc.h.
Restructure the way "nolibc.h" is included.
Move it to the beginning of the header files and before the include guards.
Now any header will behave exactly like "nolibc.h" while the include
guards prevent any duplicate definitions.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20250424-nolibc-header-check-v1-2-011576b6ed6f@linutronix.de
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions