diff options
author | Robin Jarry <robin.jarry@6wind.com> | 2018-02-26 13:41:47 -0500 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-04-07 06:04:02 -0400 |
commit | 63185b46cdb36905d585c73cc4730fec44cdf55d (patch) | |
tree | 24159f762a5b292e0e61b117d4906df4731a90c8 | |
parent | f605ba97fb80522656c7dce9825a908f1e765b57 (diff) |
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 <robin.jarry@6wind.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r-- | scripts/Makefile.host | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
84 | # Create executable from a single .c file | 84 | # Create executable from a single .c file |
85 | # host-csingle -> Executable | 85 | # host-csingle -> Executable |
86 | quiet_cmd_host-csingle = HOSTCC $@ | 86 | quiet_cmd_host-csingle = HOSTCC $@ |
87 | cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \ | 87 | cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \ |
88 | $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) | 88 | $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) |
89 | $(host-csingle): $(obj)/%: $(src)/%.c FORCE | 89 | $(host-csingle): $(obj)/%: $(src)/%.c FORCE |
90 | $(call if_changed_dep,host-csingle) | 90 | $(call if_changed_dep,host-csingle) |