diff options
author | Simon Marlow <simonmar@microsoft.com> | 2008-04-02 05:14:12 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2008-04-02 05:14:12 +0000 |
commit | c245355e6f2c7b7c95e9af910c4d420e13af9413 (patch) | |
tree | e8309f467b8bea2501e9f7de7af86fbfc22e0a67 /rts/StgCRun.c | |
parent | ab5c770bed51f08d56a0d61086988053b21aa461 (diff) | |
download | haskell-c245355e6f2c7b7c95e9af910c4d420e13af9413.tar.gz |
Do not #include external header files when compiling via C
This has several advantages:
- -fvia-C is consistent with -fasm with respect to FFI declarations:
both bind to the ABI, not the API.
- foreign calls can now be inlined freely across module boundaries, since
a header file is not required when compiling the call.
- bootstrapping via C will be more reliable, because this difference
in behavour between the two backends has been removed.
There is one disadvantage:
- we get no checking by the C compiler that the FFI declaration
is correct.
So now, the c-includes field in a .cabal file is always ignored by
GHC, as are header files specified in an FFI declaration. This was
previously the case only for -fasm compilations, now it is also the
case for -fvia-C too.
Diffstat (limited to 'rts/StgCRun.c')
-rw-r--r-- | rts/StgCRun.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/StgCRun.c b/rts/StgCRun.c index 376e824055..a211da3577 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -66,6 +66,8 @@ register double fake_f9 __asm__("$f9"); /* include Stg.h first because we want real machine regs in here: we * have to get the value of R1 back from Stg land to C land intact. */ +// yeuch +#define IN_STGCRUN 1 #include "Stg.h" #include "Rts.h" #include "StgRun.h" |