🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50252

gcc 2.5.2 static constructor/destructor compile problem

#50252
From: pmr
Date: Fri, 05 Nov 1993 09:32
89 lines
3951 bytes
System: m88k-dg-dgux (AViiON AV/532 DG/UX 5.4R2.01)
Compiler: gcc-2.5.2 with the following patches:

*** dgux.h.orig	Sat Oct  2 04:20:57 1993
--- dgux.h	Tue Nov  2 22:10:27 1993
***************
*** 107,113 ****
     When the -G link option is used (-shared and -symbolic) a final link is
     not being done.  */
  #undef	LIB_SPEC
! #define LIB_SPEC "%{!shared:%{!symbolic:-lc}} crtend.o%s"
  #undef	LINK_SPEC
  #define LINK_SPEC "%{z*} %{h*} %{V} %{v:%{!V:-V}} \
  		   %{static:-dn -Bstatic} \
--- 107,113 ----
     When the -G link option is used (-shared and -symbolic) a final link is
     not being done.  */
  #undef	LIB_SPEC
! #define LIB_SPEC "%{msvr4:%{!shared:-lstaticdgc}} %{!shared:%{!symbolic:-lc}} crtend.o%s"
  #undef	LINK_SPEC
  #define LINK_SPEC "%{z*} %{h*} %{V} %{v:%{!V:-V}} \
  		   %{static:-dn -Bstatic} \
***************
*** 121,129 ****
  			 %{svr4:%{ansi:/lib/values-Xc.o} \
  			  %{!ansi:%{traditional:/lib/values-Xt.o} \
  			   %{!traditional:/usr/lib/values-Xa.o}}}}}"
- 
- #undef	GPLUSPLUS_INCLUDE_DIR
- #define GPLUSPLUS_INCLUDE_DIR "/usr/opt/g++/lib/g++-include"
  
  /* Fast DG/UX version of profiler that does not require lots of
     registers to be stored.  */
--- 121,126 ----


Then attempting to configure groff-1.07, I received the following
error:

$ CC=xgcc CCC=xgcc ./configure m88k-dg-dgux --prefix=/usr/gnu
checking that C++ compiler can compile very simple C++ program
checking that C++ static constructors and destructors are called
xgcc is not installed correctly: static constructors and destructors do not work
$

Here is the snippet that groff/configure is executing:

extern "C" {
  void exit(int);
  void _exit(int);
}
int i;
struct A {
  char dummy;
  A() { i = 1; }
  ~A() { if (i == 1) _exit(0); }
};
A a;
main() { exit(1); }

and the shell log:

$ xgcc -v conftest.cc -o conftest
Reading specs from /usr/gnu/lib/gcc-lib/m88k-dg-dgux/2.5.2/specs
gcc version 2.5.2
 /usr/gnu/lib/gcc-lib/m88k-dg-dgux/2.5.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=5 -Dm88000 -Dm88k -Dunix -DDGUX -D__CLASSIFY_TYPE__=2 -D__svr4__ -D__m88000__ -D__m88k__ -D__unix__ -D__DGUX__ -D__CLASSIFY_TYPE__=2 -D__svr4__ -D__m88000 -D__m88k -D__unix -D__DGUX -D__CLASSIFY_TYPE__=2 -D__svr4__ -Asystem(unix) -Asystem(svr4) -Acpu(m88k) -Amachine(m88k) -D__OPEN_NAMESPACE__ -D_DGUXCOFF_TARGET conftest.cc /tmp/cca02787.i
GNU CPP version 2.5.2 (88open OCS/BCS, 12/16/92)
#include "..." search starts here:
#include <...> search starts here:
 /usr/gnu/lib/g++-include
 /usr/local/include
 /usr/gnu/m88k-dg-dgux/include
 /usr/gnu/lib/gcc-lib/m88k-dg-dgux/2.5.2/include
 /usr/include
End of search list.
 /usr/gnu/lib/gcc-lib/m88k-dg-dgux/2.5.2/cc1plus /tmp/cca02787.i -quiet -dumpbase conftest.cc -version -o /tmp/cca02787.s
GNU C++ version 2.5.2 (88open OCS/BCS, 12/16/92) compiled by GNU C version 2.5.2.
conftest.cc: In method `A::A(const struct A &)':
conftest.cc:11: structure has no member named `dummy'
conftest.cc:11: class `A' does not have any field named `dummy'
$


I cannot be certain whether this is a groff or gcc problem, hence the
plea for help.  I'll dig deeper if someone will give me a clue on
where to start looking.

Paul Reilly					Pajato Systems Group
919-847-7294					pmr@pajato.com
Technical Details
Message-ID: <9311050927.AA02817@pajato.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!pajato.com!pmr

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,72c054354786f894,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-11-05 01:47:13 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!pajato.com!pmr
From: pmr@pajato.com
Newsgroups: gnu.gcc.help
Subject: gcc 2.5.2 static constructor/destructor compile problem
Date: 5 Nov 1993 04:32:55 -0500
Organization: GNUs Not Usenet
Lines: 89
Sender: daemon@cis.ohio-state.edu
Distribution: gnu
Message-ID: <9311050927.AA02817@pajato.com>