瀏覽代碼

[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>
Matthias Urlichs 20 年之前
父節點
當前提交
e0af0d85f5
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      scripts/Makefile.host

+ 2 - 1
scripts/Makefile.host

@@ -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)