delorie.com/djgpp/bugs/show.cgi   search  
Bug 000054

When Created: 01/18/1996 10:10:14
Against DJGPP version: 2.00.beta4
By whom: Neil.Jarvis@proteon.com
Abstract: GCC 2.7.2 SunOS->DJGPP cross compiler fails to link images with libgpp.a
gcc-2.7.2 configured using:
 ./configure --target=i386-msdos-go32 --host=sparc-sun-sunos4.1.3

The resulting compiler generates errors when it tries to link an image with
libgcc.a It complains about multiple definitions of _exit() and a missing 
reference to _cleanup(). Removing -lgpp from the link stage allows the 
compiler to produce working images.

Solution added: 01/18/1996 10:13:55
By whom: Neil.Jarvis@proteon.com
The problem is that the cross compiler doesn't think that the target
system has an atexit() capability. It therefore insists on adding an
exit() function to libgpp.a, which conflicts with the version in libc.a

This can be fixed by adding the line 

#define HAVE_ATEXIT

to the file gcc-2.7.2/config/i386/go32.h, before running the configure
command. The rebuilt cross compiler can now link an image with libgpp.a

Note added: 03/21/1997 10:50:48
By whom:



  webmaster     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010