Commit c22850f7 authored by ian@well-typed.com's avatar ian@well-typed.com

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")
parent 704f8024
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment