[gnu.g++.bug] g++

fair%cobweb.sw.MCC.COM@MCC.COM (Kim Michael Fairchild) (09/08/89)

Hi,

I am trying to get g++ going on a Sparc, but the problem I am having
seems to stem from a problem in gcc.

I traced this problem to the "demand page shared library" executables
contructed by default.  I have no idea on how to fix the problem but
here is a kludge solution.

Normal compile:

> gcc -B../gcc/ -g -DSOS -DESKIT  -o genrecog genrecog.o rtl.o obstack.o   
> ./genrecog md > tmp-insn-recog.c
Segmentation fault
>

Kludge compile:

> gcc -B../gcc/ -N -g -DSOS -DESKIT  -o genrecog2 genrecog.o rtl.o obstack.o   
> ./genrecog2 md > tmp-insn-recog.c
>


Notice that the -N option gets passed to the ld which turned off the
-Bdynamic binding

> file genrec*

genrecog:	sparc demand paged shared library executable not stripped
genrecog2:	sparc executable not stripped


This kludge is certain not desireable since we would have to modify
gcc/g++ and any other application Makefiles to pass the -N option.  Has
anyone found a solution for it yet?

Kim.

p.s. By the way, to get tedit to compile in gnu emacs, you also have
to use the -Bstatic option (on a Sparc).

p.s. Also, the top-level Makefile seems to have major errors, some of
them are even syntax errors. Would it be possible to send me a more up
to date one?

rfg@ICS.UCI.EDU (01/22/90)

// g++-01219001.bug.C

// The following file causes g++ 1.36.2 to abort.

struct s0;

void function (struct s0 &arg1, struct s0 &arg2)
{
  arg1 = arg2;
}