diff options
| author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-18 00:25:41 -0500 |
|---|---|---|
| committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-12-19 10:04:15 -0500 |
| commit | ef7cfd00b2caf6edeb7f169682b64be2d0a798cf (patch) | |
| tree | 3448db106a760f4c73a22c6d5353069bd3ae4770 | |
| parent | ccda4af0f4b92f7b4c308d3acc262f4a7e3affad (diff) | |
kbuild: fix false positive warning/error about missing libelf
For the same reason as commit 25896d073d8a ("x86/build: Fix compiler
support check for CONFIG_RETPOLINE"), you cannot put this $(error ...)
into the parse stage of the top Makefile.
Perhaps I'd propose a more sophisticated solution later, but this is
the best I can do for now.
Link: https://lkml.org/lkml/2017/12/25/211
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Reported-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reported-by: Qian Cai <cai@lca.pw>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Tested-by: Qian Cai <cai@lca.pw>
| -rw-r--r-- | Makefile | 13 |
1 files changed, 8 insertions, 5 deletions
| @@ -962,11 +962,6 @@ ifdef CONFIG_STACK_VALIDATION | |||
| 962 | ifeq ($(has_libelf),1) | 962 | ifeq ($(has_libelf),1) |
| 963 | objtool_target := tools/objtool FORCE | 963 | objtool_target := tools/objtool FORCE |
| 964 | else | 964 | else |
| 965 | ifdef CONFIG_UNWINDER_ORC | ||
| 966 | $(error "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") | ||
| 967 | else | ||
| 968 | $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel") | ||
| 969 | endif | ||
| 970 | SKIP_STACK_VALIDATION := 1 | 965 | SKIP_STACK_VALIDATION := 1 |
| 971 | export SKIP_STACK_VALIDATION | 966 | export SKIP_STACK_VALIDATION |
| 972 | endif | 967 | endif |
| @@ -1125,6 +1120,14 @@ uapi-asm-generic: | |||
| 1125 | 1120 | ||
| 1126 | PHONY += prepare-objtool | 1121 | PHONY += prepare-objtool |
| 1127 | prepare-objtool: $(objtool_target) | 1122 | prepare-objtool: $(objtool_target) |
| 1123 | ifeq ($(SKIP_STACK_VALIDATION),1) | ||
| 1124 | ifdef CONFIG_UNWINDER_ORC | ||
| 1125 | @echo "error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2 | ||
| 1126 | @false | ||
| 1127 | else | ||
| 1128 | @echo "warning: Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel" >&2 | ||
| 1129 | endif | ||
| 1130 | endif | ||
| 1128 | 1131 | ||
| 1129 | # Generate some files | 1132 | # Generate some files |
| 1130 | # --------------------------------------------------------------------------- | 1133 | # --------------------------------------------------------------------------- |
