Hi,

>I did this (actually did something pretty similar).  But I still have
questions.

Do you still remeber what did to get around this problem? I believe a
lot
of people are looking for your successful story!

>>>_muldi3
>>>./libgcc2.c:41: stdlib.h: No such file or directory
>>>./libgcc2.c:42: unistd.h: No such file or directory
>>>gmake[3]: *** [libgcc2.a] Error 1

>>Yeah, this is a common problem when building cross-compilers for the
first
>>time.  The workaround is to edit gcc/config/arm/t-linux and add
>>"-Dinhibit_libc" to TARGET_LIBGCC2_CFLAGS.  You will also probably get
errors
>>building frame.c - to avoid those, add the "--disable-threads" option
to
>>configure, and then manually delete the offending #include
<pthread.h>. (This
>>last bit was suggested by Werner Almesberger; I haven't actually tried
it
>>myself.)

I always end up with the following errors:

     Checking version of arm-linux... gcc 2.95, bad
     ......
     *** Some critical program is missing or too old.



What I did is as follows:

Install binutils-2.9.1.0.25.tar.gz without any patches

Install linux-2.2.10.tar.gz with patch-2.2.10-rmk3.gz
cp -a /usr/src/linux-2.2.10/linux/include/arm-asm
/usr/arm-linux/inlcude/asm
cp -a /usr/src/linux-2.2.10/linux/include/linux
/usr/arm-linux/include/linux
Install gcc-2.95.tar.gz
./configure --target=arm-linux --prefix=/usr
make LANGUAGES=c
          Now it complains "stdlib.h: No such file or directory"

Edit gcc/config/arm/t-linux and add "-Dinhibit_libc" and
"-D__gthr_posix_h"
to TARGET_LIBGCC2_CFLAGS
Delete #include "gthr.h" in libgcc2.c
Add the "--disable-threads" option to configure
          Then it tries to remove some directory and complains it is not

          empty, I removed it manually and resume "make LANGUAGES=c", it
finished
          w/o error, and I can do "make LANGUAGES=c install"

Install glibc-2.1.tar.gz with glibc-linuxthread-2.1.tar.gz and
glib-crypt-2.0.111.tar.gz
./configure arm-linux --build=i686-pc-linux-gnu --prefix=/usr/arm-linux
--enable-add-ons
          Now comes to "gcc 2.95, bad"




I also tried Werner's directions as follows:


Build gcc:
 - get the following files

ftp://egcs.cygnus.com/pub/egcs/snapshots/1999-06-23/egcs-core-19990623.tar.gz

   ftp://ftp.netwinder.org/users/p/philb/gcc-2.95-diff-990623.gz

ftp://lrcftp.epfl.ch/pub/people/almesber/psion/egcs-19990623-xdev-1.patch.gz

 - be sure to have bison and autoconf installed
 - tar xfz egcs-core-19990623.tar.gz
 - cd egcs-19990623/gcc/config/arm
 - zcat ../../../../gcc-2.95-diff-990623.gz | patch -s
 - cd ../../..
 - zcat ../egcs-19990623-xdev-1.patch.gz | patch -p1 -s
 - if very short on space,  rm ../egcs-core-19990623.tar.gz  now
 - ./configure --target=arm-linux --prefix=/scratch/psion/xdev
--disable-threads
 - make cross
   It will stop after a while with with
     make[1]: *** No rule to make target `c++', needed by `native'.
Stop.
     make[1]: Leaving directory
`/scratch/psion/xdev-1/egcs-19990623/gcc'
     make: *** [cross] Error 2
 - make install LANGUAGES=c
   This one should finish without errors.


Again, when I tried to config glibc-2.1, it complains "gcc 2.95, bad"

Thanks,
Gaixia Zhang





________________________________________________________
NetZero - We believe in a FREE Internet.  Shouldn't you?
Get your FREE Internet Access and Email at
http://www.netzero.net/download/index.html
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]

Reply via email to