summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-11-22 21:35:29 +0000
committerIan Lynagh <ian@well-typed.com>2012-11-22 21:35:29 +0000
commitc22850f7c950009ee4de84c20dc4a6cf7c0b500f (patch)
treee6fb1b4e4f97841ab958ea3532e793e9a7d1be08
parent704f8024c75ab147c6f9558b1c76525f132e4f14 (diff)
downloadhaskell-c22850f7c950009ee4de84c20dc4a6cf7c0b500f.tar.gz
Enable dynamic-by-default for unregisterised arches
This makes ghci work on platforms without any special support in the GHCi linker: Prelude> (System.Info.os, System.Info.arch) ("linux","s390")
-rw-r--r--mk/config.mk.in22
1 files changed, 11 insertions, 11 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 65a595729b..bc85bd479f 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -132,21 +132,21 @@ endif
PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\
$(SharedLibsPlatformList)),YES,NO)
-SharedLibsByDefaultPlatformList = \
- x86_64-unknown-linux \
- x86_64-apple-darwin
-
-# DYANMIC_BY_DEFAULT says whether this compiler will default to
+# DYNAMIC_BY_DEFAULT says whether this compiler will default to
# building dynamic executables, i.e. -dynamic is on. We do this for
-# certain platforms because it lets us use the system dynamic linker
+# most platforms because it lets us use the system dynamic linker
# instead of our own linker for GHCi.
#
-# We do not enable this for an unregisterised build. It is currently
-# unknown whether shared libraries (should) work when unregisterised.
+# Currently this isn't possible on Windows, and we have not yet enabled
+# it on i386 while we consider the performance implications.
#
-DYNAMIC_BY_DEFAULT = $(strip $(if $(filter YES,$(GhcUnregisterised)),NO,\
- $(if $(filter $(TARGETPLATFORM),\
- $(SharedLibsByDefaultPlatformList)),YES,NO)))
+ifeq "$(TargetOS_CPP)" "mingw32"
+DYNAMIC_BY_DEFAULT = NO
+else ifeq "$(TargetArch_CPP)" "i386"
+DYNAMIC_BY_DEFAULT = NO
+else
+DYNAMIC_BY_DEFAULT = YES
+endif
# Build a compiler that will build *unregisterised* libraries and
# binaries by default. Unregisterised code is supposed to compile and