* [Buildroot] [PATCH] package/linux-tools: hv: fix build on non-x86 build hosts
@ 2026-11-04 8:27 Yegor Yefremov
2026-11-04 21:07 ` Thomas Petazzoni via buildroot
2026-11-04 21:12 ` Thomas Petazzoni via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Yegor Yefremov @ 2026-11-04 8:27 UTC (permalink / raw)
To: buildroot; +Cc: Pascal de Bruijn
Since Linux 5.4, commit 9b5434196529 ("Tools: hv: move to tools
buildsystem"), the Hyper-V daemons are built with tools/build, which
first links the objects with "$(LD) -r". We only pass CC to the hv
build, so LD defaults to $(CROSS_COMPILE)ld, i.e. the build host's
plain ld. That only works by chance on x86 build hosts, whose ld
handles i386/x86_64 objects; on an aarch64 build host it fails:
LD hv_kvp_daemon-in.o
/usr/bin/ld.bfd: relocatable linking with relocations from format elf32-i386 (hv_kvp_daemon.o) to format elf64-littleaarch64 (hv_kvp_daemon-in.o) is not supported
Pass LD="$(TARGET_LD)", as already done for rtla.
This issue has been present since commit 2703383c7201 ("package/linux-tools:
add hyperv integration services"), which added the hv tools while the
supported kernels already used tools/build for them, without passing
LD. It therefore affects 2020.02 and later, including 2025.02.x.
Fixes:
https://autobuild.buildroot.org/results/86c33797a5f09dbb1162a554cb6019f7c0702fbd
Fixes: 2703383c72011d38a1e3559cb7a5a2b0071b35c6 ("package/linux-tools: add hyperv integration services")
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
package/linux-tools/linux-tool-hv.mk.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/package/linux-tools/linux-tool-hv.mk.in b/package/linux-tools/linux-tool-hv.mk.in
index e638fecfc6..3aead40178 100644
--- a/package/linux-tools/linux-tool-hv.mk.in
+++ b/package/linux-tools/linux-tool-hv.mk.in
@@ -16,7 +16,10 @@ HV_hv_kvp_daemon = hypervkvpd
HV_hv_fcopy_daemon = hypervfcopyd
HV_hv_vss_daemon = hypervvssd
-HV_MAKE_OPTS = CC="$(TARGET_CC)" CFLAGS="$(filter-out -g%,$(TARGET_CFLAGS))"
+HV_MAKE_OPTS = \
+ CC="$(TARGET_CC)" \
+ LD="$(TARGET_LD)" \
+ CFLAGS="$(filter-out -g%,$(TARGET_CFLAGS))"
define HV_BUILD_CMDS
$(Q)for prog in $(HV_PROGS_y); do \
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/linux-tools: hv: fix build on non-x86 build hosts
2026-11-04 8:27 [Buildroot] [PATCH] package/linux-tools: hv: fix build on non-x86 build hosts Yegor Yefremov
@ 2026-11-04 21:07 ` Thomas Petazzoni via buildroot
2026-11-04 21:12 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-11-04 21:07 UTC (permalink / raw)
To: Yegor Yefremov; +Cc: buildroot, Pascal de Bruijn
On Wed, Nov 04, 2026 at 09:27:35AM +0100, Yegor Yefremov wrote:
> Since Linux 5.4, commit 9b5434196529 ("Tools: hv: move to tools
> buildsystem"), the Hyper-V daemons are built with tools/build, which
> first links the objects with "$(LD) -r". We only pass CC to the hv
> build, so LD defaults to $(CROSS_COMPILE)ld, i.e. the build host's
> plain ld. That only works by chance on x86 build hosts, whose ld
> handles i386/x86_64 objects; on an aarch64 build host it fails:
>
> LD hv_kvp_daemon-in.o
> /usr/bin/ld.bfd: relocatable linking with relocations from format elf32-i386 (hv_kvp_daemon.o) to format elf64-littleaarch64 (hv_kvp_daemon-in.o) is not supported
>
> Pass LD="$(TARGET_LD)", as already done for rtla.
>
> This issue has been present since commit 2703383c7201 ("package/linux-tools:
> add hyperv integration services"), which added the hv tools while the
> supported kernels already used tools/build for them, without passing
> LD. It therefore affects 2020.02 and later, including 2025.02.x.
>
> Fixes:
> https://autobuild.buildroot.org/results/86c33797a5f09dbb1162a554cb6019f7c0702fbd
>
> Fixes: 2703383c72011d38a1e3559cb7a5a2b0071b35c6 ("package/linux-tools: add hyperv integration services")
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH] package/linux-tools: hv: fix build on non-x86 build hosts
2026-11-04 8:27 [Buildroot] [PATCH] package/linux-tools: hv: fix build on non-x86 build hosts Yegor Yefremov
2026-11-04 21:07 ` Thomas Petazzoni via buildroot
@ 2026-11-04 21:12 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-11-04 21:12 UTC (permalink / raw)
To: Yegor Yefremov; +Cc: buildroot, Pascal de Bruijn
On Wed, Nov 04, 2026 at 09:27:35AM +0100, Yegor Yefremov wrote:
> Since Linux 5.4, commit 9b5434196529 ("Tools: hv: move to tools
> buildsystem"), the Hyper-V daemons are built with tools/build, which
> first links the objects with "$(LD) -r". We only pass CC to the hv
> build, so LD defaults to $(CROSS_COMPILE)ld, i.e. the build host's
> plain ld. That only works by chance on x86 build hosts, whose ld
> handles i386/x86_64 objects; on an aarch64 build host it fails:
>
> LD hv_kvp_daemon-in.o
> /usr/bin/ld.bfd: relocatable linking with relocations from format elf32-i386 (hv_kvp_daemon.o) to format elf64-littleaarch64 (hv_kvp_daemon-in.o) is not supported
>
> Pass LD="$(TARGET_LD)", as already done for rtla.
>
> This issue has been present since commit 2703383c7201 ("package/linux-tools:
> add hyperv integration services"), which added the hv tools while the
> supported kernels already used tools/build for them, without passing
> LD. It therefore affects 2020.02 and later, including 2025.02.x.
>
> Fixes:
> https://autobuild.buildroot.org/results/86c33797a5f09dbb1162a554cb6019f7c0702fbd
>
> Fixes: 2703383c72011d38a1e3559cb7a5a2b0071b35c6 ("package/linux-tools: add hyperv integration services")
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-04 21:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04 8:27 [Buildroot] [PATCH] package/linux-tools: hv: fix build on non-x86 build hosts Yegor Yefremov
2026-11-04 21:07 ` Thomas Petazzoni via buildroot
2026-11-04 21:12 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox