[CRIU] [PATCH] tools.mk: Define CC if not set to 'default'
Radostin Stoyanov
rstoyanov1 at gmail.com
Thu Apr 11 12:21:37 MSK 2019
FOO ?= bar
is equivalent to
ifeq ($(origin FOO), undefined)
FOO = bar
endif
However, when CC is not set its value is 'default' rather than
'undefined'.
Signed-off-by: Radostin Stoyanov <rstoyanov1 at gmail.com>
---
scripts/nmk/scripts/tools.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/nmk/scripts/tools.mk b/scripts/nmk/scripts/tools.mk
index d756358d5..e62172dd9 100644
--- a/scripts/nmk/scripts/tools.mk
+++ b/scripts/nmk/scripts/tools.mk
@@ -6,7 +6,9 @@ RM := rm -f
HOSTLD ?= ld
LD ?= $(CROSS_COMPILE)$(HOSTLD)
HOSTCC ?= gcc
-CC ?= $(CROSS_COMPILE)$(HOSTCC)
+ifeq ($(origin CC), default)
+CC := $(CROSS_COMPILE)$(HOSTCC)
+endif
CPP := $(CC) -E
AS := $(CROSS_COMPILE)as
AR := $(CROSS_COMPILE)ar
--
2.20.1
More information about the CRIU
mailing list