From: rrh@tera.com (Robert R. Henry)
Subject: gdb4.6 cross development link errors
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 13 Oct 1992 23:33:10 GMT

I have attempted to build a version
of gdb4.6 (derived from gdb4.5 + patch files)
that is set up in its own subdirectory viz:
    ../configure --srcdir=../ --target=m68k-sun-sunos4.1 sparc-sun-sunos4.1

I compile with gcc2.2.2, targeted/hosted for the sparc (of course...)

Everything compiles just fine, more or less, except for:
  gdb/m68k-pinsn.c:470 `ext_format_68881' undeclared
  gdb/m68k-tdep.c:355 `SP_ARG0' undeclared

These could be fixed by #ifdefing (the first in 'x' format
for [floating point] numbers, the second for longjmp analysis)

The link fails, however; it looks like some of the gdb
build assumes that the host is the sparc, instead of the 68k,
such as:
  ../../gdb/blockframe.c:306 (blockframe.o): Undefined symbol _sparc_frame_chain referenced from text segment

any ideas on what to do?  (I have done a ``make clean'' in the root
directory, so hopefully turds left over from previous makes aren't
getting in the way)

  /usr/local/new/bin/gcc    -o gdb \
    init.o main.o blockframe.o breakpoint.o\
  findvar.o stack.o source.o values.o eval.o valops.o valarith.o valprint.o\
  printcmd.o symtab.o symfile.o symmisc.o infcmd.o infrun.o remote.o command.o\
  utils.o expprint.o environ.o version.o gdbtypes.o copying.o exec.o m68k-pinsn.o\
  solib.o m68k-tdep.o infptrace.o sparc-xdep.o ser-termios.o cplus-dem.o\
  mem-break.o target.o inftarg.o ieee-float.o putenv.o parse.o language.o\
  c-exp.tab.o m2-exp.tab.o buildsym.o objfiles.o minsyms.o maint.o demangle.o\
  dbxread.o coffread.o elfread.o dwarfread.o xcoffread.o mipsread.o core.o\
  inflow.o     ./../bfd/libbfd.a  ./../readline/libreadline.a -ltermcap\
  ./../mmalloc/libmmalloc.a ./../libiberty/libiberty.a  \
  /home/whirlwind/system/compiler/libtera/src/sun4/word.a 
  ../../gdb/blockframe.c:218 (blockframe.o): Undefined symbol _skip_prologue referenced from text segment
  ../../gdb/blockframe.c:306 (blockframe.o): Undefined symbol _sparc_frame_chain referenced from text segment
  ../../gdb/blockframe.c:307 (blockframe.o): Undefined symbol _frame_saved_pc referenced from text segment
  ../../gdb/blockframe.c:332 (blockframe.o): Undefined symbol _sparc_pc_adjust referenced from text segment
  ../../gdb/blockframe.c:332 (blockframe.o): Undefined symbol _frame_saved_pc referenced from text segment
  ../../gdb/blockframe.c:354 (blockframe.o): Undefined symbol _sparc_frame_find_saved_regs referenced from text segment
  ../../gdb/stack.c:359 (stack.o): Undefined symbol _setup_arbitrary_frame referenced from text segment
  ../../gdb/stack.c:439 (stack.o): Undefined symbol _frame_saved_pc referenced from text segment
  ../../gdb/stack.c:1177 (stack.o): Undefined symbol _sparc_pop_frame referenced from text segment
  ../../gdb/stack.c:1181 (stack.o): Undefined symbol _sparc_pop_frame referenced from text segment
  ../../gdb/values.c:1387 (values.o): Undefined symbol _sparc_extract_struct_value_address referenced from text segment
  ../../gdb/valops.c:717 (valops.o): Undefined symbol _sparc_push_dummy_frame referenced from text segment
  ../../gdb/symtab.c:1631 (symtab.o): Undefined symbol _skip_prologue referenced from text segment
  ../../gdb/symtab.c:1805 (symtab.o): Undefined symbol _skip_prologue referenced from text segment
  ../../gdb/symtab.c:1859 (symtab.o): Undefined symbol _skip_prologue referenced from text segment
  ../../gdb/symtab.c:1918 (symtab.o): Undefined symbol _skip_prologue referenced from text segment
  ../../gdb/infcmd.c:516 (infcmd.o): Undefined symbol _sparc_pop_frame referenced from text segment
  ../../gdb/infrun.c:320 (infrun.o): Undefined symbol _single_step referenced from text segment
  ../../gdb/infrun.c:829 (infrun.o): Undefined symbol _one_stepped referenced from text segment
  ../../gdb/infrun.c:829 (infrun.o): Undefined symbol _one_stepped referenced from text segment
  ../../gdb/infrun.c:850 (infrun.o): Undefined symbol _one_stepped referenced from text segment
  ../../gdb/infrun.c:850 (infrun.o): Undefined symbol _one_stepped referenced from text segment
  ../../gdb/infrun.c:856 (infrun.o): Undefined symbol _one_stepped referenced from text segment
  ../../gdb/infrun.c:856 (infrun.o): Undefined symbol _one_stepped referenced from text segment
  ../../gdb/infrun.c:857 (infrun.o): Undefined symbol _single_step referenced from text segment
  ../../gdb/infrun.c:1195 (infrun.o): Undefined symbol _skip_prologue referenced from text segment
  ../../gdb/infrun.c:1263 (infrun.o): Undefined symbol _sparc_pc_adjust referenced from text segment
  ../../gdb/infrun.c:1275 (infrun.o): Undefined symbol _skip_prologue referenced from text segment
  ../../gdb/infrun.c:1565 (infrun.o): Undefined symbol _sparc_pop_frame referenced from text segment
  ../../gdb/infptrace.c:123 (infptrace.o): Undefined symbol _single_step referenced from text segment


Newsgroups: gnu.gdb.bug