Mail Archives: cygwin/2002/12/04/17:22:47
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
The goal here is to build a cross compiler from Linux to
i586-cygwin32. Binutils builds OK. GCC is having problems.
I'm attaching both the script I'm using to unpack, configure, and
build gcc as well as a log from make that fails. The crux appears to
be the inclusion of <stdio.h> in gcc/config/i386/cygwin.h. It is
included so that a prototype can use FILE*. However, at the time when
the compiler is being built, there is no stdio.h available.
I've tried to use the 11.17 GCC snapshot from the cygwin archive as
well as a 12.02 snapshot from gnu.org.
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=build-gcc
#!/bin/sh
package=gcc
s=`find * -type l -maxdepth 0 -print | grep $package | grep src.tar`
if [ -z "$s" ] ; then
echo "No $package archive. Symlink expected."
exit
fi
sd=`echo $s | sed -e s/.src.tar.bz2//`
#sd=`echo $s | sed -e s/.src.tar.gz//`
if [ ! -d $sd ] ; then
p=`find * -type d -maxdepth 0 -print | grep $package`
if [ -n "$p" ] ; then rm -rf $p ; fi
if [ -L ${package}-src ] ; then rm ${package}-src ; fi
echo Unpacking source...
tar jxf ${package}-*src.tar.bz2
# tar zxf ${package}-*src.tar.gz
p=`find * -type d -maxdepth 0 -print | grep $package`
ln -s $p ${package}-src
fi
if [ -d $package ] ; then rm -rf $package ; fi
mkdir $package
cd $package
../${package}-src/configure -v \
--prefix=/usr/i586-cygwin32 \
--target=i586-pc-cygwin32 \
--enable-languages=c,c++ \
--enable-threads \
--disable-multilib \
--enable-version-specific-runtime-libs \
--with-newlib
export PATH=$PATH:/usr/i586-cygwin32/bin
make LANGUAGES=c -k -j2
#all-gcc
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=makelog
make[1]: Entering directory `/m/md1/cfw-cross/cyg/gcc/libiberty'
make[2]: Entering directory `/m/md1/cfw-cross/cyg/gcc/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/m/md1/cfw-cross/cyg/gcc/libiberty/testsuite'
make[1]: Leaving directory `/m/md1/cfw-cross/cyg/gcc/libiberty'
make[1]: Entering directory `/m/md1/cfw-cross/cyg/gcc/gcc'
(cd intl && make all)
make[2]: Entering directory `/m/md1/cfw-cross/cyg/gcc/gcc/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/m/md1/cfw-cross/cyg/gcc/gcc/intl'
make GCC_FOR_TARGET="/m/md1/cfw-cross/cyg/gcc/gcc/xgcc -B/m/md1/cfw-cross/cyg/gcc/gcc/ -B/usr/i586-cygwin32/i586-pc-cygwin32/bin/ -B/usr/i586-cygwin32/i586-pc-cygwin32/lib/ -isystem /usr/i586-cygwin32/i586-pc-cygwin32/include" \
BUILD_PREFIX="" BUILD_PREFIX_1="loser-" \
AR_FOR_TARGET="i586-pc-cygwin32-ar" \
AR_CREATE_FOR_TARGET="i586-pc-cygwin32-ar rc" \
AR_FLAGS_FOR_TARGET="" \
CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -fno-common" \
RANLIB_FOR_TARGET="i586-pc-cygwin32-ranlib" \
RANLIB_TEST_FOR_TARGET="[ -f i586-pc-cygwin32-ranlib ] || ( [ "i686-pc-linux-gnu" = "i586-pc-cygwin32" ] && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )" \
NM_FOR_TARGET="nm" AWK="gawk" \
LIBGCC2_CFLAGS="-O2 -I../../gcc-src/gcc/../winsup/include -I../../gcc-src/gcc/../winsup/cygwin/include -I../../gcc-src/gcc/../winsup/w32api/include -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc" \
INCLUDES="-I. -I. -I../../gcc-src/gcc -I../../gcc-src/gcc/. -I../../gcc-src/gcc/config -I../../gcc-src/gcc/../include" \
CONFIG_H="tconfig.h " MACHMODE_H="machmode.h machmode.def ../../gcc-src/gcc/config/i386/i386-modes.def" \
LIB1ASMSRC='i386/cygwin.asm' \
MAKEOVERRIDES= \
-f libgcc.mk all
make[2]: Entering directory `/m/md1/cfw-cross/cyg/gcc/gcc'
for d in libgcc; do \
if [ -d $d ]; then true; else /bin/sh ../../gcc-src/gcc/mkinstalldirs $d; fi; \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/m/md1/cfw-cross/cyg/gcc/gcc/xgcc -B/m/md1/cfw-cross/cyg/gcc/gcc/ -B/usr/i586-cygwin32/i586-pc-cygwin32/bin/ -B/usr/i586-cygwin32/i586-pc-cygwin32/lib/ -isystem /usr/i586-cygwin32/i586-pc-cygwin32/include -O2 -I../../gcc-src/gcc/../winsup/include -I../../gcc-src/gcc/../winsup/cygwin/include -I../../gcc-src/gcc/../winsup/w32api/include -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-src/gcc -I../../gcc-src/gcc/. -I../../gcc-src/gcc/config -I../../gcc-src/gcc/../include -DL_muldi3 -c ../../gcc-src/gcc/libgcc2.c -o libgcc/./_muldi3.o
In file included from tconfig.h:17,
from ../../gcc-src/gcc/libgcc2.c:36:
../../gcc-src/gcc/config/i386/cygwin.h:30:19: stdio.h: No such file or directory
In file included from tconfig.h:17,
from ../../gcc-src/gcc/libgcc2.c:36:
../../gcc-src/gcc/config/i386/cygwin.h:403: error: parse error before '*' token
../../gcc-src/gcc/config/i386/cygwin.h:403: warning: function declaration isn't a prototype
../../gcc-src/gcc/config/i386/cygwin.h:405: error: parse error before '*' token
../../gcc-src/gcc/config/i386/cygwin.h:405: warning: function declaration isn't a prototype
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/m/md1/cfw-cross/cyg/gcc/gcc'
make[1]: *** [libgcc.a] Error 2
make[1]: Leaving directory `/m/md1/cfw-cross/cyg/gcc/gcc'
make: *** [all-gcc] Error 2
--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--ikeVEW9yuYc//A+q--
- Raw text -