public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Problems with --enable-shared on mips-sgi-irix6.x
@ 1997-12-01 19:30 Lee Iverson
  0 siblings, 0 replies; only message in thread
From: Lee Iverson @ 1997-12-01 19:30 UTC (permalink / raw)
  To: egcs

Virtually no C++ files will link with this configuration.  An example
comes from libio testsuite (from libio.log):

--
Running ../../../../libio/testsuite/libio.tests/hounddog.exp ...
Executing on host: /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/xgcc -B/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/ ../../../../libio/testsuite/../tests/hounddog.cc  -O3 -I.. -I../../../../libio/testsuite/..  -nostdinc++ -I/OPT/gnu/gcc/DIST-egcs-snapshot/libstdc++ -I/OPT/gnu/gcc/DIST-egcs-snapshot/libstdc++/stl -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libstdc++ -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libiberty  -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libiberty -g -lstdc++ -liberty   -lm  -o /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries/libio/testsuite/hounddog   
compiler exited with status 1
output is:
ld: WARNING 84: /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libiberty/libiberty.a is not used for resolving any symbol.
ld: ERROR 33: Unresolved text symbol "__register_frame" -- 1st referenced by /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/crtend.o.
ld: INFO 60: Output file removed because of error.
collect2: ld returned 2 exit status

FAIL: hounddog.cc compilation 
--

Rerunning this link command verbose reveals the problem:

% /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/xgcc -v -B/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/ ../../../../libio/testsuite/../tests/hounddog.cc  -O3 -I.. -I../../../../libio/testsuite/..  -nostdinc++ -I/OPT/gnu/gcc/DIST-egcs-snapshot/libstdc++ -I/OPT/gnu/gcc/DIST-egcs-snapshot/libstdc++/stl -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libstdc++ -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libiberty  -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libiberty -g -lstdc++ -liberty   -lm  -o /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries/libio/testsuite/hounddog
Reading specs from /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/specs
gcc version egcs-2.90.19 971127 (gcc2-970802 experimental)
 /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/cpp -lang-c++ -nostdinc++ -v -I.. -I../../../../libio/testsuite/.. -I/OPT/gnu/gcc/DIST-egcs-snapshot/libstdc++ -I/OPT/gnu/gcc/DIST-egcs-snapshot/libstdc++/stl -isystem /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=90 -Dunix -Dmips -Dsgi -Dhost_mips -DMIPSEB -D_MIPSEB -DSYSTYPE_SVR4 -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ -D__unix__ -D__mips__ -D__sgi__ -D__host_mips__ -D__MIPSEB__ -D_MIPSEB -D__SYSTYPE_SVR4__ -D_LONGLONG -D_SVR4_SOURCE -D_MODERN_C -D__DSO__ -D__unix -D__mips -D__sgi -D__host_mips -D__MIPSEB -D__SYSTYPE_SVR4 -Asystem(unix) -Asystem(svr4) -Acpu(mips) -Amachine(sgi) -D__EXCEPTIONS -D__CHAR_UNSIGNED__ -D__OPTIMIZE__ -g -D__LANGUAGE_C_PLUS_PLUS -D_LANGUAGE_C_PLUS_PLUS -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int -D__LONG_MAX__=9223372036854775807LL -D__EXTENSIONS__ -D_SGI_SOURCE -D_MIPS_FPSET=32 -D_MIPS_ISA=_MIPS_ISA_MIPS3 -D_ABIN32=2 -D_MIPS_SIM=_ABIN32 -D_MIPS_SZINT=32 -D_MIPS_SZLONG=32 -D_MIPS_SZPTR=32 -D_COMPILER_VERSION=601 -U__mips -D__mips=3 -D__mips64 ../../../../libio/testsuite/../tests/hounddog.cc /var/tmp/cca001XQ.ii
GNU CPP version egcs-2.90.19 971127 (gcc2-970802 experimental) [AL 1.1, MM 40] SGI running IRIX 6.x
#include "..." search starts here:
#include <...> search starts here:
 ..
 ../../../../libio/testsuite/..
 /OPT/gnu/gcc/DIST-egcs-snapshot/libstdc++
 /OPT/gnu/gcc/DIST-egcs-snapshot/libstdc++/stl
 /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/include
 /usr/local/include
 /opt/gnu/gcc/egcs-6.3/mips-sgi-irix6.3/include
 /opt/gnu/gcc/egcs-6.3/lib/gcc-lib/mips-sgi-irix6.3/egcs-2.90.19/include
 /usr/include
End of search list.
 /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/cc1plus /var/tmp/cca001XQ.ii -quiet -dumpbase hounddog.cc -g -O3 -version -o /var/tmp/cca001XQ.s
GNU C++ version egcs-2.90.19 971127 (gcc2-970802 experimental) (mips-sgi-irix6.3) compiled by GNU C version egcs-2.90.19 971127 (gcc2-970802 experimental).
 as -O3 -g0 -nocpp -show -G 0 -w -n32 -o /var/tmp/cca001XQ1.o /var/tmp/cca001XQ.s
/usr/lib32/cmplrs/as -O3 -g0 -nocpp -show -G 0 -w -n32 -o /var/tmp/cca001XQ1.o /var/tmp/cca001XQ.s
/usr/lib32/cmplrs/asm -EB -pic2 -elf -O3 -g0 -G0 -w -mips3 -n32 -t5_ll_sc_bug /var/tmp/cca001XQ.s -o /var/tmp/cca001XQ1.o 
 /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/ld -call_shared -no_unresolved -init __do_global_ctors -fini __do_global_dtors -_SYSTYPE_SVR4 -n32 -o /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries/libio/testsuite/hounddog /usr/lib32/mips3/crt1.o -L/usr/lib32/mips3 -L/usr/lib32 /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/crtbegin.o -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libstdc++ -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libiberty -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libiberty -L/OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc -L/opt/gnu/gcc/egcs-6.3/lib/gcc-lib/mips-sgi-irix6.3/egcs-2.90.19 -L/opt/gnu/gcc/egcs-6.3/mips-sgi-irix6.3/lib -L/opt/gnu/gcc/egcs-6.3/lib /var/tmp/cca001XQ1.o -lstdc++ -liberty -lm -dont_warn_unused -lgcc -warn_unused -dont_warn_unused -lc -warn_unused -dont_warn_unused -lgcc -warn_unused /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/crtend.o /usr/lib32/mips3/crtn.o
ld: WARNING 84: /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/libraries//libiberty/libiberty.a is not used for resolving any symbol.
ld: ERROR 33: Unresolved text symbol "__register_frame" -- 1st referenced by /OPT/gnu/gcc/DIST-egcs-snapshot/irix-6.3/gcc/crtend.o.
ld: INFO 60: Output file removed because of error.
collect2: ld returned 2 exit status

One significant problem that I see is that crtend.o and libgcc.a are
both included in libstdc++.so.  This seems fine except for the fact
that it is again included in the link line.  Anybody actually got this
to work?  Any clues as to a solution?

It seems as if crtend.o and libgcc.a should *not* be in libstdc++.so
since crtend.o really *must* be included in the final link command,
and its presence in libstdc++.so may be what is causing the problem.
But of course I'm just speculating.  The short answer is that nothing
seems to work.  If I modify specs so that the link operates without
error, then the generated executable just dies inside .init.

-------------------------------------------------------------------------------
Lee Iverson     		SRI International
leei@ai.sri.com			333 Ravenswood Ave., Menlo Park CA 94025
http://www.ai.sri.com/~leei/	(650) 859-3307

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-12-01 19:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-01 19:30 Problems with --enable-shared on mips-sgi-irix6.x Lee Iverson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).