summaryrefslogtreecommitdiff
path: root/ghc.mk
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-05-12 20:31:45 +0100
committerIan Lynagh <ian@well-typed.com>2013-05-12 20:31:45 +0100
commit0aae29808d76ce45b88017102056f3391cec57a3 (patch)
treea00f38a8c5a86fa477aae34d970d81124fa7e54f /ghc.mk
parenta2be710f4bb005c2e339799da4b63d376adfaf6b (diff)
parentb35a6ce0e34255d200ddcf341ffc645fd237ea32 (diff)
downloadhaskell-0aae29808d76ce45b88017102056f3391cec57a3.tar.gz
Merge win:/cygdrive/c/ghc/git/dt
Diffstat (limited to 'ghc.mk')
-rw-r--r--ghc.mk27
1 files changed, 9 insertions, 18 deletions
diff --git a/ghc.mk b/ghc.mk
index b169dfbe70..eaee8720f4 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -204,6 +204,15 @@ GHCI_WAY = v
HADDOCK_WAY = v
endif
+WINDOWS_DYN_PROG_RTS := rts
+ifeq "$(GhcThreaded)" "YES"
+WINDOWS_DYN_PROG_RTS := $(WINDOWS_DYN_PROG_RTS)_thr
+endif
+ifeq "$(GhcDebugged)" "YES"
+WINDOWS_DYN_PROG_RTS := $(WINDOWS_DYN_PROG_RTS)_debug
+endif
+WINDOWS_DYN_PROG_RTS := $(WINDOWS_DYN_PROG_RTS)_dyn_LIB_NAME
+
# -----------------------------------------------------------------------------
# Compilation Flags
@@ -557,24 +566,6 @@ endif
endif
# ----------------------------------------
-# Special magic for the packages which link to the RTS
-# This is a rather ugly hack to fix dynamically linked GHC on Windows.
-# If GHC is linked with -threaded, then it links against libHSrts_thr.
-# But if base is linked against libHSrts, then both end up getting
-# loaded, and things go wrong. We therefore link the libraries that
-# link against the RTS with the same RTS flags that we link GHC with.
-ifeq "$(GhcThreaded)" "YES"
-libraries/ghc-prim_dist-install_MORE_HC_OPTS += -threaded
-libraries/integer-gmp_dist-install_MORE_HC_OPTS += -threaded
-libraries/base_dist-install_MORE_HC_OPTS += -threaded
-endif
-ifeq "$(GhcDebugged)" "YES"
-libraries/ghc-prim_dist-install_MORE_HC_OPTS += -debug
-libraries/integer-gmp_dist-install_MORE_HC_OPTS += -debug
-libraries/base_dist-install_MORE_HC_OPTS += -debug
-endif
-
-# ----------------------------------------
# Workarounds for problems building DLLs on Windows
ifeq "$(TargetOS_CPP)" "mingw32"