delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/21/18:40:14

Date: Wed, 21 Jan 1998 15:39:11 -0800 (PST)
Message-Id: <199801212339.PAA05774@adit.ap.net>
Mime-Version: 1.0
To: peter AT no DOT spam DOT mcs DOT nl, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: DJ port of GCC 2.8.0?

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019