From: Achill Gilgenast <achill@achill.org>
To: linux-kernel@vger.kernel.org, x86@kernel.org
Cc: Achill Gilgenast <achill@achill.org>,
stable@vger.kernel.org, Thomas Gleixner <tglx@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH] x86/tools: Scope uapi include dirs to vdso2c
Date: Sun, 19 Jul 2026 22:12:56 +0200 [thread overview]
Message-ID: <20260719201328.183537-1-achill@achill.org> (raw)
With a76108d05ee1 ("x86/entry/vdso: Move vdso2c to arch/x86/tools"),
-I$(srctree)/include/uapi and -I$(srctree)/arch/$(SUBARCH)/include/uapi
were added to HOST_EXTRACFLAGS, which also applies to hostprogs like tools/insn_sanity.
As a result <asm/insn.h> -> <asm/byteorder.h> -> <linux/swab.h> now
resolves to include/uapi/linux/swab.h when building insn_sanity. However the
uapi header uses __attribute_const__ which is normally undefined.
In file included from /home/achill/git/linux/include/uapi/linux/byteorder/little_endian.h:14,
from /usr/include/asm/byteorder.h:5,
from /home/achill/git/linux/tools/arch/x86/include/asm/insn.h:10,
from /home/achill/git/linux/arch/x86/tools/insn_sanity.c:17:
/home/achill/git/linux/include/uapi/linux/swab.h:48:15: error: unknown type name '__attribute_const__'; did you mean '__attribute__'?
48 | static inline __attribute_const__ __u16 __fswab16(__u16 val)
| ^~~~~~~~~~~~~~~~~~~
| __attribute__
So only include the uapi include dirs when building vdso2c.
Fixes: a76108d05ee1 ("x86/entry/vdso: Move vdso2c to arch/x86/tools")
Cc: stable@vger.kernel.org
Signed-off-by: Achill Gilgenast <achill@achill.org>
---
arch/x86/tools/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/tools/Makefile b/arch/x86/tools/Makefile
index 39a183fffd04..24030dcc3243 100644
--- a/arch/x86/tools/Makefile
+++ b/arch/x86/tools/Makefile
@@ -38,8 +38,10 @@ $(obj)/insn_decoder_test.o: $(srctree)/tools/arch/x86/lib/insn.c $(srctree)/tool
$(obj)/insn_sanity.o: $(srctree)/tools/arch/x86/lib/insn.c $(srctree)/tools/arch/x86/lib/inat.c $(srctree)/tools/arch/x86/include/asm/inat_types.h $(srctree)/tools/arch/x86/include/asm/inat.h $(srctree)/tools/arch/x86/include/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c
-HOST_EXTRACFLAGS += -I$(srctree)/tools/include -I$(srctree)/include/uapi \
- -I$(srctree)/arch/$(SUBARCH)/include/uapi
+HOST_EXTRACFLAGS += -I$(srctree)/tools/include
+
+HOSTCFLAGS_vdso2c.o += -I$(srctree)/include/uapi \
+ -I$(srctree)/arch/$(SUBARCH)/include/uapi
hostprogs += relocs vdso2c
relocs-objs := relocs_32.o relocs_64.o relocs_common.o
--
2.55.0
reply other threads:[~2026-07-19 20:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260719201328.183537-1-achill@achill.org \
--to=achill@achill.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=stable@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®