From 3137d249ba10ad6fa7a52486cdacddfab7419189 Mon Sep 17 00:00:00 2001 From: Patrick Williams Date: Thu, 14 Apr 2016 12:54:20 -0500 Subject: pflash: Allow building under yocto. The makefiles under external/* utilize the $(CROSS_COMPILE) variable to determine the cross-compiler prefix. In a few places, $(CROSS_COMPILE)gcc is called instead of $(CC). The issue with this is that yocto build passes some compile flags as part of $(CC) instead of $(CFLAGS), the most important of these is '--sysroot=...'. Without the proper --sysroot flag, pflash compile fails to find critical libc headers like stdio.h. This change delegates setting of $(CC) and $(LD) to external/common/rules.mk, which is widely used in the external tree, and ensures that: 1) $(CC) is used instead of $(CROSS_COMPILE)gcc. 2) CC is only set when not passed from the environment. Signed-off-by: Patrick Williams Reviewed-by: Joel Stanley Signed-off-by: Stewart Smith --- external/gard/rules.mk | 2 -- 1 file changed, 2 deletions(-) (limited to 'external/gard') diff --git a/external/gard/rules.mk b/external/gard/rules.mk index f0086a2..0dd14ed 100644 --- a/external/gard/rules.mk +++ b/external/gard/rules.mk @@ -7,8 +7,6 @@ OBJS += $(LIBFLASH_OBJS) OBJS += common-arch_flash.o EXE = gard -CC = $(CROSS_COMPILE)gcc - prefix = /usr/local/ sbindir = $(prefix)/sbin datadir = $(prefix)/share -- cgit v1.1