Infer the values of HOST{CC/CXX} from CC/CXX if unset, do this in
StdGNU.mk, together with the rest of the toolchain variables.

Signed-off-by: Roger Pau Monné <roger....@citrix.com>
---
Cc: Andrew Cooper <andrew.coop...@citrix.com>
Cc: George Dunlap <george.dun...@eu.citrix.com>
Cc: Ian Jackson <ian.jack...@eu.citrix.com>
Cc: Jan Beulich <jbeul...@suse.com>
Cc: Julien Grall <julien.gr...@arm.com>
Cc: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
Cc: Stefano Stabellini <sstabell...@kernel.org>
Cc: Tim Deegan <t...@xen.org>
Cc: Wei Liu <w...@xen.org>
---
 Config.mk        | 10 ----------
 config/StdGNU.mk |  4 ++++
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/Config.mk b/Config.mk
index 417039d7f6..1a1cc09881 100644
--- a/Config.mk
+++ b/Config.mk
@@ -39,22 +39,12 @@ DESTDIR     ?= /
 # Allow phony attribute to be listed as dependency rather than fake target
 .PHONY: .phony
 
-# If we are not cross-compiling, default HOSTC{C/XX} to C{C/XX}
-ifeq ($(XEN_TARGET_ARCH), $(XEN_COMPILE_ARCH))
-HOSTCC ?= $(CC)
-HOSTCXX ?= $(CXX)
-endif
-
 # Use Clang/LLVM instead of GCC?
 clang ?= n
 ifeq ($(clang),n)
 gcc := y
-HOSTCC ?= gcc
-HOSTCXX ?= g++
 else
 gcc := n
-HOSTCC ?= clang
-HOSTCXX ?= clang++
 endif
 
 DEPS_INCLUDE = $(addsuffix .d2, $(basename $(wildcard $(DEPS))))
diff --git a/config/StdGNU.mk b/config/StdGNU.mk
index 490ebdf23c..7b7dfe0440 100644
--- a/config/StdGNU.mk
+++ b/config/StdGNU.mk
@@ -9,6 +9,10 @@ CC        ?= $(CROSS_COMPILE)gcc
 CXX       ?= $(CROSS_COMPILE)g++
 LD_LTO    ?= $(CROSS_COMPILE)ld
 endif
+
+HOSTCC    ?= $(CC)
+HOSTCXX   ?= $(CXX)
+
 CPP       ?= $(CC) -E
 AR        ?= $(CROSS_COMPILE)ar
 RANLIB    ?= $(CROSS_COMPILE)ranlib
-- 
2.20.1 (Apple Git-117)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to