Date: Wed, 21 Jan 1998 15:39:11 -0800 (PST) Message-Id: <199801212339.PAA05774@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: peter AT no DOT spam DOT mcs DOT nl, djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: DJ port of GCC 2.8.0? Precedence: bulk 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