This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Can't build GCC


Methinks glibc should be used, NOT newlib since the target
is i486-pc-linux-gnu.  On the other hand, a cross compiler from
i686-pc-linux-gnu to i486-pc-linux-gnu makes no sense whatsoever
[well, I can think of a situation where it might make sense but
I doubt that's the case here.]

Also, reformatting disks and reinstalling redhat 6.1 is rather unnecessary.

Is the following _really_ correct?

 > >     host=i686-pc-linux-gnu
 > >     target=i486-pc-linux-gnu

An earlier message said the target was i386-elf (or i486-elf).
Note that while linux uses the ELF file format, i386-elf is NOT
the same as i386-linux.

Mike/Richard (how come messages are from mike@... and yet the email
is signed richard@... ?), what are you _really_ trying to build?

Paul Andrews writes:
 > Once again it looks like the --with-headers problem. Is this in the FAQ at
 > all, as loads of people (including me) have suffered from it. 
 > What you probably need to do is add the following to your configure line:
 > --with-headers=/path/to/includes
 > so that gcc will be able to find the standard include files. If you are
 > using 
 > newlib it might look like:
 > --with-headers=../gcc-2.95.2/newlib/libc/include
 > just find where they are and point it there...
 > 
 > > -----Original Message-----
 > > From: Thunder Scientific Corporation 
 > > [mailto:mike@ThunderScientific.com]
 > > Sent: Thursday, March 09, 2000 10:12 AM
 > > To: crossgcc@sourceware.cygnus.com
 > > Subject: Can't build GCC
 > > 
 > > 
 > > I wrote in recently when I couldn't build binutils.  Thanks 
 > > to the help I
 > > got from people on this list, I got that problem solved and 
 > > everything there
 > > seems fine now.  So I moved on to trying to build gcc according to the
 > > scripts in the FAQ.
 > > 
 > > To ensure a clean source tree, I reformatted my hard drive 
 > > and did a fresh
 > > install of Red Hat 6.1.  I then went to /usr/src and copied 
 > > the source files
 > > there (binutils-2.9.2.tar.gz, gcc-2.95.2.tar.gz, 
 > > newlib-1.8.2.tar.gz, and
 > > gdb-4.18.tar.gz).  I untared them (tar -xzvf filename.gz) and 
 > > then followed
 > > the script:
 > >     host=i686-pc-linux-gnu
 > >     target=i486-pc-linux-gnu
 > >     prefix=/cross
 > >     i=$prefix/bin
 > > I then echoed each of them to insure the environmental 
 > > variable strings were
 > > alright. (They were.)  Then:
 > >     mkdir build-binutils build-gcc build-newlib build-gdb
 > >     cd build-binutils
 > >     ../binutils-2.9.2/configure --target=$target 
 > > --prefix=$prefix -v &>
 > > config.rec
 > >     make all install &> make.rec
 > >     cd ../build-gcc
 > >     ../gcc-2.95.2/configure --target=$target --prefix=$prefix -v &>
 > > config.rec
 > > Everything was fine.  Then:
 > >     make all install &> make.rec
 > > CRUMP!  The essential error message was as follows:
 > > 
 > > make[2]: Entering directory `/usr/src/build-gcc/gcc/java'
 > > .
 > > .
 > > ...[snip]...
 > > .
 > > .
 > > for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3
 > > _ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2
 > > _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi
 > > _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf 
 > > _fixunsxfsi _fixtfdi
 > > _fixunstfdi _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb _shtab
 > > _clear_cache _trampoline __main _exit _ctors _pure; \
 > > do \
 > >   echo ${name}; \
 > > 
 > > 
 > > /usr/src/build-gcc/gcc/xgcc -B/usr/src/build-gcc/gcc/ 
 > > -B/cross/i486-pc-linux
 > > -gnu/bin/ -I/cross/i486-pc-linux-gnu/include -O2  
 > > -DCROSS_COMPILE -DIN_GCC  
 > >    -g -O2 -I./include  -fPIC -g1  -DIN_LIBGCC2 
 > > -D__GCC_FLOAT_NOT_NEEDED   -I
 > > . -I../../gcc-2.95.2/gcc -I../../gcc-2.95.2/gcc/config 
 > > -I../../gcc-2.95.2/gc
 > > c/../include -c -DL${name} \
 > >        ../../gcc-2.95.2/gcc/libgcc2.c -o ${name}.o; \
 > >   if [ $? -eq 0 ] ; then true; else exit 1; fi; \
 > >   i486-pc-linux-gnu-ar rc tmplibgcc2.a ${name}.o; \
 > >   rm -f ${name}.o; \
 > > done
 > > _muldi3
 > > ../../gcc-2.95.2/gcc/libgcc2.c:41: stdlib.h: No such file or directory
 > > ../../gcc-2.95.2/gcc/libgcc2.c:42: unistd.h: No such file or directory
 > > make[1]: *** [libgcc2.a] Error 1
 > > make[1]: Leaving directory `/usr/src/build-gcc/gcc'
 > > make: *** [all-gcc] Error 2
 > > 
 > > I examined /usr/src/gcc-2.95.2/gcc/libgcc2.c:  Lines 41 & 42 
 > > were standard
 > > directives "#include <stdlib.h>"
 > > and "include <unistd.h>".  No surprises there.
 > > 
 > > This error is repeatable even with again stripping out my Red Hat
 > > 6.1installation and re-installing.  The second time I ran 
 > > "find / -name
 > > filename.h" before I tried the build and once again after I tried it.
 > > Neither include file was missing, either before  the make or after it.
 > > 
 > > Does anyone have any clues?
 > > 
 > > I know it's not anyone's problem here, but I'm running out of 
 > > time.  For
 > > almost a whole week I've not been able to get a cross 
 > > compiler built, and I
 > > may have to dump this project and use a Micro$lop C compiler 
 > > instead.  (I've
 > > been struggling to get permission  to use the GNU tools in 
 > > development for
 > > new products.)  That would hurt!
 > > 
 > > Any help would be sincerely appreciated.  Thanks in advance.
 > > 
 > > Richard Bowser
 > > Engineer
 > > Thunder Scientific Corporation
 > > 
 > > email:     richardb@thunderscientific.com
 > > 
 > > 
 > > 
 > > ------
 > > Want more information?  See the CrossGCC FAQ, 
 > > http://www.objsw.com/CrossGCC/
 > > Want to unsubscribe? Send a note to 
 > > crossgcc-unsubscribe@sourceware.cygnus.com
 > > 
 > 
 > ------
 > Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
 > Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]