Skip to content

Commit e0af0d8

Browse files
m-u-xyzSam Ravnborg
authored andcommitted
[PATCH] kbuild: obey HOSTLOADLIBES_programname for single-file compilation
Single-file HOSTCC calls added the libraries from $(HOSTLOADLIBES), but not from $(HOSTLOADLIBES_programname). Multi-file HOSTCC calls do both. This patch fixes that inconsistency. Signed-Off-By: Matthias Urlichs <smurf@debian.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent a0674e8 commit e0af0d8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎scripts/Makefile.host‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ hostcxx_flags = -Wp,-MD,$(depfile) $(__hostcxx_flags)
9898
# Create executable from a single .c file
9999
# host-csingle -> Executable
100100
quiet_cmd_host-csingle = HOSTCC $@
101-
cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOST_LOADLIBES) -o $@ $<
101+
cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \
102+
$(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
102103
$(host-csingle): %: %.c FORCE
103104
$(call if_changed_dep,host-csingle)
104105

0 commit comments

Comments
 (0)