Skip to content

Commit 63185b4

Browse files
rjarrymasahir0y
authored andcommitted
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>
1 parent f605ba9 commit 63185b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/Makefile.host‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags)
8484
# Create executable from a single .c file
8585
# host-csingle -> Executable
8686
quiet_cmd_host-csingle = HOSTCC $@
87-
cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \
87+
cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \
8888
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
8989
$(host-csingle): $(obj)/%: $(src)/%.c FORCE
9090
$(call if_changed_dep,host-csingle)

0 commit comments

Comments
 (0)