提交 ddea05fa 编写于 作者: A Arnd Bergmann 提交者: Michal Marek

kbuild: make samples depend on headers_install

Olof's build test setup keeps failing to compile arm64 kernels
because of a toolchain that uses outdated kernel headers:

/work/build/batch/samples/seccomp/bpf-fancy.c:13:27: fatal error: linux/seccomp.h: No such file or directory

This is of course something he could change, but it also indicates
that others may run into the same problem. Running 'make headers_install'
avoids the issue by ensuring that the kernel headers are put into
the $(objdir)/usr/include path before we build the samples.

The same problem happened for the Documentation build in the
past and was fixed up with commit 8e2faea8 ("Make Documenation
depend on headers_install"). This adds an identical Makefile dependency
for the samples/ subdirectory.
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NMichal Marek <mmarek@suse.com>
上级 db547ef1
...@@ -1620,7 +1620,7 @@ endif ...@@ -1620,7 +1620,7 @@ endif
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir) $(build)=$(build-dir)
# Make sure the latest headers are built for Documentation # Make sure the latest headers are built for Documentation
Documentation/: headers_install Documentation/ samples/: headers_install
%/: prepare scripts FORCE %/: prepare scripts FORCE
$(cmd_crmodverdir) $(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册