das@EDDIE.MIT.EDU (David Steffens) (02/12/90)
I am trying to install G++/LIBG++ from the most recent FSF tape (JAN-90)
on a Sun4/280 running SunOS4.0.3. I used config.g++ sun4-os4.
Therefore, tm.h -> ../gcc/config/sparc.h and md -> ../gcc/config/sparc.md.
-rw-rw-r-- 1 das staff 64712 Sep 1 20:46 sparc.md
-rw-rw-r-- 1 das staff 52504 Sep 18 14:59 tm-sparc.h
Everything seemed to be going fine until I tried to make LIBG++.
During the compile of stream.cc, I get the following:
g++ -I/local/src/gnu/libg++/g++-include -g -Wall -v -pipe -c stream.cc
g++ version 1.36.3 (based on GCC 1.36.92)
/usr/local/lib/gcc-cpp -+ -v -I/local/src/gnu/libg++/g++-include \
-undef -D__GNUC__ -D__GNUG__ -D__cplusplus -Dsparc -Dsun -Dunix \
-D__sparc__ -D__sun__ -D__unix__ -Wall stream.cc |
/usr/local/lib/gcc-cc1plus -quiet -dumpbase stream.cc -g -Wall -version -o - |
/usr/local/lib/gcc-as - -o stream.o
GNU CPP version 1.36
GNU C++ version 1.36.3 (based on GCC 1.36.92) (sparc) \
compiled by GNU C version 1.36.
default target switches: -mfpu -mepilogue
g++: Program cc1plus got fatal signal 6.
This behavior is consistent. As you can see, I have even tried turning off
all G++ optimizations per a note in libg++/README, but there was no change.
Therefore, I suspect it is a G++ compiler bug, or possibly a version mismatch
since GCC is quite a bit older than G++. See Changelog header lines, below.
At first, I thought I did something wrong when installing the various
components. That may yet prove to be the case, but I do not think so
because I have tried reinstalling various parts in various combinations
with the same result. Also:
1) BISON produces output which matches the files supplied with GCC.
2) GCC/GAS/GLD all seem to work OK. The combination can compile
small-to-medium-sized C programs which then run correctly.
3) G++ can compile simple C++ programs into object files.
Of course linking fails because LIBG++ is missing.
I'm not sure exactly what to send you. I have appended some stuff
which may be useful. I didn't include a copy of the source file
since it is right off the distribution tape. If you need anything else,
please let me know and I will send it out immediately. advTHANXance.
-----
Changelog header lines:
GCC -- Sun Sep 24 00:21:24 1989 Richard Stallman
G++ -- Tue Jan 16 00:38:39 1990 Michael Tiemann
LIBG++ -- Tue Jan 16 04:54:27 1990 Doug Lea
ADB stack trace:
core file = src/core -- program ``gcc-cc1plus''
SIGIOT 6: abort
_kill() + 8
_abort(0x1e,0x118,0xffffff78,0x4,0xdff71,0x1d) + 54
_output_63(0xfb150,0x1c7020,0xdd2f8,0xfc,0x4,0x8) + 3c
_final_scan_insn(0x3f,0x0,0x2,0x0,0x0,0x0) + dbc
_final(0x1b91b8,0xf63e4,0x2,0x0,0x0,0x1) + 64
_rest_of_compilation(0x1881c0,0x0,0x1,0x1070c8,0x0,0xfb340) + b3c
_finish_function(0x179898,0x188150,0x262,0x107148,0x43c08,0x100868) + 90c
_yyparse(0xf7fff948,0xc8,0xf7fff628,0x0,0xf7ffe364,0x3) + d74
_compile_file(0x0,0x64f30,0x9,0x61746120,0xf7fffd5a,0x6f004461) + ba8
_main(0x8,0x0,0x0,0x65124,0x0,0x0) + a40
The relevant code from g++/insn-output.c is:
static char *
output_63 (operands, insn)
rtx *operands;
rtx insn;
{
{
if (REG_P (operands[1]))
return "sll %1,0x10,%0\n\tsra %0,0x10,%0";
if (GET_CODE (operands[1]) == CONST_INT)
-->> abort ();
if (CONSTANT_ADDRESS_P (XEXP (operands[1], 0)))
{
cc_status.flags |= CC_KNOW_HI_G1;
cc_status.mdep = XEXP (operands[1], 0);
return "sethi %%hi(%m1),%%g1\n\tldsh [%%g1+%%lo(%m1)],%0";
}
else
return "ldsh %1,%0";
}
}
Disassembled tail of the truncated stream.o which results:
_op$arshift__7istreamRd+0x4e0: st %o1, [%g1]
stb %l2, [%o0]
ldsb [%fp - 0x31], %o0
clr %o1
cmp %o0, %o1
be _op$arshift__7istreamRd + 0x50c
nop
ldsb [%fp - 0x49], %o5
stb %o5, [%fp - 0x21]
ba _op$arshift__7istreamRd + 0x538
nop
ldsb [%fp - 0x41], %o0
clr %o1
cmp %o0, %o1
be _op$arshift__7istreamRd + 0x530
nop
ldsb [%fp - 0x49], %o5
stb %o5, [%fp - 0x19]
ba _op$arshift__7istreamRd + 0x538
nop
ldsb [%fp - 0x49], %o5
stb %o5, [%fp - 0x11]
ba _op$arshift__7istreamRd + 0x548
nop
ba _op$arshift__7istreamRd + 0x550
nop
ba _op$arshift__7istreamRd + 0x148
nop
sethi %hi(0x0), %l1
mov %l1, %l1
clr %l2
unimp 0x0
unimp 0x0
unimp 0x0
text address not found
-----
{harvard,mit-eddie,think}!eplunix!das David Allan Steffens
243 Charles St., Boston, MA 02114 Eaton-Peabody Laboratory
(617) 573-3748 Mass. Eye & Ear Infirmary