summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2019-03-26 13:48:39 -0400
committerThomas Gleixner <tglx@linutronix.de>2019-03-28 08:32:01 -0400
commit056d28d135bca0b1d0908990338e00e9dadaf057 (patch)
treee4c4bb1e57d8b4f898dedcb277441ff2555a0e65 /Makefile
parentcfa637cb20e96fe8cf44b867a7d7c34649cbf8eb (diff)
objtool: Query pkg-config for libelf location
If it is not in the default location, compilation fails at several points. Signed-off-by: Rolf Eike Beer <eb@emlix.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/91a25e992566a7968fedc89ec80e7f4c83ad0548.1553622500.git.jpoimboe@redhat.com
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index c0a34064c574..eef3d3f87c3b 100644
--- a/Makefile
+++ b/Makefile
@@ -950,9 +950,11 @@ mod_sign_cmd = true
950endif 950endif
951export mod_sign_cmd 951export mod_sign_cmd
952 952
953HOST_LIBELF_LIBS = $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf)
954
953ifdef CONFIG_STACK_VALIDATION 955ifdef CONFIG_STACK_VALIDATION
954 has_libelf := $(call try-run,\ 956 has_libelf := $(call try-run,\
955 echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0) 957 echo "int main() {}" | $(HOSTCC) -xc -o /dev/null $(HOST_LIBELF_LIBS) -,1,0)
956 ifeq ($(has_libelf),1) 958 ifeq ($(has_libelf),1)
957 objtool_target := tools/objtool FORCE 959 objtool_target := tools/objtool FORCE
958 else 960 else