u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingle
@ 2022-08-24  8:37 Heiko Thiery
  2022-08-25  1:25 ` Simon Glass
  2022-08-31 23:33 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Heiko Thiery @ 2022-08-24  8:37 UTC (permalink / raw)
  To: u-boot; +Cc: Masahiro Yamada, Thomas Petazzoni, Tom Rini, Heiko Thiery

When compiling executables from a single.c file, the linker is also
invoked. Pass the flags like the other linker commands.

cherry-pick kbuild change from Linux:

63185b46cdb3 (kbuild: use HOSTLDFLAGS for single .c executables)

Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
 scripts/Makefile.host | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Makefile.host b/scripts/Makefile.host
index 69983a19a4..7624304e3e 100644
--- a/scripts/Makefile.host
+++ b/scripts/Makefile.host
@@ -89,7 +89,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) $(KBUILD_HOSTLDFLAGS) -o $@ $< \
 	  	$(KBUILD_HOSTLDLIBS) $(HOSTLDLIBS_$(@F))
 $(host-csingle): $(obj)/%: $(src)/%.c FORCE
 	$(call if_changed_dep,host-csingle)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingle
  2022-08-24  8:37 [PATCH] kbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingle Heiko Thiery
@ 2022-08-25  1:25 ` Simon Glass
  2022-08-31 23:33 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2022-08-25  1:25 UTC (permalink / raw)
  To: Heiko Thiery
  Cc: U-Boot Mailing List, Masahiro Yamada, Thomas Petazzoni, Tom Rini

On Wed, 24 Aug 2022 at 01:37, Heiko Thiery <heiko.thiery@gmail.com> wrote:
>
> When compiling executables from a single.c file, the linker is also
> invoked. Pass the flags like the other linker commands.
>
> cherry-pick kbuild change from Linux:
>
> 63185b46cdb3 (kbuild: use HOSTLDFLAGS for single .c executables)
>
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> ---
>  scripts/Makefile.host | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingle
  2022-08-24  8:37 [PATCH] kbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingle Heiko Thiery
  2022-08-25  1:25 ` Simon Glass
@ 2022-08-31 23:33 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-08-31 23:33 UTC (permalink / raw)
  To: Heiko Thiery; +Cc: u-boot, Masahiro Yamada, Thomas Petazzoni

[-- Attachment #1: Type: text/plain, Size: 468 bytes --]

On Wed, Aug 24, 2022 at 10:37:23AM +0200, Heiko Thiery wrote:

> When compiling executables from a single.c file, the linker is also
> invoked. Pass the flags like the other linker commands.
> 
> cherry-pick kbuild change from Linux:
> 
> 63185b46cdb3 (kbuild: use HOSTLDFLAGS for single .c executables)
> 
> Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-31 23:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-24  8:37 [PATCH] kbuild: add KBUILD_HOSTLDFLAGS to cmd_host-csingle Heiko Thiery
2022-08-25  1:25 ` Simon Glass
2022-08-31 23:33 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).