diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-08-06 22:51:28 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-08-06 22:51:28 +0100 |
commit | e6ef5ab66f51a8b821a4ae8646faca19cf600d94 (patch) | |
tree | 0ac8f5178caa80f1fabc3da22e46db8cb19a553a /compiler/main/SysTools.lhs | |
parent | 8e7fb28fc89eb9b99c747698f41995c269cd1090 (diff) | |
download | haskell-e6ef5ab66f51a8b821a4ae8646faca19cf600d94.tar.gz |
Make tablesNextToCode "dynamic"
This is a bit odd by itself, but it's a stepping stone on the way to
putting "target unregisterised" into the settings file.
Diffstat (limited to 'compiler/main/SysTools.lhs')
-rw-r--r-- | compiler/main/SysTools.lhs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs index 0928927888..295aa595e1 100644 --- a/compiler/main/SysTools.lhs +++ b/compiler/main/SysTools.lhs @@ -51,6 +51,7 @@ import Platform import Util import DynFlags import Exception +import StaticFlags import Data.IORef import Control.Monad @@ -217,7 +218,12 @@ initSysTools mbMinusB -- to make that possible, so for now you can't. gcc_prog <- getSetting "C compiler command" gcc_args_str <- getSetting "C compiler flags" - let gcc_args = map Option (words gcc_args_str) + let + -- TABLES_NEXT_TO_CODE affects the info table layout. + tntc_gcc_args + | tablesNextToCode' = ["-DTABLES_NEXT_TO_CODE"] + | otherwise = [] + gcc_args = map Option (words gcc_args_str ++ tntc_gcc_args) ldSupportsCompactUnwind <- getBooleanSetting "ld supports compact unwind" ldSupportsBuildId <- getBooleanSetting "ld supports build-id" ldIsGnuLd <- getBooleanSetting "ld is GNU ld" @@ -316,6 +322,14 @@ initSysTools mbMinusB sOpt_lo = [], sOpt_lc = [] } + +-- Derived, not a real option. 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. +tablesNextToCode' :: Bool +tablesNextToCode' = not opt_Unregisterised + && cGhcEnableTablesNextToCode == "YES" \end{code} \begin{code} |