Re: MIPS Makefile not picking up CROSS_COMPILE from environment setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 18 Oct 2007 20:46:36 +0200, Wolfgang Denk <wd@xxxxxxx> wrote:
> diff --git a/arch/mips/Makefile b/arch/mips/Makefile
> index 08355eb..caa04a0 100644
> --- a/arch/mips/Makefile
> +++ b/arch/mips/Makefile
> @@ -43,7 +43,7 @@ UTS_MACHINE		:= mips64
>  endif
>  
>  ifdef CONFIG_CROSSCOMPILE
> -CROSS_COMPILE		:= $(tool-prefix)
> +CROSS_COMPILE		?= $(tool-prefix)
>  endif
>  
>  ifdef CONFIG_32BIT

This would not work as expected if CROSS_COMPILE environment variable
did not exist.  The toplevel Makefile always assigns an empty string
to CROSS_COMPILE before this, so $(tool-prefix) would not be used at
all.

If we needed to keep CONFIG_CROSSCOMPILE as is and needed
CROSS_COMPILE environment variable, something like this might work.

ifdef CONFIG_CROSSCOMPILE
ifndef CROSS_COMPILE
CROSS_COMPILE		:= $(tool-prefix)
endif
endif

---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux