]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
kbuild: use HOSTLDFLAGS for single .c executables
authorRobin Jarry <robin.jarry@6wind.com>
Mon, 26 Feb 2018 18:41:47 +0000 (19:41 +0100)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 7 Apr 2018 10:04:02 +0000 (19:04 +0900)
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>
scripts/Makefile.host

index e6dc6ae2d7c4d1addb6193f30c0d6c920b1d86d5..aa971cc3f339ab54238dd3ddae0d6fb83808861f 100644 (file)
@@ -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)