diff mbox series

x86emul: inherit HOSTCC when building 32-bit harness on 64-bit host

Message ID 842a0920-60ed-cf51-7f6c-37af40173160@suse.com (mailing list archive)
State New, archived
Headers show
Series x86emul: inherit HOSTCC when building 32-bit harness on 64-bit host | expand

Commit Message

Jan Beulich April 2, 2020, 9:43 a.m. UTC
We're deliberately bringing XEN_COMPILE_ARCH and XEN_TARGET_ARCH out of
sync in this case, and hence HOSTCC won't get set from CC. Therefore
without this addition HOSTCC would not match a possible make command
line override of CC, but default to "gcc", likely causing the build to
fail for test_x86_emulator.c on systems with too old a gcc.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper April 2, 2020, 10:23 a.m. UTC | #1
On 02/04/2020 10:43, Jan Beulich wrote:
> We're deliberately bringing XEN_COMPILE_ARCH and XEN_TARGET_ARCH out of
> sync in this case, and hence HOSTCC won't get set from CC. Therefore
> without this addition HOSTCC would not match a possible make command
> line override of CC, but default to "gcc", likely causing the build to
> fail for test_x86_emulator.c on systems with too old a gcc.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox series

Patch

--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -268,7 +268,7 @@  install uninstall:
 ifeq ($(XEN_COMPILE_ARCH),x86_64)
 run32: $(addsuffix .h,$(TESTCASES)) $(addsuffix -opmask.h,$(OPMASK))
 run32 clean32: %32:
-	$(MAKE) -C 32 $*
+	$(MAKE) -C 32 HOSTCC=$(HOSTCC) $*
 clean: clean32
 else
 run32 clean32: %32: %