[Skiboot] [PATCH] external: Fix cross compilation issue

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Thu Aug 4 18:41:01 AEST 2016


On 08/04/2016 01:35 PM, Vasant Hegde wrote:
> For some reason Makefile thinks compiler variables like CC is already
> assigned and ignores CROSS_COMPILE variable. Hence I'm not able to generate
> arm binary on x86.
>

Stewart,

I missed Cyril's patch before sending v2.  This patch is pretty much similar to 
Cyril's patch.

-Vasant

> This patch checks for CROSS_COMPILE variable and does forceful setting of
> CC and LD variables.
>
> Fixes: 3137d249 (pflash: Allow building under yocto.)
> CC: Patrick Williams <patrick at stwcx.xyz>
> CC: Stewart Smith <stewart at linux.vnet.ibm.com>
> Suggested-by: Oliver O'Halloran <oohall at gmail.com>
> Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
> ---
>   external/common/rules.mk | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/external/common/rules.mk b/external/common/rules.mk
> index bb12fd5..59e8905 100644
> --- a/external/common/rules.mk
> +++ b/external/common/rules.mk
> @@ -1,5 +1,8 @@
> -CC ?= $(CROSS_COMPILE)gcc
> -LD ?= $(CROSS_COMPILE)ld
> +ifdef CROSS_COMPILE
> +CC = $(CROSS_COMPILE)gcc
> +LD = $(CROSS_COMPILE)ld
> +endif
> +
>   ARCH := $(shell $(GET_ARCH) "$(CROSS_COMPILE)")
>
>   ifeq ($(ARCH),ARCH_ARM)
>



More information about the Skiboot mailing list