On 2016-08-31 02:17, Peng Fan wrote:
> To some toolchains, need to pass sysroot to gcc.
> If directly assign $(CROSS_COMPILE)gcc to CC, there is
> no chance to pass sysroot to gcc.
> 
> So, checking whether CC is set in user bash environment,
> if not set, choose $(CROSS_COMPILE)gcc.
> 
> In my case, I have this in my bash script:
> export CC="aarch64-poky-linux-gcc  --sysroot=$SDKTARGETSYSROOT"
> 
> Signed-off-by: Peng Fan <[email protected]>
> ---
>  tools/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tools/Makefile b/tools/Makefile
> index 6975a76..9f62f2a 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -10,7 +10,9 @@
>  # the COPYING file in the top-level directory.
>  #
>  
> +ifeq ($(CC), )
>  CC = $(CROSS_COMPILE)gcc
> +endif

Let's use "CC ?= ..." for this.

Jan

>  
>  CFLAGS = -g -O3 -I../driver -DLIBEXECDIR=\"$(libexecdir)\" \
>       -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Werror \
> 


-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to