[Skiboot] [PATCH 2/6] pflash: include ccan/list/list.c to be able to build -DDEBUG

Stewart Smith stewart at linux.vnet.ibm.com
Mon Jul 17 19:13:56 AEST 2017


This enables some extra linked list checking

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 external/pflash/rules.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/external/pflash/rules.mk b/external/pflash/rules.mk
index e3e70aebb10b..85484cb2536c 100644
--- a/external/pflash/rules.mk
+++ b/external/pflash/rules.mk
@@ -4,8 +4,11 @@ override CFLAGS  += -O2 -Wall -I.
 LIBFLASH_FILES	:= libflash.c libffs.c ecc.c blocklevel.c file.c
 LIBFLASH_OBJS	:= $(addprefix libflash-, $(LIBFLASH_FILES:.c=.o))
 LIBFLASH_SRC	:= $(addprefix libflash/,$(LIBFLASH_FILES))
+CCAN_FILES	:= list.c
+CCAN_OBJS	:= $(addprefix ccan-list-, $(CCAN_FILES:.c=.o))
+CCAN_SRC	:= $(addprefix ccan/list/,$(CCAN_FILES))
 PFLASH_OBJS	:= pflash.o progress.o version.o common-arch_flash.o
-OBJS		:= $(PFLASH_OBJS) $(LIBFLASH_OBJS)
+OBJS		:= $(PFLASH_OBJS) $(LIBFLASH_OBJS) $(CCAN_OBJS)
 EXE     	:= pflash
 sbindir		?= /usr/sbin
 
@@ -37,9 +40,14 @@ version.c: .version
 
 $(LIBFLASH_SRC): | links
 
+$(CCAN_SRC): | links
+
 $(LIBFLASH_OBJS): libflash-%.o : libflash/%.c
 	$(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
 
+$(CCAN_OBJS): ccan-list-%.o: ccan/list/%.c
+	$(Q_CC)$(CC) $(CFLAGS) -c $< -o $@
+
 $(EXE): $(OBJS)
 	$(Q_CC)$(CC) $(LDFLAGS) $(CFLAGS) $^ -lrt -o $@
 
-- 
2.13.0



More information about the Skiboot mailing list