This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

RE: Building GCC as a cross compiler (target=sparc) on RedHat 6.2



>-----Original Message-----
>From: Dan Alderman [mailto:d.alderman@180sw.com]
>Sent: 15 December 2000 17:50
>
>Hi,
>
>I've been using GCC on RedHat for some years now, and am begninning to
>delv into the realms of cross compilation....  Compiling GCC as a cross
>compiler is proving troublesome, can someone help please?

>I have sucessfully built binutils for the target platform
>(target=sparc-elf) and installed them into /export/usr/, and put
>/export/usr/bin at the beginning of my PATH.
>When trying to build gcc from a directory outside the source tree I get
>the following error after a few minutes of building...

>../../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[3]: *** [libgcc2.a] Error 1
>make[3]: Leaving directory `/export/sources/build-gcc/gcc'
>make[2]: *** [stmp-multilib-sub] Error 2
>make[2]: Leaving directory `/export/sources/build-gcc/gcc'
>make[1]: *** [stmp-multilib] Error 1
>make[1]: Leaving directory `/export/sources/build-gcc/gcc'
>make: *** [all-gcc] Error 2
>
>Is there something I've missed?  I also tried to compile a cross gcc for
>the h8300-hitatchi-hms, but got the same errors.

 Yep. You missed providing the target headers where they can be found 
during the cross-compiler build. Drop them in $prefix/$target/sys-include
(or perhaps $prefix/$target/include ; there seems to be some disagreement
between different cross targets on this subject, but sys-include always
works for me) or add the flag --with-headers=/path/to/headers to your
configure command line.

       DaveK
-- 
The Boulder Pledge: "Under no circumstances will I ever purchase anything 
offered to me as the result of an unsolicited email message. Nor will I 
forward chain letters, petitions, mass mailings, or virus warnings to large 
numbers of others. This is my contribution to the survival of the online
community."


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.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]