From 5600c4f20304d1a6c5f763a0c86f1a95f7bac47d Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 16 Oct 2001 00:23:58 +0000 Subject: Set up different flags for debugging and production; change an assert(0); to abort(); so it works for production as well. --- Makefile | 5 ++++- alloc.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0ea28af..31de296 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,10 @@ OSOBJ = objstore.o alloc.o OSPICOBJ = $(patsubst %.o,%.pic.o,$(OSOBJ)) CC = gcc -CFLAGS = -Wall -O2 -g -D_FILE_OFFSET_BITS=64 +# This is a reasonable set of flags for production +# CFLAGS = -Wall -O3 -fomit-frame-pointer -DNDEBUG -D_FILE_OFFSET_BITS=64 +# This is for debugging +CFLAGS = -Wall -O -g -D_FILE_OFFSET_BITS=64 PICFLAGS = $(CFLAGS) -fPIC SOFLAGS = -shared diff --git a/alloc.c b/alloc.c index dce15d3..02087e6 100644 --- a/alloc.c +++ b/alloc.c @@ -635,7 +635,7 @@ static struct buddy_params objstore_find_alloc_buddy(void *ptr) } } - assert(0); /* Freeing bogus memory? */ + abort(); /* Freeing bogus memory? */ } static void objstore_free_buddy(void *ptr) -- cgit v1.2.3