Skip to content
Snippets Groups Projects
Commit b8ce5dfe authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

Define `TABLES_NEXT_TO_CODE` in the RTS configure

We create a new cabal flag to facilitate this.
parent 5cf04f58
No related branches found
No related tags found
No related merge requests found
......@@ -298,9 +298,6 @@ dnl ** Do a build with tables next to code?
dnl --------------------------------------------------------------
GHC_TABLES_NEXT_TO_CODE
if test x"$TablesNextToCode" = xYES; then
AC_DEFINE([TABLES_NEXT_TO_CODE], [1], [Define to 1 if info tables are laid out next to code])
fi
AC_SUBST(TablesNextToCode)
# Requires FPTOOLS_SET_PLATFORMS_VARS to be run first.
......
......@@ -281,8 +281,8 @@ rtsPackageArgs = package rts ? do
targetArch <- queryTarget queryArch
targetOs <- queryTarget queryOS
targetVendor <- queryTarget queryVendor
ghcUnreg <- yesNo <$> queryTarget tgtUnregisterised
ghcEnableTNC <- yesNo <$> queryTarget tgtTablesNextToCode
ghcUnreg <- queryTarget tgtUnregisterised
ghcEnableTNC <- queryTarget tgtTablesNextToCode
rtsWays <- getRtsWays
way <- getWay
path <- getBuildPath
......@@ -355,8 +355,8 @@ rtsPackageArgs = package rts ? do
, "-DTargetArch=" ++ show targetArch
, "-DTargetOS=" ++ show targetOs
, "-DTargetVendor=" ++ show targetVendor
, "-DGhcUnregisterised=" ++ show ghcUnreg
, "-DTablesNextToCode=" ++ show ghcEnableTNC
, "-DGhcUnregisterised=" ++ show (yesNo ghcUnreg)
, "-DTablesNextToCode=" ++ show (yesNo ghcEnableTNC)
, "-DRtsWay=\"rts_" ++ show way ++ "\""
]
......@@ -414,6 +414,7 @@ rtsPackageArgs = package rts ? do
, flag UseLibzstd `cabalFlag` "libzstd"
, flag StaticLibzstd `cabalFlag` "static-libzstd"
, queryTargetTarget tgtSymbolsHaveLeadingUnderscore `cabalFlag` "leading-underscore"
, ghcEnableTNC `cabalFlag` "tables-next-to-code"
, Debug `wayUnit` way `cabalFlag` "find-ptr"
]
, builder (Cabal Setup) ? mconcat
......
......@@ -50,6 +50,13 @@ fi
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
dnl ** Do a build with tables next to code?
dnl --------------------------------------------------------------
AS_IF(
[test "$CABAL_FLAG_tables_next_to_code" = 1],
[AC_DEFINE([TABLES_NEXT_TO_CODE], [1], [Define to 1 if info tables are laid out next to code])])
dnl detect compiler (prefer gcc over clang) and set $CC (unless CC already set),
dnl later CC is copied to CC_STAGE{1,2,3}
AC_PROG_CC([cc gcc clang])
......
......@@ -54,6 +54,8 @@ flag static-libzstd
default: False
flag leading-underscore
default: False
flag tables-next-to-code
default: False
flag smp
default: True
flag find-ptr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment