linux/tools
HONG Yifan 32b504854b 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>
2024-10-17 15:13:06 -07:00
..
accounting
arch linux_kselftest-fixes-6.12-rc3 2024-10-11 16:12:45 -07:00
bootconfig
bpf bpftool: Fix undefined behavior in qsort(NULL, 0, ...) 2024-09-10 11:40:55 -07:00
build perf build: Fix build feature-dwarf_getlocations fail for old libdw 2024-10-02 18:21:49 -03:00
certs
cgroup
counter
crypto
debugging
firewire
firmware
gpio
hv hyperv-next for v6.12 2024-09-19 08:15:30 +02:00
iio tools: iio: rm .*.cmd when make clean 2024-09-05 19:27:13 +01:00
include perf tools fixes for v6.12: 2024-10-08 10:43:22 -07:00
kvm/kvm_stat
laptop
leds
lib memblock: updates for 6.12-rc1 2024-09-25 11:35:19 -07:00
memory-model tools/memory-model: simple.txt: Fix stale reference to recipes-pairs.txt 2024-09-13 23:56:44 -07:00
mm Many singleton patches - please see the various changelogs for details. 2024-09-21 08:20:50 -07:00
net NFSD 6.12 Release Notes 2024-09-23 12:01:45 -07:00
objtool objtool: Also include tools/include/uapi 2024-10-17 15:13:06 -07:00
pci tools: PCI: Remove unused BILLION macro 2024-09-13 22:37:06 +00:00
pcmcia
perf perf tools fixes for v6.12: 2024-10-08 10:43:22 -07:00
power linux-cpupower-6.12-rc1-fixes 2024-09-24 12:57:46 -07:00
rcu
sched_ext sched_ext, scx_qmap: Add and use SCX_ENQ_CPU_SELECTED 2024-10-07 10:16:18 -10:00
scripts
sound
spi spi: spidev_fdx: Fix the wrong format specifier 2024-09-04 16:50:33 +01:00
testing linux_kselftest-fixes-6.12-rc3 2024-10-11 16:12:45 -07:00
thermal
time
tracing rtla: Fix the help text in osnoise and timerlat top tools 2024-10-03 16:43:22 -04:00
usb
verification
virtio tools/virtio:Fix the wrong format specifier 2024-09-10 02:51:48 -04:00
wmi
workqueue
writeback
Makefile