Subject: Re: Problem building gcc-2.95 for arm-linux

From: "Marc D. Bumble" <[email-masked]>
Date: Wed, 11 Aug 1999 09:02:08 -0400

On Tues, Aug 10, 1999 Jan-Uwe wrote:
  >
  >On Mon, Aug 09, 1999 at 08:59:53AM -0500, Randall Sears wrote:
  >> Hello,
  >>
  >> I am trying to build gcc-2.95 for arm-linux.  The build fails with the error:
  >>
  >> 	gcc-2.95/gcc/libgcc2.c:41 stdlib.h : No such file or directory
  >>
  >> I've  downloaded, patched  and installed  the arm  kernel headers
  >> (and built installed the  binutils).  I've downloaded and applied
  >> the  latest patch for  gcc-2.95 from  the netwinder/users/p/philb
  >> directory. I'm running "configure" with
  >> --target=arm-linux
  >> --prefix=/usr/local/arm-linux
  >> --with-headers=/usr/local/arm-linux/include.
  >>
  >> I using "make all" as the make target.
  >
  >I don't know if anybody answered this already, but you should use
  >make LANGUAGES=c as far as I remember..
  >And if you have an aout-system, you should configure with
  >--host=arm-linuxaout .
  >
  >And what does 'locate stdlib.h' say ? Is it anywhere on your system ?
  >--
  >CU
  >	Jan-Uwe

I tried basically the same  thing with gcc-2.95 attempting to build an
i386-arm cross-compiler  on a  RH 6.0 i386  box.  Built  and installed
binutils-2.9.1.0.25.tar.gz  for the  arm.  This  seemed to  work okay.
Installed Phil's gcc-2.95 patch.  Then I also used configure with:

--target=arm-linux
--prefix=/usr/local/arm-linux
--with-headers=/usr/local/arm-linux/include

as my binutils prefix was the  same.  I did use "make LANGUAGES=c".  I
believe that libgcc1.S may be getting copied over incorrectly with two
comment lines at the top which  may be giving xgcc a problem.  The top
of  /usr/local/arm-linux/src/gcc-2.95/arm-objdir/gcc/libgcc1.S appears
as:

