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: 82b0945ce2 ("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>
master
parent
0d5acba633
commit
ca5ee0e918
|
|
@ -2,7 +2,7 @@
|
||||||
# Makefile for Hyper-V tools
|
# Makefile for Hyper-V tools
|
||||||
include ../scripts/Makefile.include
|
include ../scripts/Makefile.include
|
||||||
|
|
||||||
ARCH := $(shell uname -m 2>/dev/null)
|
ARCH ?= $(shell uname -m 2>/dev/null)
|
||||||
sbindir ?= /usr/sbin
|
sbindir ?= /usr/sbin
|
||||||
libexecdir ?= /usr/libexec
|
libexecdir ?= /usr/libexec
|
||||||
sharedstatedir ?= /var/lib
|
sharedstatedir ?= /var/lib
|
||||||
|
|
@ -20,7 +20,7 @@ override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
|
||||||
override CFLAGS += -Wno-address-of-packed-member
|
override CFLAGS += -Wno-address-of-packed-member
|
||||||
|
|
||||||
ALL_TARGETS := hv_kvp_daemon hv_vss_daemon
|
ALL_TARGETS := hv_kvp_daemon hv_vss_daemon
|
||||||
ifneq ($(ARCH), aarch64)
|
ifneq ($(filter x86_64 x86,$(ARCH)),)
|
||||||
ALL_TARGETS += hv_fcopy_uio_daemon
|
ALL_TARGETS += hv_fcopy_uio_daemon
|
||||||
endif
|
endif
|
||||||
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
|
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue