[commit: ghc] master: Make DYNAMIC_BY_DEFAULT=NO when GhcUnregisterised (092c0bd)

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/092c0bd466230cf248ecb996fd5891c413ed7b7d

>---------------------------------------------------------------

commit 092c0bd466230cf248ecb996fd5891c413ed7b7d
Author: Simon Marlow <[email protected]>
Date:   Mon Oct 29 13:50:35 2012 +0000

    Make DYNAMIC_BY_DEFAULT=NO when GhcUnregisterised

>---------------------------------------------------------------

 mk/config.mk.in |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/mk/config.mk.in b/mk/config.mk.in
index 366d511..a906d25 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -136,8 +136,17 @@ SharedLibsByDefaultPlatformList =               \
                          x86_64-unknown-linux   \
                          x86_64-apple-darwin
 
-DYNAMIC_BY_DEFAULT = $(if $(filter $(TARGETPLATFORM),\
-	$(SharedLibsByDefaultPlatformList)),YES,NO)
+# DYANMIC_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
+# 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.
+#
+DYNAMIC_BY_DEFAULT = $(strip $(if $(filter YES,$(GhcUnregisterised)),NO,\
+			  $(if $(filter $(TARGETPLATFORM),\
+				$(SharedLibsByDefaultPlatformList)),YES,NO)))
 
 # Build a compiler that will build *unregisterised* libraries and
 # binaries by default.  Unregisterised code is supposed to compile and
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.