Article View: gnu.gcc.help
Article #52507Duplicate -lg args from gcc.c cause stage 2 to fail
From: Daniel L. Flamm
Date: Sun, 12 Jul 1992 17:12
Date: Sun, 12 Jul 1992 17:12
81 lines
4794 bytes
4794 bytes
Dear bug-gcc@prep.ai.mit.edu and help-gcc@prep.ai.mit.edu,
I have been trying to put gcc up on my Integrated Solutions (isi68)
workstation. So far, I've encountered several minor problems which I've
fixed or worked around, and one serious one which I am hoping you can
email me a solution for.
First the serious problem.
Problem Description: gcc.c (Version 2.2.1) places two "-lg" arguments in
===================
the linker command line. This causes libg.a to be included twice and
"multiply defined symbols" cause linking to fail during stage 2. Help!
l. Stage1 of gcc is made by the existing compiler (this is the Green Hills
Compiler which was used by isi). I used arguments --target=m68k-isi68-bsd.
(All other choices with isi68 failed). The isi machine is a VME bus 68020
with 68882 and 10M memory running bsd4.3 (a dual port, really). The native
compiler is Green Hills. Native assembler is isi.
2. Options to configure were to use the native loader and assembler
(e.g. did not use the flag -withgnu-as or -with-gnu-ld) so that loading
uses collect2.c. (The native assembler failed on at least one module,
so I substituted an old copy of a compiled "gas" (early version, unknown
origen) which someone had given me long ago, to get through the make (not
relevant for the above problem).
3. The first stage "make" failed when it tried to make "enquire." I determined
that the problem was that "-lg" appears two times on the loader command.
This causes the load to fail because libg.a is not really a library, rather it
is an assembled routine which has to be included in the load module.
Following is a test case which was output by using the -v flag, I have "flagged"
the problem:
?Reading specs from stage1/specs
?gcc version 2.2.1
? stage1/cpp -lang-c -v -DNO_SC -DNO_MEM -DNO_STDDEF -I. -undef -D__GNUC__=2 -Dunix -Dmc68000 -Dis68k -D__unix__ -D__mc68000__ -D__is68k__ -D__unix -D__mc68000 -D__is68k -D__OPTIMIZE__ -g -D__HAVE_68881__ enquire.c /usr/tmp/cc002152.i
?GNU CPP version 2.2.1 (68k, MIT syntax)
? stage1/cc1 /usr/tmp/cc002152.i -quiet -dumpbase enquire.c -g -O0 -version -o /usr/tmp/cc002152.s
?GNU C version 2.2.1 (68k, MIT syntax) compiled by CC.
? as -o enquire.o /usr/tmp/cc002152.s
?gcc version 2.2.1
**PROBL***> ? ld /lib/crt0.o -L. -L/usr/local/lib enquire.o -lgcc -lg -lmc -lg -lgcc
?__dbsubc: ld:/usr/lib/libg.a: multiply defined
?__dbsubn: /usr/lib/libg.a: multiply defined
?__lg_flag: /usr/lib/libg.a: multiply defined
?stage1/gcc: file path prefix `./' never used
4. The difficulty is evidently in gcc.c, which appears to generate the commands.
Although this is sort of trivial, it is a serious problem. I am having trouble
finding where the duplicate argument is generated because gcc.c seems intricate
and hard to read. I cannot run stage 2 because the make now "barfs" at every
load. I would really appreciate a "quick fix" if someone would be kind enough
to take a look.
======================================================================
Footnote, for your info: The only other problem I had in just getting the
stage 1 to run was that STRUCTURE_SIZE_BOUNDARY was not defined in
isi68.h which came with the package. I set it to 16 because that
is what it is set to for most/all of the other 68020/68000 machines
with existing configurations. I believe this is very likely to be
correct. I can run some tests however if you would like me to.
I am also sending output from the makes I ran, in case you are interested
(not really relevant for these problems). The will be in a tarmail file.
The output files are ut, ut1, ut2.... which represent successive runs of
"make" after the procedure stopped because of simple blemishes or errors.
I would greatly appreciate a quick response to the duplicate -lg problem
if possible. Thank you for your help and courtesy.
dan flamm
--
Daniel L. Flamm
dlf@pronto.pacbell.com OR dlf@eecs.berkeley.edu OR uunet!likewise!pronto!dlf
Dept. Elec. Engr. & Computr. Science, 187M Cory
Univ. Calif. at Berkeley, Berkeley, CA 94720
FAX: (510) 643-8426 OFFICE: (510) 642-6137
Technical Details
Message-ID:
<9207121734.AA23302@ns.PacBell.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pronto.pacbell.COM!dlfShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,2683b42f675bb954,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-07-12 04:26:02 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!pronto.pacbell.COM!dlf From: dlf@pronto.pacbell.COM (Daniel L. Flamm) Subject: Duplicate -lg args from gcc.c cause stage 2 to fail Message-ID: <9207121734.AA23302@ns.PacBell.COM> Sender: daemon@cis.ohio-state.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sun, 12 Jul 1992 17:12:49 GMT Lines: 82