summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/phases.rst12
1 files changed, 5 insertions, 7 deletions
diff --git a/docs/users_guide/phases.rst b/docs/users_guide/phases.rst
index 01c2e1f35f..b1a6310e6d 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