Skip to content

Commit

Permalink
kbuild: use HOSTLDFLAGS for single .c executables
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Ingo Molnar <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
rjarry authored and masahir0y committed Apr 7, 2018
1 parent f605ba9 commit 63185b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/Makefile.host
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 63185b4

Please sign in to comment.