Commit 0717462d authored by Simon Marlow's avatar Simon Marlow

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.
parent c24be4b7
......@@ -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 ); */
......
......@@ -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
......
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