From: simonmar Date: Mon, 30 Apr 2001 09:50:49 +0000 (+0000) Subject: [project @ 2001-04-30 09:50:49 by simonmar] X-Git-Tag: Approximately_9120_patches~2067 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0e42215db2bb7eaee9682fce1b2e95a06a8a955d;p=ghc-hetmet.git [project @ 2001-04-30 09:50:49 by simonmar] better "#define IN_STG_CODE 0" before including the standard HC header in a foreign export dynamic stub, because this isn't really HC code. --- diff --git a/ghc/compiler/main/CodeOutput.lhs b/ghc/compiler/main/CodeOutput.lhs index 27ac252..1983acc 100644 --- a/ghc/compiler/main/CodeOutput.lhs +++ b/ghc/compiler/main/CodeOutput.lhs @@ -194,7 +194,12 @@ outputForeignStubs dflags c_code h_code stub_c_file_exists <- outputForeignStubs_help (hscStubCOutName dflags) stub_c_output_w - (hc_header ++ "#include \"RtsAPI.h\"\n") + ("#define IN_STG_CODE 0\n" ++ + hc_header ++ + "#include \"RtsAPI.h\"\n") + -- we're adding the default hc_header to the stub file, but this + -- isn't really HC code, so we need to define IN_STG_CODE==0 to + -- avoid the register variables etc. being enabled. return (stub_h_file_exists, stub_c_file_exists) where