From: Robin Jarry Date: Mon, 26 Feb 2018 18:41:47 +0000 (+0100) Subject: kbuild: use HOSTLDFLAGS for single .c executables X-Git-Tag: v4.17-rc1~4^2~14 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=63185b46cdb36905d585c73cc4730fec44cdf55d;p=uclinux-h8%2Flinux.git 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 --- diff --git a/scripts/Makefile.host b/scripts/Makefile.host index e6dc6ae2d7c4..aa971cc3f339 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -84,7 +84,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)