Mail Archives: djgpp/1998/01/21/18:40:14
At 01:39 1/21/1998 +0100, A.P. Zijlstra wrote:
>some more specifics... in building libgcc2.a it iterates trough an for
>loop in the makefile, compiling a bunch of object files from the same
>file (libgcc2.c), every compilation has other defines (xgcc -DL${name}).
>it trashes in the '_bb' section. I'm still trying to figure out what
>exactly is going wrong as I assume the code is correct (I might hope it
>acctualy compiles under most hosts especially real UNiX
>implementations).
I recall something being funny with the bb profiling. There was a patch
posted, by Eli I think, that made it work for 2.7.2.1. I'll include it here,
maybe it will help illuminate something.
---cut---
*** libgcc2.c~0 Sun Nov 26 19:39:20 1995
--- libgcc2.c Tue Oct 21 17:26:40 1997
***************
*** 1611,1616 ****
--- 1611,1627 ----
}
}
+ #ifdef ON_EXIT
+ # define INSTALL_BB_EXIT(FUNC) ON_EXIT (__bb_exit_func, 0)
+ #else
+ # ifdef __DJGPP__
+ extern void atexit (void (*) (void));
+ # define INSTALL_BB_EXIT(FUNC) atexit (FUNC)
+ # else
+ # undef INSTALL_BB_EXIT
+ # endif
+ #endif
+
void
__bb_init_func (struct bb *blocks)
{
***************
*** 1620,1629 ****
if (blocks->zero_word)
return;
! #ifdef ON_EXIT
/* Initialize destructor. */
if (!bb_head)
! ON_EXIT (__bb_exit_func, 0);
#endif
/* Set up linked list. */
--- 1631,1640 ----
if (blocks->zero_word)
return;
! #ifdef INSTALL_BB_EXIT
/* Initialize destructor. */
if (!bb_head)
! INSTALL_BB_EXIT (__bb_exit_func);
#endif
/* Set up linked list. */
---cut---
HTH
Nate Eldredge
eldredge AT ap DOT net
- Raw text -