summaryrefslogtreecommitdiff
path: root/kernel/locking/rtmutex_api.c
diff options
context:
space:
mode:
authorHONG Yifan <elsk@google.com>2024-10-08 23:47:17 +0000
committerJosh Poimboeuf <jpoimboe@kernel.org>2024-10-17 15:13:06 -0700
commit32b504854bd96f707a03c6ddecb0af9d7fbc4775 (patch)
treef7dbd220112b3f8a5cd2824acc8d30ce352fd6e8 /kernel/locking/rtmutex_api.c
parented1cb76ebdeb88cf0603b9cb543f43f09ab704a1 (diff)
objtool: Also include tools/include/uapi
When building objtool against a sysroot that contains a stripped down version of the UAPI headers, the following error happens: In file included from arch/x86/decode.c:10: In file included from .../tools/arch/x86/include/asm/insn.h:10: In file included from <sysroot>/include/asm/byteorder.h:9: In file included from <sysroot>/include/linux/byteorder/little_endian.h:15: In file included from <sysroot>/include/linux/stddef.h:9: In file included from .../tools/include/linux/compiler_types.h:36: .../tools/include/linux/compiler-gcc.h:3:2: error: "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead." 3 | #error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead." | ^ 1 error generated. As hinted by the error, this is because <sysroot>/include/linux/stddef.h (a stripped-down version of uapi/include/linux/stddef.h) includes linux/compiler_types.h directly. However, this gets resolved to tools/include/linux/compiler_types.h, which is not expected to be included directly. To resolve this, I added tools/include/uapi to the include paths when building objtool. With this trick, linux/stddef.h is resolved to tools/include/uapi/linux/stddef.h, which doesn't include linux/compiler_types.h. Signed-off-by: HONG Yifan <elsk@google.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'kernel/locking/rtmutex_api.c')
0 files changed, 0 insertions, 0 deletions