Skip to content

Commit ca5ee0e

Browse files
Aditya Gargliuw
authored andcommitted
tools: hv: Fix cross-compilation
Use the native ARCH only in case it is not set, this will allow the cross-compilation where ARCH is explicitly set. Additionally, simplify the ARCH check to build the fcopy daemon only for x86 and x86_64. Fixes: 82b0945 ("tools: hv: Add new fcopy application based on uio driver") Reported-by: Adrian Vladu <avladu@cloudbasesolutions.com> Closes: https://lore.kernel.org/linux-hyperv/PR3PR09MB54119DB2FD76977C62D8DD6AB04D2@PR3PR09MB5411.eurprd09.prod.outlook.com/ Co-developed-by: Saurabh Sengar <ssengar@linux.microsoft.com> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com> Signed-off-by: Aditya Garg <gargaditya@linux.microsoft.com> Reviewed-by: Roman Kisel <romank@linux.microsoft.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent 0d5acba commit ca5ee0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/hv/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Makefile for Hyper-V tools
33
include ../scripts/Makefile.include
44

5-
ARCH := $(shell uname -m 2>/dev/null)
5+
ARCH ?= $(shell uname -m 2>/dev/null)
66
sbindir ?= /usr/sbin
77
libexecdir ?= /usr/libexec
88
sharedstatedir ?= /var/lib
@@ -20,7 +20,7 @@ override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
2020
override CFLAGS += -Wno-address-of-packed-member
2121

2222
ALL_TARGETS := hv_kvp_daemon hv_vss_daemon
23-
ifneq ($(ARCH), aarch64)
23+
ifneq ($(filter x86_64 x86,$(ARCH)),)
2424
ALL_TARGETS += hv_fcopy_uio_daemon
2525
endif
2626
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))

0 commit comments

Comments
 (0)