[commit: ghc] master: Remove DYNAMIC_GHC_PROGRAMS tests in the linker (0717462)

git at git.haskell.org git at git.haskell.org
Thu Aug 22 22:34:24 CEST 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0717462d7724bfe904cffda5706dd74d0b31b883/ghc

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

commit 0717462d7724bfe904cffda5706dd74d0b31b883
Author: Simon Marlow <marlowsd at gmail.com>
Date:   Thu Aug 22 20:20:29 2013 +0100

    Remove DYNAMIC_GHC_PROGRAMS tests in the linker
    
    The linker is usable even when GHCi is dynamically linked.  These
    tests make the linker_unload test fail.


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

0717462d7724bfe904cffda5706dd74d0b31b883
 rts/Linker.c |   18 ------------------
 rts/ghc.mk   |    4 ----
 2 files changed, 22 deletions(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index 81a267d..e2817ad 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -137,16 +137,6 @@
 #include <sys/tls.h>
 #endif
 
-// Defining this as 'int' rather than 'const int' means that we don't get
-// warnings like
-//    error: function might be possible candidate for attribute ‘noreturn’
-// from gcc:
-#ifdef DYNAMIC_GHC_PROGRAMS
-int dynamicGhcPrograms = 1;
-#else
-int dynamicGhcPrograms = 0;
-#endif
-
 /* Hash table mapping symbol names to Symbol */
 static /*Str*/HashTable *symhash;
 
@@ -2183,10 +2173,6 @@ loadArchive( pathchar *path )
     IF_DEBUG(linker, debugBelch("loadArchive: start\n"));
     IF_DEBUG(linker, debugBelch("loadArchive: Loading archive `%" PATH_FMT" '\n", path));
 
-    if (dynamicGhcPrograms) {
-        barf("loadArchive called, but using dynamic GHC (%s)", path);
-    }
-
     gnuFileIndex = NULL;
     gnuFileIndexSize = 0;
 
@@ -2578,10 +2564,6 @@ loadObj( pathchar *path )
 #endif
    IF_DEBUG(linker, debugBelch("loadObj %" PATH_FMT "\n", path));
 
-   if (dynamicGhcPrograms) {
-       barf("loadObj called, but using dynamic GHC (%s)", path);
-   }
-
    initLinker();
 
    /* debugBelch("loadObj %s\n", path ); */
diff --git a/rts/ghc.mk b/rts/ghc.mk
index 4cc8e8d..10e6cd5 100644
--- a/rts/ghc.mk
+++ b/rts/ghc.mk
@@ -333,10 +333,6 @@ rts/RtsUtils_CC_OPTS += -DTargetVendor=\"$(TargetVendor_CPP)\"
 rts/RtsUtils_CC_OPTS += -DGhcUnregisterised=\"$(GhcUnregisterised)\"
 rts/RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=\"$(GhcEnableTablesNextToCode)\"
 
-ifeq "$(DYNAMIC_GHC_PROGRAMS)" "YES"
-rts/Linker_CC_OPTS += -DDYNAMIC_GHC_PROGRAMS
-endif
-
 # Compile various performance-critical pieces *without* -fPIC -dynamic
 # even when building a shared library.  If we don't do this, then the
 # GC runs about 50% slower on x86 due to the overheads of PIC.  The





More information about the ghc-commits mailing list