Date: Tue, 21 Oct 1997 13:03:14 +0200 (IST) From: Eli Zaretskii To: Ed Wallace cc: djgpp AT delorie DOT com, DJ Delorie Subject: Re: compiling C++ with -a switch In-Reply-To: <8878ADA6D7A@ami1.md.essd.northgrum.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 20 Oct 1997, Ed Wallace wrote: > I'm trying to compile a program using the -a option so that I can > automate branch coverage of my program when testing it. There should > be a bb.out file produced when the program is run but there isn't. > Does anyone know what I'm doing wrong? This seems to be a bug in the way libgcc.a is compiled when GCC is built. The HAVE_ATEXIT symbol is not defined in the DJGPP-specific headers, and so the code which installs the coverage-reporting function to be called at program exit is ifdef'ed away. I added the missing definition (see the patch below) and rebuilt libgcc.a; linking a test program with the patched library produced bb.out as you'd expect. I can mail you uuencoded libgcc.a, if you need this feature to work but don't want to rebuild GCC. diff -c config/i386/go32.h~0 config/i386/go32.h *** config/i386/go32.h~0 Fri May 12 17:24:30 1995 --- config/i386/go32.h Tue Oct 21 12:07:12 1997 *************** *** 7,12 **** --- 7,14 ---- #define YES_UNDERSCORES + #define HAVE_ATEXIT + #include "i386/gas.h" #ifdef CPP_PREDEFINES