mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tests/vpci: Use $(CC) instead of $(HOSTCC)
Depending on the build environment, HOSTCC can be different than CC. With
the recent `install` rule addition, this would put a binary of a wrong
format in the destdir (e.g. building tests on x86 host for Arm target).
Take the opportunity to adjust the `run` rule to only run the test if
HOSTCC is CC, else print a warning message.
Fixes: 96a587a057 ("tools/tests: Add install target for vPCI")
Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
This commit is contained in:
1 parent
6bd3aa6d56
commit
86a12671c5
1 file changed
+5
-1
@@ -8,10 +8,14 @@ all: $(TARGET)
|
||||
|
||||
.PHONY: run
|
||||
run: $(TARGET)
|
||||
ifeq ($(CC),$(HOSTCC))
|
||||
./$(TARGET)
|
||||
else
|
||||
$(warning HOSTCC != CC, will not run test)
|
||||
endif
|
||||
|
||||
$(TARGET): vpci.c vpci.h list.h main.c emul.h
|
||||
$(HOSTCC) $(CFLAGS_xeninclude) -g -o $@ vpci.c main.c
|
||||
$(CC) $(CFLAGS_xeninclude) -g -o $@ vpci.c main.c
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
|
||||