[commit: ghc] master: Remove outdated information about main() in HSrts (#1) (5c95e6b)
git at git.haskell.org
git at git.haskell.org
Sun Feb 26 23:15:31 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/5c95e6b7c2790c192720ba5a533d6d11fad570f8/ghc
>---------------------------------------------------------------
commit 5c95e6b7c2790c192720ba5a533d6d11fad570f8
Author: Ben Gamari <ben at smart-cactus.org>
Date: Sun Feb 26 17:34:09 2017 -0500
Remove outdated information about main() in HSrts (#1)
The main method is not contained in HSrts so the removed section is no longer valid.
>---------------------------------------------------------------
5c95e6b7c2790c192720ba5a533d6d11fad570f8
docs/users_guide/phases.rst | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst
index 01c2e1f..b1a6310 100644
--- a/docs/users_guide/phases.rst
+++ b/docs/users_guide/phases.rst
@@ -504,13 +504,11 @@ for example).
There's one other gotcha to bear in mind when using external
libraries: if the library contains a ``main()`` function, then this
- will be linked in preference to GHC's own ``main()`` function (eg.
- ``libf2c`` and ``libl`` have their own ``main()``\ s). This is
- because GHC's ``main()`` comes from the ``HSrts`` library, which is
- normally included *after* all the other libraries on the linker's
- command line. To force GHC's ``main()`` to be used in preference to
- any other ``main()``\ s from external libraries, just add the option
- ``-lHSrts`` before any other libraries on the command line.
+ will be a link conflict with GHC's own ``main()`` function (eg.
+ ``libf2c`` and ``libl`` have their own ``main()``\ s).
+
+ You can use an external main function if you initialize the RTS manually
+ and pass ``-no-hs-main``. See also :ref:`using-own-main`.
.. ghc-flag:: -c
More information about the ghc-commits
mailing list