Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools: testing: allow importing arch headers in shared.mk

There is an arch/ tree under tools. This contains some useful stuff, to
make that available, add it to the -I flags. This requires $(SRCARCH),
which is provided by Makefile.arch, so include that..

There still aren't that many headers so also just smush all of them into
SHARED_DEPS instead of starting to do any header dependency hocus pocus.

Link: https://lkml.kernel.org/r/20250828-b4-vma-no-atomic-h-v2-2-02d146a58ed2@google.com
Signed-off-by: Brendan Jackman <jackmanb@google.com>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Acked-by: Pedro Falcato <pfalcato@suse.de>
Cc: Jann Horn <jannh@google.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Brendan Jackman and committed by
Andrew Morton
d794cd23 ff0db419

+4 -1
+4 -1
tools/testing/shared/shared.mk
··· 1 1 # SPDX-License-Identifier: GPL-2.0 2 + include ../../scripts/Makefile.arch 2 3 3 - CFLAGS += -I../shared -I. -I../../include -I../../../lib -g -Og -Wall \ 4 + CFLAGS += -I../shared -I. -I../../include -I../../arch/$(SRCARCH)/include \ 5 + -I../../../lib -g -Og -Wall \ 4 6 -D_LGPL_SOURCE -fsanitize=address -fsanitize=undefined 5 7 LDFLAGS += -fsanitize=address -fsanitize=undefined 6 8 LDLIBS += -lpthread -lurcu ··· 13 11 generated/bit-length.h generated/autoconf.h \ 14 12 ../../include/linux/*.h \ 15 13 ../../include/asm/*.h \ 14 + ../../arch/$(SRCARCH)/include/asm/*.h \ 16 15 ../../../include/linux/xarray.h \ 17 16 ../../../include/linux/maple_tree.h \ 18 17 ../../../include/linux/radix-tree.h \