From: Zoltan Varga Date: Fri, 5 Aug 2011 19:48:45 +0000 (+0200) Subject: Make sure the cygwin build uses gcc-3 from the gcc-core package, other version won... X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=89d18c331d0f750af57691d8180e603fe349508b;p=mono.git Make sure the cygwin build uses gcc-3 from the gcc-core package, other version won't work --- diff --git a/configure.in b/configure.in index 6fffe45b492..e1374fefbea 100644 --- a/configure.in +++ b/configure.in @@ -98,12 +98,25 @@ case "$host" in if test "x$host" == "x$build"; then AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32]) fi - CC="gcc -mno-cygwin -g" - CXX="g++ -mno-cygwin -g" + # + # gcc-3/g++-3 are from the gcc-core/gcc-g++ cygwin packages. + # Other gcc packages will not work: + # - the gcc-4 packages no longer support -mno-cygwin + # - the mingw-gcc packages produce executables which depends on a libgcc<...> + # dll, which means we would have to distribute that file too. + # + if test "x$CC" != "x"; then + AC_ERROR(Don't set CC. mono can only be compiled with gcc-3 from the 'gcc-core' package) + fi + CC="gcc-3.exe -mno-cygwin -g" + CXX="g++-3.exe -mno-cygwin -g" # So libgc configure gets -mno-cygwin export CC export CXX CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB -mno-cygwin" + + # Test C compiler + AC_TRY_COMPILE([int main () { return 0; }], [], [AC_ERROR(C compiler gcc-3.exe doesn't seem to work. Make you sure have the 'gcc-core' and 'gcc-g++' cygwin packages installed.)]) else target_win32=yes AC_DEFINE(TARGET_WIN32,1,[Target OS is Win32/MinGW])