* [PATCH] kbuild: honor HOSTCFLAGS and HOSTLDFLAGS in libelf test
@ 2018-07-01 13:07 Matthias Reichl
0 siblings, 0 replies; only message in thread
From: Matthias Reichl @ 2018-07-01 13:07 UTC (permalink / raw)
To: Masahiro Yamada, Michal Marek
Cc: Josh Poimboeuf, Peter Zijlstra, linux-kbuild, linux-kernel
Since commit 596a9f6768af ("objtool: Support HOSTCFLAGS and HOSTLDFLAGS")
objtool can use a libelf installed in a non-standard location by
passing in appropriate HOST flags.
The libelf check in the main Makefile is done without these flags
and fails if no libelf is installed on the system.
Fix this by adding HOSTCFLAGS and HOSTLDFLAGS to the libelf check.
Signed-off-by: Matthias Reichl <hias@horus.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index c9132594860b..b0485fddc554 100644
--- a/Makefile
+++ b/Makefile
@@ -933,7 +933,7 @@ export mod_sign_cmd
ifdef CONFIG_STACK_VALIDATION
has_libelf := $(call try-run,\
- echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0)
+ echo "int main() {}" | $(HOSTCC) $(HOSTCFLAGS) -xc -o /dev/null -lelf $(HOSTLDFLAGS) -,1,0)
ifeq ($(has_libelf),1)
objtool_target := tools/objtool FORCE
else
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-07-01 13:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-01 13:07 [PATCH] kbuild: honor HOSTCFLAGS and HOSTLDFLAGS in libelf test Matthias Reichl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.