🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #53320

undefined __DTORS_LIST__ on i386-isc (gcc2.0)

#53320
From: Joel Riedesel ()
Date: Thu, 27 Feb 1992 14:13
51 lines
2834 bytes
I've been having a problem compiling gcc2.0 using i386-isc as the
configure option.  From looking at the config directory, and the links
setup by configure, this seems to be correct for SysVR3 on i386.

The problem I would get would be when enquire.o was being linked by gcc.
My loader would find __DTORS_LIST__ undefined.
It seems that this problem will only arise for i386 and m88k types of machines
from what I can tell in the config directory (as usual, there is much magic
in here that I don't understand... :-)).

However, by poking around enough and finding a couple of -D types of definitions
that seem relevant (namely DO_GLOBAL_DTORS_BODY and INIT_SECTION_ASM_OP),
it seemed plausible that an "#ifndef INIT_SECTION_ASM_OP" in libgcc2.c should
really be "#ifdef INIT_SECTION_ASM_OP".  Now, I could be completely mistaken,
but when I changed the ifndef to an ifdef (line 1308 in the distribution BTW)
everything seems to work great.  I haven't compiled and tested C++ or
objective-C so it is quite possible that I may have actually broken 
something.  I haven't even had much time to exercise gcc2.0 itself except
on a simple benchmarking program (nice to see about a 20% performance
improvement over gcc1.39 (or is it 1.40?)!).

Anyway, if anyone can confirm that this is the correct fix I would
appreciate it.  For those having similar problems here is a context
diff that illustrates the relevant code in libgcc2.c:

*** libgcc2.c   Thu Feb 27 07:00:30 1992
--- libgcc2-new.c       Thu Feb 27 07:01:17 1992
***************
*** 1304,1312 ****
     the right values.  */

  /* We declare the lists here with two elements each,
     so that they are valid empty lists if no other definition is loaded.  */
! #ifndef INIT_SECTION_ASM_OP
  func_ptr __CTOR_LIST__[2];
  func_ptr __DTOR_LIST__[2];
  #endif /* INIT_SECTION_ASM_OP */

--- 1304,1312 ----
     the right values.  */

  /* We declare the lists here with two elements each,
     so that they are valid empty lists if no other definition is loaded.  */
! #ifdef INIT_SECTION_ASM_OP
  func_ptr __CTOR_LIST__[2];
  func_ptr __DTOR_LIST__[2];
  #endif /* INIT_SECTION_ASM_OP */

-- 
Joel Riedesel
riedesel@glass.den.mmc.com
Technical Details
Message-ID: <1992Feb27.141339.22347@den.mmc.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!darwin.sura.net!gatech!purdue!yuma!csn!news.den.mmc.com!jarrett!riedesel

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,282969a8fc8d15e2,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-02-27 06:59:08 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!darwin.sura.net!gatech!purdue!yuma!csn!news.den.mmc.com!jarrett!riedesel
From: riedesel@glass.den.mmc.com (Joel Riedesel ())
Newsgroups: gnu.gcc.help
Subject: undefined __DTORS_LIST__ on i386-isc (gcc2.0)
Message-ID: <1992Feb27.141339.22347@den.mmc.com>
Date: 27 Feb 92 14:13:39 GMT
Sender: riedesel@jarrett (Joel Riedesel ())
Organization: Martin Marietta Astronautics Group
Lines: 51