This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Linux Build/Host Cross-Compiler For Cygwin Target


I'm trying to build a cross-compiler on i686-pc-linux-gnu, that will run on i686-pc-linux-gnu, and generate code for i686-pc-cygwin. I haven't successfully done this before so bare with me.

I have tried to build three different verisions of GCC: 3.1, 3.3.1, and 3.3.2. The version I really *need* is 3.3.1, so I'll focus on that one. As I understand it, the only additional option I want to give the configure script is '--target=i686-pc-cygwin', so I configure it with...


----BEGIN----
./configure --enable-threads=posix --target=i686-pc-cygwin
----END----


...and then 'make'. It churns for a while and then barfs with the following,


----BEGIN BARF----
make[2]: Entering directory `/home/preston/bin/cross-compiler-cygwin/gcc-3.3.1/gcc'
for d in libgcc; do \
  if [ -d $d ]; then true; else /bin/sh ./mkinstalldirs $d; fi; \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/home/preston/bin/cross-compiler-cygwin/gcc-3.3.1/gcc/xgcc -B/home/preston/bin/cross-compiler-cygwin/gcc-3.3.1/gcc/ -B/usr/local/i686-pc-cygwin/bin/ -B/usr/local/i686-pc-cygwin/lib/ -isystem /usr/local/i686-pc-cygwin/include -O2 -I./../winsup/include -I./../winsup/cygwin/include -I./../winsup/w32api/include -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include   -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I. -I./. -I./config -I./../include  -DL_muldi3 -c ./libgcc2.c -o libgcc/./_muldi3.o
In file included from tconfig.h:17,
                 from libgcc2.c:36:
config/i386/cygwin.h:30:19: stdio.h: No such file or directory
In file included from tconfig.h:17,
                 from libgcc2.c:36:
config/i386/cygwin.h:415: error: parse error before '*' token
config/i386/cygwin.h:415: warning: function declaration isn't a prototype
config/i386/cygwin.h:417: error: parse error before '*' token
config/i386/cygwin.h:417: warning: function declaration isn't a prototype
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/home/preston/bin/cross-compiler-cygwin/gcc-3.3.1/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/home/preston/bin/cross-compiler-cygwin/gcc-3.3.1/gcc'
make: *** [all-gcc] Error 2
----END BARF----

Am I doing something wrong here? Looking at the error, it seems that it just can't find stdio.h, which doesn't make sense to me because it's a standard library in /usr/include. But then maybe it needs it's own version or whatnot..I don't know. It's hard to know what's going on because I'm not familiar with it's internal build process.

I found a document (http://sources.redhat.com/ml/crossgcc/2001-06/msg00039/cross-compiler-HOWTO.pdf) that details building a cross-compiler for a few other systems on Linux, but it is over 3 years old so maybe something has changed. I haven't been able to find a solution to this on the web, usenet or GCC documentation. I don't really want to delve into the GCC source code. TIA,

Preston


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