summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-04-06 13:56:53 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-04-07 12:39:00 -0400
commitd014ab0db0c167ab5a0f9cb15280aee6fd8f3621 (patch)
tree9c60484f66b951774db80f2de2e98e978087467a /mk
parent546f8b1478e43f18b25236a20c6c30fa986a046a (diff)
downloadhaskell-d014ab0db0c167ab5a0f9cb15280aee6fd8f3621.tar.gz
Remove dynamic-by-default (#16782)
Dynamic-by-default was a mechanism to automatically select the -dynamic way for some targets. It was implemented in a convoluted way: it was defined as a flavour option, hence it couldn't be passed as a global settings (which are produced by `configure` before considering flavours), so a build system rule was used to pass -DDYNAMIC_BY_DEFAULT to the C compiler so that deriveConstants could infer it. * Make build system has it disabled for 8 years (951e28c0625ece7e0db6ac9d4a1e61e2737b10de) * It has never been implemented in Hadrian * Last time someone tried to enable it 1 year ago it didn't work (!2436) * Having this as a global constant impedes making GHC multi-target (see !5427) This commit fully removes support for dynamic-by-default. If someone wants to reimplement something like this, it would probably need to move the logic in the compiler. (Doing this would probably need some refactoring of the way the compiler handles DynFlags: DynFlags are used to store and to pass enabled ways to many parts of the compiler. It can be set by command-line flags, GHC API, global settings. In multi-target GHC, we will use DynFlags to load the target platform and its constants: but at this point with the current DynFlags implementation we can't easily update the existing DynFlags with target-specific options such as dynamic-by-default without overriding ways previously set by the user.)
Diffstat (limited to 'mk')
-rw-r--r--mk/config.mk.in20
-rw-r--r--mk/flavours/bench-cross-ncg.mk1
-rw-r--r--mk/flavours/bench-cross.mk1
-rw-r--r--mk/flavours/perf-cross-ncg.mk1
-rw-r--r--mk/flavours/perf-cross.mk1
-rw-r--r--mk/flavours/quick-cross-ncg.mk1
-rw-r--r--mk/flavours/quick-cross.mk1
7 files changed, 0 insertions, 26 deletions
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 9e6c3d8c40..086a9147f2 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -124,26 +124,6 @@ endif
PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\
$(NoSharedLibsPlatformList)),NO,YES)
-# DYNAMIC_BY_DEFAULT says whether this compiler will default to
-# building dynamic executables, i.e. -dynamic is on. We do this for
-# most platforms because it lets us use the system dynamic linker
-# instead of our own linker for GHCi.
-#
-# Currently this isn't possible on Windows, and we have not yet enabled
-# it on i386 while we consider the performance implications.
-#
-ifeq "$(TargetOS_CPP)" "mingw32"
-DYNAMIC_BY_DEFAULT = NO
-else ifeq "$(TargetArch_CPP)" "i386"
-DYNAMIC_BY_DEFAULT = NO
-else
-DYNAMIC_BY_DEFAULT = YES
-endif
-
-# For now, we unconditionally disable dynamic-by-default, as the
-# cabal-install's that are in the wild don't handle it properly.
-DYNAMIC_BY_DEFAULT = NO
-
# If building both v and dyn ways, then use -dynamic-too to build them.
# This makes the build faster.
DYNAMIC_TOO = YES
diff --git a/mk/flavours/bench-cross-ncg.mk b/mk/flavours/bench-cross-ncg.mk
index 727f9301ae..d52eb1ca80 100644
--- a/mk/flavours/bench-cross-ncg.mk
+++ b/mk/flavours/bench-cross-ncg.mk
@@ -12,5 +12,4 @@ WITH_TERMINFO = NO
BIGNUM_BACKEND = native
Stage1Only = YES
-DYNAMIC_BY_DEFAULT = NO
DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/bench-cross.mk b/mk/flavours/bench-cross.mk
index fa332fe9f6..98f0531bc7 100644
--- a/mk/flavours/bench-cross.mk
+++ b/mk/flavours/bench-cross.mk
@@ -12,5 +12,4 @@ WITH_TERMINFO = NO
BIGNUM_BACKEND = native
Stage1Only = YES
-DYNAMIC_BY_DEFAULT = NO
DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/perf-cross-ncg.mk b/mk/flavours/perf-cross-ncg.mk
index fefff049d3..61db9b5d43 100644
--- a/mk/flavours/perf-cross-ncg.mk
+++ b/mk/flavours/perf-cross-ncg.mk
@@ -11,5 +11,4 @@ WITH_TERMINFO = NO
BIGNUM_BACKEND = native
Stage1Only = YES
-DYNAMIC_BY_DEFAULT = NO
DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/perf-cross.mk b/mk/flavours/perf-cross.mk
index 36d33b68b5..7b85cc6979 100644
--- a/mk/flavours/perf-cross.mk
+++ b/mk/flavours/perf-cross.mk
@@ -11,5 +11,4 @@ WITH_TERMINFO = NO
BIGNUM_BACKEND = native
Stage1Only = YES
-DYNAMIC_BY_DEFAULT = NO
DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/quick-cross-ncg.mk b/mk/flavours/quick-cross-ncg.mk
index 55e62f6b0f..748720f01c 100644
--- a/mk/flavours/quick-cross-ncg.mk
+++ b/mk/flavours/quick-cross-ncg.mk
@@ -12,5 +12,4 @@ WITH_TERMINFO = NO
BIGNUM_BACKEND = native
Stage1Only = YES
-DYNAMIC_BY_DEFAULT = NO
DYNAMIC_GHC_PROGRAMS = NO
diff --git a/mk/flavours/quick-cross.mk b/mk/flavours/quick-cross.mk
index 07ed5f06ff..4e3f47fd67 100644
--- a/mk/flavours/quick-cross.mk
+++ b/mk/flavours/quick-cross.mk
@@ -12,5 +12,4 @@ WITH_TERMINFO = NO
BIGNUM_BACKEND = native
Stage1Only = YES
-DYNAMIC_BY_DEFAULT = NO
DYNAMIC_GHC_PROGRAMS = NO