])# FP_EVAL_STDERR
-# FP_CHECK_FLAG(FLAG, [ACTION-IF-SUPPORTED], [ACTION-IF-NOT-SUPPORTED])
-# ---------------------------------------------------------------------
-# Check to see whether the compiler for the current language supports a
-# particular option.
-#
-# Implementation note: When given an unkown option, GCC issues an warning on
-# stderr only, but returns an exit value of 0 nevertheless. Consequently we have
-# to check stderr *and* the exit value.
-#
-# Used by ghc.
-AC_DEFUN([FP_CHECK_FLAG],
-[AC_LANG_COMPILER_REQUIRE()dnl
-AC_LANG_CASE([C], [fp_compiler="$CC" m4_pushdef([fp_Flags], [CFLAGS])],
- [C++], [fp_compiler="$CXX" m4_pushdef([fp_Flags], [CXXFLAGS])],
- [Fortran 77], [fp_compiler="$F77" m4_pushdef([fp_Flags], [FFLAGS])])
-m4_pushdef([fp_Cache], [fp_cv_[]fp_Flags[]AS_TR_SH([$1])])[]dnl
-AC_CACHE_CHECK([whether $fp_compiler accepts $1], [fp_Cache],
-[AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
-fp_save_flags="$fp_Flags"
-fp_Flags="$fp_Flags $1"
-fp_Cache=no
-if FP_EVAL_STDERR([$ac_compile conftest.$ac_ext]) >/dev/null; then
- test -s conftest.err || fp_Cache=yes
-fi
-fp_Flags="$fp_save_flags"
-rm -f conftest.err conftest.$ac_ext])
-AS_IF([test $fp_Cache = yes], [$2], [$3])[]dnl
-m4_popdef([fp_Cache])[]dnl
-m4_popdef([fp_Flags])[]dnl
-])# FP_CHECK_FLAG
-
-
# FP_PROG_CONTEXT_DIFF
# --------------------
# Figure out how to do context diffs. Sets the output variable ContextDiffCmd.
sta = opt_Static
in
( [ if sta then "-DDONT_WANT_WIN32_DLL_SUPPORT" else ""
--- , if "mingw32" `isSuffixOf` cTARGETPLATFORM then "-mno-cygwin" else ""
],
[ "-fno-defer-pop",
"-fomit-frame-pointer",
dnl ** Without optimization some INLINE trickery fails for GHCi
SRC_CC_OPTS="-O"
-dnl ** Try to add -mno-cygwin to the C compiler options
-FP_CHECK_FLAG([-mno-cygwin], [
-SRC_CC_OPTS="-mno-cygwin $SRC_CC_OPTS"
-CPPFLAGS="-mno-cygwin $CPPFLAGS"])
AC_SUBST(SRC_CC_OPTS)
dnl ** figure out how to do context diffs
TargetPlatform=i386-unknown-cygwin32;;
i[[3456]]86-*-mingw32*)
exeext='.exe'
- # We assume you're using mingw32 via the gcc that comes
- # with cygwin, and not the native port, so let's augment
- # the gcc command-line used here with -mno-cygwin -mwin32
- # to arrange for good things to happen.
- CFLAGS="-mno-cygwin -mwin32 $CFLAGS"
TargetPlatform=i386-unknown-mingw32
;;
i[[3456]]86-apple-darwin*)
* To compile:
*
* MSVC: cl /o ghci.exe /c ghciwrap.c
- * mingw: gcc -mno-cygwin -o ghci.exe ghciwrap.c
+ * mingw: gcc -o ghci.exe ghciwrap.c
*
* If you want to associate your own icon with the wrapper,
* here's how to do it:
* * Add the resulting .res file to the link line of the wrapper:
*
* MSVC: cl /o ghci.exe /c ghciwrap.c ghci.res
- * mingw: gcc -mno-cygwin -o ghci.exe ghciwrap.c ghci.res
+ * mingw: gcc -o ghci.exe ghciwrap.c ghci.res
*
*/
PLATFORM_HC_BOOT_CC_OPTS += -finhibit-size-directive
endif
-ifeq "$(mingw32_TARGET_OS)" "1"
-PLATFORM_CC_OPTS += -mno-cygwin
-endif
-
ifeq "$(alpha_TARGET_ARCH)" "1"
PLATFORM_CC_OPTS += -static -w
PLATFORM_HC_BOOT_CC_OPTS += -mieee
WAY$(_way)_LINT_OPTS += WAY$(_way)_CPP_OPTS
# Default fptools options for dllwrap.
-SRC_BLD_DLL_OPTS += -mno-cygwin --target=i386-mingw32
+SRC_BLD_DLL_OPTS += --target=i386-mingw32
# Flags for CPP when running GreenCard on .pgc files
GC_CPP_OPTS += -P -E -x c -traditional -D__GLASGOW_HASKELL__
include $(TOP)/mk/target.mk
-# Win32: cygwin supports symlinks, so make sure we
-# don't feed in the mingw flags here. In other
-# words, lndir.exe is a cygwin-based app.
-CC_OPTS := $(filter-out -mno-cygwin,$(CC_OPTS))