exec path for as, ld

Tim Miller tim@glenatl.glenayre.com
Fri Apr 4 08:04:00 GMT 1997


When trying to build gcc-2.7.2.1 cross to c68k on Linux I get:

  if [ -f libgcc2.ready ] ; then \
        true; \
  else \
        touch libgcc2.ready; \
  fi
  rm -f tmplibgcc1.a libgcc1.S
  cp ../gcc-2.7.2.1/config/m68k/lb1sf68.asm libgcc1.S
   [bunch of uninteresting stuff deleted ...]
  _mulsi3
  as: unrecognized option `-c68020'

Using the -v option shows that the wrong assembler is used:

  $ ./xgcc -B./ -v hello.c
  Reading specs from ./specs
  gcc version 2.7.2.1
   ./cpp -lang-c -v -iprefix /usr/local/m68k-coff/2.7.2.1/ -isystem ./include 
    -undef -D__GNUC__=2 -D__GNUC_MINOR__=7 -Dmc68000 -D__mc68000__ -D__mc68000 
    -D__HAVE_68881__ -Dmc68020 -D__mc68020__ -D__mc68020 hello.c
     /tmp/cca27629.i
  GNU CPP version 2.7.2.1 (68k, Motorola syntax)
  #include "..." search starts here:
  #include <...> search starts here:
   ./include
   /usr/local/m68k-coff/2.7.2.1/include
   /usr/local/m68k-coff/2.7.2.1/sys-include
   /usr/lib/gcc-lib/m68k-coff/2.7.2.1/include
   /usr/lib/gcc-lib/m68k-coff/2.7.2.1/sys-include
   /usr/m68k-coff/include
  End of search list.
   ./cc1 /tmp/cca27629.i -m68020 -quiet -dumpbase hello.c -version -o 
   /tmp/cca27629.s GNU C version 2.7.2.1 (68k, Motorola syntax) compiled by 
   GNU C version 2.7.2.
   as -mc68020 -o /tmp/cca276291.o /tmp/cca27629.s
  as: unrecognized option `-c68020'
 
Under Sparc Solaris using a 68k compiler built from the same sources I get:

  $ m68k-coff-gcc -v -c hello.c 
  Reading specs from /usr/local/lib/gcc-lib/m68k-coff/2.6.3/specs
  gcc version 2.6.3
   /usr/local/lib/gcc-lib/m68k-coff/2.6.3/cpp -lang-c -v -undef -D__GNUC__=2 
   -D__GNUC_MINOR__=6 -Dmc68000 -D__mc68000__ -D__mc68000 -D__HAVE_68881__ 
   -Dmc68020 -D__mc68020__ -D__mc68020 hello.c /tmp/cca006ed.i
  GNU CPP version 2.6.3 (68k, Motorola syntax)
  #include "..." search starts here:
  #include <...> search starts here:
   /usr/local/lib/gcc-lib/m68k-coff/2.6.3/include
   /usr/local/lib/gcc-lib/m68k-coff/2.6.3/sys-include
   /usr/local/m68k-coff/include
  End of search list.
   /usr/local/lib/gcc-lib/m68k-coff/2.6.3/cc1 /tmp/cca006ed.i -m68020 -quiet 
   -dumpbase hello.c -version -o /tmp/cca006ed.s
  GNU C version 2.6.3 (68k, Motorola syntax) compiled by GNU C version 2.4.5.
   as -mc68020 -o hello.o /tmp/cca006ed.s
 
This only works because /usr/local/bin/as is hard-linked to 
/usr/local/bin/m68k-coff-as.


Does anyone know how to configure the exec prefix for as was evedently done in 
this case:

  $ gcc -v -c hello.c
  Reading specs from /usr/local/lib/gcc-lib/sparc-solaris2/2.4.5/specs
  gcc version 2.4.5
   /usr/local/lib/gcc-lib/sparc-solaris2/2.4.5/cpp -lang-c -v -undef 
   -D__GNUC__=2 -Dsun -Dsparc -Dunix -D__svr4__ -D__GCC_NEW_VARARGS__ 
   -D__sun__ -D__sparc__ -D__unix__ -D__svr4__ -D__GCC_NEW_VARARGS__ -D__sun 
   -D__sparc -D__unix -D__svr4__ -D__GCC_NEW_VARARGS__ -Asystem(unix) 
   -Acpu(sparc) -Amachine(sparc) hello.c /usr/tmp/cca006f_.i
  GNU CPP version 2.4.5 (sparc)
   /usr/local/lib/gcc-lib/sparc-solaris2/2.4.5/cc1 /usr/tmp/cca006f_.i -quiet 
   -dumpbase hello.c -version -o /usr/tmp/cca006f_.s
  GNU C version 2.4.5 (sparc) compiled by GNU C version 2.4.5.
   /usr/ccs/bin/as -V -Qy -s -o /usr/tmp/cca006f_1.o /usr/tmp/cca006f_.s
  /usr/ccs/bin/as: SC3.1 dev 09 May 1994
 

---

Tim Miller
Glenayre Electronics



More information about the crossgcc mailing list