linux/tools/build
Andrii Nakryiko a278f3d819 tools, build: Propagate build failures from tools/build/Makefile.build
The '&&' command seems to have a bad effect when $(cmd_$(1)) exits with
non-zero effect: the command failure is masked (despite `set -e`) and all but
the first command of $(dep-cmd) is executed (successfully, as they are mostly
printfs), thus overall returning 0 in the end.

This means in practice that despite compilation errors, tools's build Makefile
will return success. We see this very reliably with libbpf's Makefile, which
doesn't get compilation error propagated properly. This in turns causes issues
with selftests build, as well as bpftool and other projects that rely on
building libbpf.

The fix is simple: don't use &&. Given `set -e`, we don't need to chain
commands with &&. The shell will exit on first failure, giving desired
behavior and propagating error properly.

Fixes: 275e2d9559 ("tools build: Move dependency copy into function")
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Link: https://lore.kernel.org/bpf/20200731024244.872574-1-andriin@fb.com
2020-08-03 16:15:40 +02:00
..
Documentation
feature tools/bpftool: Generalize BPF skeleton support and generate vmlinux.h 2020-06-22 17:01:48 -07:00
tests
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Build
Build.include tools, build: Propagate build failures from tools/build/Makefile.build 2020-08-03 16:15:40 +02:00
Makefile kbuild: Rename HOSTLDFLAGS to KBUILD_HOSTLDFLAGS 2018-07-18 01:18:05 +09:00
Makefile.build
Makefile.feature perf build: Remove libaudit from the default feature checks 2020-05-29 16:51:13 -03:00
Makefile.include treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
fixdep.c