summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ghc.mk2
-rw-r--r--compiler/main/DynFlags.hs18
-rw-r--r--compiler/main/SysTools.hs4
3 files changed, 12 insertions, 12 deletions
diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 69eff31330..988759ecb1 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -106,8 +106,6 @@ ifeq "$(GhcRtsWithLibdw)" "YES"
else
@echo 'cGhcRtsWithLibdw = False' >> $@
endif
- @echo 'cGhcEnableTablesNextToCode :: String' >> $@
- @echo 'cGhcEnableTablesNextToCode = "$(GhcEnableTablesNextToCode)"' >> $@
@echo 'cLeadingUnderscore :: String' >> $@
@echo 'cLeadingUnderscore = "$(LeadingUnderscore)"' >> $@
@echo 'cLibFFI :: Bool' >> $@
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 786deccf3c..01750a8bd0 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -1353,7 +1353,10 @@ data Settings = Settings {
sOpt_lcc :: [String], -- LLVM: c compiler
sOpt_i :: [String], -- iserv options
- sPlatformConstants :: PlatformConstants
+ sPlatformConstants :: PlatformConstants,
+
+ -- Formerly Config.hs, target specific
+ sTablesNextToCode :: Bool
}
targetPlatform :: DynFlags -> Platform
@@ -1621,17 +1624,14 @@ defaultObjectTarget platform
| cGhcWithNativeCodeGen == "YES" = HscAsm
| otherwise = HscLlvm
-tablesNextToCode :: DynFlags -> Bool
-tablesNextToCode dflags
- = mkTablesNextToCode (platformUnregisterised (targetPlatform dflags))
-
-- Determines whether we will be compiling
-- info tables that reside just before the entry code, or with an
-- indirection to the entry code. See TABLES_NEXT_TO_CODE in
-- includes/rts/storage/InfoTables.h.
-mkTablesNextToCode :: Bool -> Bool
-mkTablesNextToCode unregisterised
- = not unregisterised && cGhcEnableTablesNextToCode == "YES"
+tablesNextToCode :: DynFlags -> Bool
+tablesNextToCode dflags =
+ not (platformUnregisterised $ targetPlatform dflags) &&
+ sTablesNextToCode (settings dflags)
data DynLibLoader
= Deployable
@@ -5621,7 +5621,7 @@ compilerInfo dflags
("Object splitting supported", showBool False),
("Have native code generator", cGhcWithNativeCodeGen),
("Support SMP", cGhcWithSMP),
- ("Tables next to code", cGhcEnableTablesNextToCode),
+ ("Tables next to code", showBool $ sTablesNextToCode $ settings dflags),
("RTS ways", cGhcRTSWays),
("RTS expects libdw", showBool cGhcRtsWithLibdw),
-- Whether or not we support @-dynamic-too@
diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
index 6eccdd7ec6..4374c35dcf 100644
--- a/compiler/main/SysTools.hs
+++ b/compiler/main/SysTools.hs
@@ -184,6 +184,7 @@ initSysTools top_dir
targetHasGnuNonexecStack <- readSetting "target has GNU nonexec stack"
targetHasIdentDirective <- readSetting "target has .ident directive"
targetHasSubsectionsViaSymbols <- readSetting "target has subsections via symbols"
+ tablesNextToCode <- getBooleanSetting "Tables next to code"
myExtraGccViaCFlags <- getSetting "GCC extra via C opts"
-- On Windows, mingw is distributed with GHC,
-- so we look in TopDir/../mingw/bin,
@@ -303,7 +304,8 @@ initSysTools top_dir
sOpt_lo = [],
sOpt_lc = [],
sOpt_i = [],
- sPlatformConstants = platformConstants
+ sPlatformConstants = platformConstants,
+ sTablesNextToCode = tablesNextToCode
}