Fix up host tools includes
Don't include device kernel headers when building host tools. They
should not be used for user space tools at all and for sure not for host
tools. Maybe it didn't break on older hosts but on current Ubuntu 22.04
this breaks compilation:
HOSTCC scripts/mod/modpost.o
clang-11: warning: argument unused during compilation: '-L/usr/lib' [-Wunused-command-line-argument]
clang-11: warning: argument unused during compilation: '-L/usr/lib/x86_64-linux-gnu' [-Wunused-command-line-argument]
clang-11: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument]
In file included from /develop/fp4-a11/kernel/msm-4.19/scripts/mod/modpost.c:21:
In file included from /develop/fp4-a11/kernel/msm-4.19/scripts/mod/modpost.h:7:
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:465:
In file included from /usr/include/x86_64-linux-gnu/bits/statx.h:31:
In file included from /develop/fp4-a11/kernel/msm-4.19/include/uapi/linux/stat.h:5:
/develop/fp4-a11/kernel/msm-4.19/include/uapi/linux/types.h:10:2: warning: "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" [-W#warnings]
^
In file included from /develop/fp4-a11/kernel/msm-4.19/scripts/mod/modpost.c:21:
In file included from /develop/fp4-a11/kernel/msm-4.19/scripts/mod/modpost.h:7:
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:465:
In file included from /usr/include/x86_64-linux-gnu/bits/statx.h:31:
In file included from /develop/fp4-a11/kernel/msm-4.19/include/uapi/linux/stat.h:5:
In file included from /develop/fp4-a11/kernel/msm-4.19/include/uapi/linux/types.h:14:
In file included from /develop/fp4-a11/kernel/msm-4.19/include/uapi/linux/posix_types.h:5:
/develop/fp4-a11/kernel/msm-4.19/include/uapi/linux/stddef.h:2:10: fatal error: 'linux/compiler_types.h' file not found
The workaround here is very specific to the FP4 Android 11 source tree
setup, but good enough for now.
Issue: FP4-INT#14
Issue: FP4-A14#256
Change-Id: I9e8b9abd70e1ddf796fe9ff6737cce064e9d8791
1 file changed