[CRIU] [PATCH] tools.mk: Define CC if not set to 'default'

Zhang, Ning A ning.a.zhang at intel.com
Fri Apr 12 04:29:47 MSK 2019


Build passes with Cross compile using Android NDK/Clang.

w/o this patch, CC is default value, so does LD?

apply same change to LD? 

BR.
Ning.

在 2019-04-11四的 10:21 +0100,Radostin Stoyanov写道:
> 	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



More information about the CRIU mailing list