newton@cme.nist.gov (Eric Newton) (01/13/90)
I've tried everything that I can think of to get g++ working on a
sun386. What do I have to do? I use
config.g++ sun386
COFFLAGS = -DUSE_COLLECT -DCOFF -DNO_UNDERSCORES
and collect. I do not use gas. Collect seems to be working and
picking up the right symbols, yet I keep getting:
__CTOR_LIST__: ld: /usr/tmp/cca?????.O: multiply defined
I am trying to build g++-1.36.1 from prep. The source seems to
indicate support for this architecture, but it is unclear what other
options I should be trying.
Thanks.
-Eric
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
newton@cme.nist.gov Eric C. Newton
Computer Scientist
(Looking for something witty to put here) NIST (formerly NBS)
Gaithersburg, MD 20899balen%camscan.uucp@NSFNET-RELAY.AC.UK (henry Balen) (01/17/90)
I have managed to get g++ 1.36.2 up and running on the sun386. I had a lot of problems with 1.36.1 in that when I did get the compiler to work it produced code that crashed!
I have listed the changes that I found necessary for 1.36.2 below. I hope that these are of some help.
Henry Balen <balen%camscan.uucp@uk.ac.ukc>
Camscan, Saxon Way, Bar Hill, Cambridge CB3 0JE, United Kingdom.
--------------------------------------------------------------------------
In xm-sun386i.h at line 47
#define LINK_SPEC "%{!e*:-e _start} -dc -dp %{g:-Bstatic}"
to
#define LINK_SPEC "%{!e*:} -Bstatic "
--------------------------------------------------------------------------
In crt0.c
the
__do_global_init()
and
__do_global_cleanup()
needed to be removed (I put ifndef COFF round them).
--------------------------------------------------------------------------
In tm-sun386i.h at line 34
#define STARTFILE_SPEC \
"%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
to
#define STARTFILE_SPEC \
"%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0+.o%s}}"
--------------------------------------------------------------------------
In gcc.c at line 306
ld %{o*} %g.R %g.O
to
ld -Bstatic -e _start %{o*} %g.R %g.O -L/vol/local/lib.sun386\n\
and at line 310
char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -o %g.R %l\
to
char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -L/vol/local/lib.sun386 -o %g.R %l\tiemann@AI.MIT.EDU (Micheal Tiemann) (01/17/90)
I put this information in the HINTS file. Michael