diff options
author | Patrick Georgi <pgeorgi@google.com> | 2020-07-06 15:31:58 +0000 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-07-08 08:53:46 +0000 |
commit | b351875f1ebd48a25db3e4eab6e0a0b036550941 (patch) | |
tree | 3bb79a9eab6d8cf7533dd125f5e7cf605619c8e6 | |
parent | 793bf7e605e7451db47af0b47d7135767549a09c (diff) | |
download | coreboot-b351875f1ebd48a25db3e4eab6e0a0b036550941.tar.xz |
build system: Rely on xcompile for HOSTCC and HOSTCXX
It already looks for them, so let's use the result instead
of blindly defaulting to gcc/g++, except when not building an image
(but run kconfig or tests) because we don't use xcompile in those cases.
Change-Id: I3e50c70a609f1903a925610928f8779c191040d8
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43145
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r-- | Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -61,8 +61,6 @@ endif # Disable implicit/built-in rules to make Makefile errors fail fast. .SUFFIXES: -HOSTCC := $(if $(shell type gcc 2>/dev/null),gcc,cc) -HOSTCXX = g++ HOSTCFLAGS := -g HOSTCXXFLAGS := -g @@ -128,6 +126,11 @@ endif rm -f $@.tmp ifeq ($(NOCOMPILE),1) +# We also don't use .xcompile in the no-compile situations, so +# provide some reasonable defaults. +HOSTCC ?= $(if $(shell type gcc 2>/dev/null),gcc,cc) +HOSTCXX ?= g++ + include $(TOPLEVEL)/Makefile.inc include $(TOPLEVEL)/payloads/Makefile.inc include $(TOPLEVEL)/util/testing/Makefile.inc |