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/opal-prd/Makefile | 2 -- 1 file changed, 2 deletions(-) (limited to 'external/opal-prd') diff --git a/external/opal-prd/Makefile b/external/opal-prd/Makefile index 32b85e5..7482af3 100644 --- a/external/opal-prd/Makefile +++ b/external/opal-prd/Makefile @@ -1,5 +1,3 @@ -CC = $(CROSS_COMPILE)gcc - CFLAGS += -m64 -Werror -Wall -g2 -ggdb LDFLAGS += -m64 ASFLAGS = -m64 -- cgit v1.1