From patchwork Wed Sep 16 05:30:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: patch: always build cbfstool -g; problem with segv. Date: Wed, 16 Sep 2009 05:30:53 -0000 From: ron minnich X-Patchwork-Id: 254 Message-Id: <13426df10909152230q8a6f744g662070788a447293@mail.gmail.com> To: coreboot I'm getting this on dell s1850: rm -f ./coreboot.rom cat fallback/coreboot.rom > ./coreboot.rom.bootblock ./cbfs/cbfstool ./coreboot.rom create 1048576 90112 ./coreboot.rom.bootblock ./cbfs/cbfstool ./coreboot.rom add-payload /tmp/filo.elf fallback/payload make: *** [coreboot.rom] Segmentation fault make: *** Deleting file `coreboot.rom' And gdb is unhappy. So here's a patch to make our life easier: You might care about performance but in fact there's not enough of a difference to matter or even be measured. And, when I get a segv, it's nice to have it debuggable. And there's certainly no need to strip the binary ... Index: util/cbfstool/Makefile =================================================================== --- util/cbfstool/Makefile (revision 4636) +++ util/cbfstool/Makefile (working copy) @@ -2,7 +2,9 @@ HOSTCXX ?= g++ HOSTCC ?= gcc +CFLAGS ?= -g + BINARY:=$(obj)/cbfstool COMMON:=common.o compress.o minilzma.o @@ -43,9 +45,8 @@ ctags *.[ch] CXXFLAGS=-DCOMPACT -CFLAGS= -LDFLAGS= +CFLAGS=-g +LDFLAGS=-g $(obj)/cbfstool:$(COMMON) $(HOSTCXX) $(LDFLAGS) -o $@ $^ - strip $@