bootstrapping cygwin cross-compiler

Robert Collins
Wed Jun 20 07:36:00 GMT 2001

I'm half way through a painful move from win2k as 
my primary OS at home, to linux, where I'll run win 95 and maybe 2K in a virtual 
One of the points of the exercise is to be able to 
build cygwin a little faster :]. To that end I'm building a 
I'm caught in the chicken-and-egg bit with newlib 
and gcc, and would appreciate some pointers  - either to reading material, 
or to actions. (I recall Mumit's page being rather dated... thus my 
Steps so far:
grabbed the winsup tree, added bfd, binutils and 
opcodes all from cvs. 
Built bfd, opcodes and binutils, with 
--target=i686-pc-cygwin. installed that (/usr/local).
grabbed gcc from a cygwin mirror. configured 
with --target=i686-pc-cygwin. 
That fails partway thrugh the build (see the errors 
below). I figure thats because no cross-headers have been installed. So... I go 
to build newlib, but cannot as, you guessed it, i686-pc-cygwin-gcc doesn't exist 
Hints ?
make[2]: Leaving directory 
`/usr/home/robertc/src/cygwin/build/gcc-cygwin/gcc/intl' rm -f 
tmplibgcc2.a 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}; 
\   /home/robertc/src/cygwin/build/gcc-cygwin/gcc/xgcc 
-B/usr/local/i686-pc-cygwin/bin/ -I/usr/local/i686-pc-cygwin/include -O2 
-I../../../src/gcc-2.95.3-5/gcc/../winsup/include -DCROSS_COMPILE 
-DIN_GCC     -g -O2 -I./include   -g1  
-I../../../src/gcc-2.95.3-5/gcc -I../../../src/gcc-2.95.3-5/gcc/config 
-I../../../src/gcc-2.95.3-5/gcc/../include -c -DL${name} 
../../../src/gcc-2.95.3-5/gcc/libgcc2.c -o ${name}.o; \   if [ $? -eq 0 
] ; then true; else exit 1; fi; \   i686-pc-cygwin-ar rc tmplibgcc2.a 
${name}.o; \   rm -f ${name}.o; 
\ done _muldi3 ../../../src/gcc-2.95.3-5/gcc/libgcc2.c:41: stdlib.h: No 
such file or directory ../../../src/gcc-2.95.3-5/gcc/libgcc2.c:42: unistd.h: 
No such file or directory

More information about the Cygwin-apps mailing list