--- Makefile Mon Apr 14 15:21:17 2003 +++ Makefile Sun Apr 20 23:28:17 2003 @@ -3,9 +3,11 @@ # include config.mak CFLAGS=-O2 -g -Wall +ifeq ($(OS),"Linux") LIBS=-ldl +endif CFLAGS_P=$(CFLAGS) -pg -static -DCONFIG_TCC_STATIC LIBS_P= CFLAGS+=-mpreferred-stack-boundary=2 @@ -163,9 +165,9 @@ libtcc.a: libtcc.o $(AR) rcs $@ $^ libtcc_test: libtcc_test.c libtcc.a - $(CC) $(CFLAGS) -I. -o $@ $< -L. -ltcc -ldl + $(CC) $(CFLAGS) -I. -o $@ $< -L. -ltcc $(LIBS) libtest: libtcc_test ./libtcc_test --- bcheck.c Mon Apr 14 15:21:17 2003 +++ bcheck.c Sun Apr 20 23:28:17 2003 @@ -777,13 +777,13 @@ } } #ifndef CONFIG_TCC_MALLOC_HOOKS -void *__bound_calloc(size_t nmemb, size_t size) +void *__bound_calloc(size_t nmemb, size_t size, const void *caller) { void *ptr; size = size * nmemb; - ptr = __bound_malloc(size); + ptr = __bound_malloc(size,caller); if (!ptr) return NULL; memset(ptr, 0, size); return ptr; --- configure Mon Apr 14 15:21:17 2003 +++ configure Sun Apr 20 23:28:17 2003 @@ -29,8 +29,9 @@ host_cc="gcc" ar="ar" make="make" strip="strip" +os=`uname` cpu=`uname -m` case "$cpu" in i386|i486|i586|i686|i86pc|BePC) cpu="x86" @@ -210,8 +211,9 @@ echo "Manual directory $mandir" echo "Source path $source_path" echo "C compiler $cc" echo "make $make" +echo "OS $os" echo "CPU $cpu" echo "Big Endian $bigendian" echo "gprof enabled $gprof" @@ -234,8 +236,9 @@ echo "AR=$ar" >> config.mak echo "STRIP=$strip -s -R .comment -R .note" >> config.mak echo "CFLAGS=$CFLAGS" >> config.mak echo "LDFLAGS=$LDFLAGS" >> config.mak +echo "OS=$os" >> config.mak if test "$cpu" = "x86" ; then echo "ARCH=i386" >> config.mak echo "#define HOST_I386 1" >> $TMPH elif test "$cpu" = "armv4l" ; then