---------------------------------------------------------------------
  @ libgcc1 routines for ARM cpu.
  @ Division routines, written by Richard Earnshaw, ([email-masked])

  /* Copyright (C) 1995, 1996, 1998 Free Software Foundation, Inc.

  This file is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2, or (at your option) any
  later version.
----------------------------------------------------------------------

Are the two @ symbols at the top correct?  Am I doing something else
incorrectly?

Thanks  for any  assistance.  An  extract of  the compilation  fail is
listed below.

marc

----------------------------------------------------------------------

touch stmp-int-hdrs
if [ -f libgcc2.ready ] ; then \
        true; \
else \
        touch libgcc2.ready; \
fi
rm -f tmplibgcc1.a libgcc1.S
cp ../../gcc/config/arm/lib1funcs.asm libgcc1.S
for name in _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx; \
do \
  echo ${name}; \
  /usr/local/arm-linux/src/gcc-2.95/arm-objdir/gcc/xgcc -B/usr/local/arm-linux/src/gcc-2.95/arm-objdir/gcc/ -B/usr/local/arm-linux/arm-linux/bin/ -I/usr/local/arm-linux/arm-linux/include -O2  -DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include  -fomit-frame-pointer -fPIC -g0 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I../../gcc -I../../gcc/config -I../../gcc/../include -c -DL${name} libgcc1.S; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  mv libgcc1.o ${name}.o; \
  arm-linux-ar rc tmplibgcc1.a ${name}.o; \
  rm -f ${name}.o; \
done
_udivsi3
/tmp/ccIMDCU2.s: Assembler messages:
/tmp/ccIMDCU2.s:2: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:3: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:72: Error: no such 386 instruction: `dividend'
/tmp/ccIMDCU2.s:73: Error: no such 386 instruction: `divisor'
/tmp/ccIMDCU2.s:74: Error: no such 386 instruction: `result'
/tmp/ccIMDCU2.s:75: Error: no such 386 instruction: `curbit'
/tmp/ccIMDCU2.s:76: Error: no such 386 instruction: `ip'
/tmp/ccIMDCU2.s:77: Error: no such 386 instruction: `sp'
/tmp/ccIMDCU2.s:78: Error: no such 386 instruction: `lr'
/tmp/ccIMDCU2.s:79: Error: no such 386 instruction: `pc'
/tmp/ccIMDCU2.s:87: Error: expecting operand after ','; got nothing
/tmp/ccIMDCU2.s:88: Error: no such 386 instruction: `beq'
/tmp/ccIMDCU2.s:89: Error: expecting operand after ','; got nothing
/tmp/ccIMDCU2.s:90: Error: expecting operand after ','; got nothing
/tmp/ccIMDCU2.s:91: Error: operands given don't match any known 386 instruction
/tmp/ccIMDCU2.s:92: Error: no such 386 instruction: `bcc'
/tmp/ccIMDCU2.s:94: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:95: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:96: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:97: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:98: Error: expecting operand after ','; got nothing
/tmp/ccIMDCU2.s:99: Error: no such 386 instruction: `cmpcc'
/tmp/ccIMDCU2.s:100: Error: no such 386 instruction: `movcc'
/tmp/ccIMDCU2.s:101: Error: no such 386 instruction: `movcc'
/tmp/ccIMDCU2.s:102: Error: no such 386 instruction: `bcc'
/tmp/ccIMDCU2.s:105: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:106: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:107: Error: expecting operand after ','; got nothing
/tmp/ccIMDCU2.s:108: Error: no such 386 instruction: `cmpcc'
/tmp/ccIMDCU2.s:109: Error: no such 386 instruction: `movcc'
/tmp/ccIMDCU2.s:110: Error: no such 386 instruction: `movcc'
/tmp/ccIMDCU2.s:111: Error: no such 386 instruction: `bcc'
/tmp/ccIMDCU2.s:114: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:115: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:116: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:117: Error: Rest of line ignored. First ignored character is `@'.
/tmp/ccIMDCU2.s:118: Error: operands given don't match any known 386 instruction
/tmp/ccIMDCU2.s:119: Error: no such 386 instruction: `subcs'
/tmp/ccIMDCU2.s:120: Error: no such 386 instruction: `orrcs'
/tmp/ccIMDCU2.s:121: Error: more than 1 memory reference in instruction
/tmp/ccIMDCU2.s:122: Error: no such 386 instruction: `subcs'
/tmp/ccIMDCU2.s:123: Error: no such 386 instruction: `orrcs'
/tmp/ccIMDCU2.s:124: Error: more than 1 memory reference in instruction
/tmp/ccIMDCU2.s:125: Error: no such 386 instruction: `subcs'
/tmp/ccIMDCU2.s:126: Error: no such 386 instruction: `orrcs'
/tmp/ccIMDCU2.s:127: Error: more than 1 memory reference in instruction
/tmp/ccIMDCU2.s:128: Error: no such 386 instruction: `subcs'
/tmp/ccIMDCU2.s:129: Error: no such 386 instruction: `orrcs'
/tmp/ccIMDCU2.s:130: Error: expecting operand after ','; got nothing
/tmp/ccIMDCU2.s:131: Error: no such 386 instruction: `movnes'
/tmp/ccIMDCU2.s:132: Error: no such 386 instruction: `movne'
/tmp/ccIMDCU2.s:133: Error: no such 386 instruction: `bne'
/tmp/ccIMDCU2.s:135: Error: operands given don't match any known 386 instruction
/tmp/ccIMDCU2.s:136: Error: operands given don't match any known 386 instruction
/tmp/ccIMDCU2.s:139: Error: invalid char '[' begining second operand '[sp'
/tmp/ccIMDCU2.s:140: Error: no such 386 instruction: `bl'
/tmp/ccIMDCU2.s:141: Error: expecting operand after ','; got nothing
/tmp/ccIMDCU2.s:142: Error: no such 386 instruction: `ldmia'
make[1]: *** [libgcc1-asm.a] Error 1
make[1]: Leaving directory `/usr/local/arm-linux/src/gcc-2.95/arm-objdir/gcc'
make: *** [all-gcc] Error 2

unsubscribe: body of `unsubscribe linux-arm' to [email-masked]