[PATCH] kbuild: obey HOSTLOADLIBES_programname for single-file compilation
authorMatthias Urlichs <smurf@smurf.noris.de>
Fri, 18 Feb 2005 09:23:41 +0000 (10:23 +0100)
committerSam Ravnborg <sam@mars.(none)>
Wed, 13 Jul 2005 22:11:14 +0000 (22:11 +0000)
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>
scripts/Makefile.host

index 2821a2b..2d51970 100644 (file)
@@ -98,7 +98,8 @@ 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) $(HOST_LOADLIBES) -o $@ $<
+      cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \
+               $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F))
 $(host-csingle): %: %.c FORCE
        $(call if_changed_dep,host-csingle)