build: use C{C/XX} as HOSTC{C/XX} if we are not cross-compiling
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 28 Apr 2016 13:11:19 +0000 (15:11 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 28 Apr 2016 13:11:19 +0000 (15:11 +0200)
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
Config.mk

index 9b097c9831806383e6c4438c68d3f881c8837de5..7b2fe7f579f92c554b4cc239715bbc2ec49de989 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -45,6 +45,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)