#!/bin/sh GCC_SRC=../../gcc-4.3.1 PREFIX=/mingw INSTALL_DIR=/build/gcc/b4.3.1-tdm-3/stage-sjlj GMP_INSTALL=/build/win-gmp-install MPFR_INSTALL=/build/win-mpfr-install ICONV_INSTALL=/build/win-iconv-install PTHREAD_INSTALL=/build/pthreads-w32-install HOST=mingw32 TARGET=mingw32 BUILD=mingw32 export PATH=$PATH:/cygdev/gccbuild/libsfor43/pthreads-w32-install/bin export C_INCLUDE_PATH="$GMP_INSTALL/include;$MPFR_INSTALL/include;$ICONV_INSTALL/include;$PTHREAD_INSTALL/include" export CPLUS_INCLUDE_PATH="$ICONV_INSTALL/include" export LIBRARY_PATH="$GMP_INSTALL/lib;$MPFR_INSTALL/lib;$ICONV_INSTALL/lib;$PTHREAD_INSTALL/lib" if test "$1" = "c" then shift VERSION=`hg tip | gawk '/changeset:(.*)/ { print $2 }'` $GCC_SRC/configure --prefix="$PREFIX" \ --build=$BUILD \ --enable-languages=c,d \ --with-bugurl="http://www.tdragon.net/recentgcc/bugs.php" \ --disable-nls --disable-win32-registry \ --disable-werror --enable-threads --disable-symvers \ --enable-cxx-flags='-fno-function-sections -fno-data-sections' \ --enable-fully-dynamic-string \ --enable-version-specific-runtime-libs \ --enable-sjlj-exceptions \ --with-pkgversion="GDCCC TDM-1 for MinGW (gdc 1.045)" \ --with-gmp=$GMP_INSTALL --with-mpfr=$MPFR_INSTALL if test "$?" != "0" then exit $? fi fi if test "$1" = "b" then shift make CFLAGS="-O2 -D__USE_MINGW_ACCESS" \ BOOT_CFLAGS="-O2 -mtune=generic -D__USE_MINGW_ACCESS" \ CFLAGS_FOR_TARGET="-O2 -mtune=generic -D__USE_MINGW_ACCESS" \ CXXFLAGS="-mthreads -O2 -D__USE_MINGW_ACCESS" \ BOOT_CXXFLAGS="-mthreads -O2 -mtune=generic -D__USE_MINGW_ACCESS" \ CXXFLAGS_FOR_TARGET="-mthreads -O2 -mtune=generic -D__USE_MINGW_ACCESS" \ LDFLAGS="-s -Wl,--stack=0x2000000" BOOT_LDFLAGS=-s LDFLAGS_FOR_TARGET=-s \ bootstrap if test "$?" != "0" then exit $? fi fi if test "$1" = "m" then shift make CFLAGS="-O2 -D__USE_MINGW_ACCESS" \ BOOT_CFLAGS="-O2 -mtune=generic -D__USE_MINGW_ACCESS" \ CFLAGS_FOR_TARGET="-O2 -mtune=generic -D__USE_MINGW_ACCESS" \ CXXFLAGS="-mthreads -O2 -D__USE_MINGW_ACCESS" \ BOOT_CXXFLAGS="-mthreads -O2 -mtune=generic -D__USE_MINGW_ACCESS" \ CXXFLAGS_FOR_TARGET="-mthreads -O2 -mtune=generic -D__USE_MINGW_ACCESS" \ LDFLAGS="-s -Wl,--stack=0x2000000" BOOT_LDFLAGS=-s LDFLAGS_FOR_TARGET=-s if test "$?" != "0" then exit $? fi fi if test "$1" = "i" then shift rm -f gcc/cc1.exe gcc/cc1obj.exe gcc/cc1objplus.exe gcc/cc1plus.exe gcc/f951.exe gcc/gnat1.exe make DESTDIR="$INSTALL_DIR" LDFLAGS="-s -Wl,--stack=0x2000000" install if test "$?" != "0" then exit $? fi fi if test "$1" = "t" then make check fi exit $?