Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

kbuild: use HOSTLDFLAGS for single .c executables

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>

authored by

Robin Jarry and committed by
Masahiro Yamada
63185b46 f605ba97

+1 -1
+1 -1
scripts/Makefile.host
··· 84 84 # Create executable from a single .c file 85 85 # host-csingle -> Executable 86 86 quiet_cmd_host-csingle = HOSTCC $@ 87 - cmd_host-csingle = $(HOSTCC) $(hostc_flags) -o $@ $< \ 87 + cmd_host-csingle = $(HOSTCC) $(hostc_flags) $(HOSTLDFLAGS) -o $@ $< \ 88 88 $(HOST_LOADLIBES) $(HOSTLOADLIBES_$(@F)) 89 89 $(host-csingle): $(obj)/%: $(src)/%.c FORCE 90 90 $(call if_changed_dep,host-csingle)