From 00cffbf4828573215a538721ccc0658f5dd1f177 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Mon, 26 Feb 2018 19:41:47 +0100 Subject: [PATCH] kbuild: use HOSTLDFLAGS for single .c executables When compiling executables from a single .c file, the linker is also invoked. Pass the HOSTLDFLAGS like for other linker commands. Signed-off-by: Robin Jarry Cc: Josh Poimboeuf Cc: Ingo Molnar Signed-off-by: Masahiro Yamada Change-Id: I8332132775e7cc220eb7d1e20911223bca65e1e2 --- scripts/Makefile.host | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 1ac414fd5030..8c3dc7b2ad3a 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -112,7 +112,7 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags) # Create executable from a single .c file # host-csingle -> Executable quiet_cmd_host-csingle = HOSTCC $@ - cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \ + cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \ $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) $(host-csingle): $(obj)/%: $(src)/%.c FORCE $(call if_changed_dep,host-csingle)