[project @ 1999-07-14 08:41:21 by simonmar]
[ghc-hetmet.git] / ghc / docs / users_guide / using.vsgml
index 42cb002..61c5ef4 100644 (file)
@@ -886,7 +886,7 @@ generator and bypass GCC altogether!
 <nidx>-Onot option</nidx>
 <nidx>optimising, reset</nidx>
 
-This option will make GHC ``forget'' any -Oish options it has seen so
+This option will make GHC ``forget'' any @-O@ish options it has seen so
 far.  Sometimes useful; for example: @make all EXTRA_HC_OPTS=-Onot@.
 
 <tag>@-Ofile <file>@:</tag>
@@ -908,7 +908,7 @@ At Glasgow, we don't use a @-O*@ flag for day-to-day work.  We use
 something.  When we want to go for broke, we tend to use @-O -fvia-C
 -O2-for-C@ (and we go for lots of coffee breaks).
 
-The easiest way to see what @-O@ (etc) ``really mean'' is to run with
+The easiest way to see what @-O@ (etc.) ``really mean'' is to run with
 @-v@, then stand back in amazement.  Alternatively, just look at the
 @HsC_minus<blah>@ lists in the @ghc@ driver script.
 
@@ -1315,6 +1315,22 @@ incompatibly-compiled programs; e.g., if one @.o@ file was compiled
 for a parallel machine and the others weren't.)  You may turn off this
 check with @-no-link-chk@.  You can turn it (back) on with
 @-link-chk@ (the default).
+
+<tag><tt>-no-hs-main</tt>:</tag>
+<nidx>-no-hs-main option</nidx>
+<nidx>linking Haskell libraries with foreign code</nidx>
+
+In the event you want to include ghc-compiled code as part of another
+(non-Haskell) program, the RTS will not be supplying its definition of
+<tt/main()/ at link-time, you will have to. To signal that to the
+driver script when linking, use <tt/-no-hs-main/.
+
+Notice that since the command-line passed to the linker is rather
+involved, you probably want to use the ghc driver script to do the
+final link of your `mixed-language' application. This is not a
+requirement though, just try linking once with <tt/-v/ on to see what
+options the driver passes through to the linker.
+
 </descrip>
 
 %************************************************************************