Mail Archives: djgpp/1997/10/21/07:08:08
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
- Raw text -