summaryrefslogtreecommitdiff
path: root/ghc/Main.hs
diff options
context:
space:
mode:
authorZubin Duggal <zubin.duggal@gmail.com>2021-07-06 15:40:43 +0530
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-08-03 10:15:11 -0400
commitbbee89ddfe4b5df14e76d70d92b40648bd5d88b1 (patch)
tree3189ae95c8bd4006f8cbab6207b97843e2cf361e /ghc/Main.hs
parentc248e7cc19b27130542a4ff3227ec99d9d50b8d1 (diff)
downloadhaskell-bbee89ddfe4b5df14e76d70d92b40648bd5d88b1.tar.gz
Remove hschooks.c and -no-hs-main for ghc-bin
Diffstat (limited to 'ghc/Main.hs')
-rw-r--r--ghc/Main.hs24
1 files changed, 0 insertions, 24 deletions
diff --git a/ghc/Main.hs b/ghc/Main.hs
index 2db9a99005..b9b1265f1e 100644
--- a/ghc/Main.hs
+++ b/ghc/Main.hs
@@ -102,7 +102,6 @@ import Prelude
main :: IO ()
main = do
- initGCStatistics -- See Note [-Bsymbolic and hooks]
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering
@@ -917,26 +916,3 @@ unknownFlagsErr fs = throwGhcException $ UsageError $ concatMap oneError fs
fName = takeWhile (/= '=') f
in (fuzzyMatch f flagsWithEq) ++ (fuzzyMatch fName flagsWithoutEq)
| otherwise = fuzzyMatch f allFlags
-
-{- Note [-Bsymbolic and hooks]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--Bsymbolic is a flag that prevents the binding of references to global
-symbols to symbols outside the shared library being compiled (see `man
-ld`). When dynamically linking, we don't use -Bsymbolic on the RTS
-package: that is because we want hooks to be overridden by the user,
-we don't want to constrain them to the RTS package.
-
-Unfortunately this seems to have broken somehow on OS X: as a result,
-defaultHooks (in hschooks.c) is not called, which does not initialize
-the GC stats. As a result, this breaks things like `:set +s` in GHCi
-(#8754). As a hacky workaround, we instead call 'defaultHooks'
-directly to initialize the flags in the RTS.
-
-A byproduct of this, I believe, is that hooks are likely broken on OS
-X when dynamically linking. But this probably doesn't affect most
-people since we're linking GHC dynamically, but most things themselves
-link statically.
--}
-
-foreign import ccall safe "initGCStatistics"
- initGCStatistics :: IO ()