Changes between Version 1 and Version 2 of Commentary/Compiler/Backends/PprC


Ignore:
Timestamp:
Apr 9, 2008 6:54:48 PM (7 years ago)
Author:
simonmar
Comment:

add bit about header files

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/Compiler/Backends/PprC

    v1 v2  
    1313   next to functions.  The desired layout is reconstructed in the assembly file by the [wiki:Commentary/EvilMangler Evil Mangler],
    1414   or not if we're compiling unregisterised (see [wiki:Commentary/Rts/HeapObjects#TABLES_NEXT_TO_CODE TABLES_NEXT_TO_CODE]).
     15
     16
     17== Header files ==
     18
     19GHC was changed (from version 6.10) so that the C backend no longer uses header files specified by the user in any way.  The `c-includes` field of a `.cabal` file is ignored, as is the `-#include` flag on the command-line.  There were several reasons for making this change:
     20
     21This has several advantages:
     22 
     23  * `-fvia-C` is consistent with `-fasm` with respect to FFI declarations:
     24     both bind to the ABI, not the API.
     25 
     26  * foreign calls can now be inlined freely across module boundaries, since
     27    a header file is not required when compiling the call.
     28 
     29  * bootstrapping via C will be more reliable, because this difference
     30    in behavour between the two backends has been removed.
     31 
     32  There is one disadvantage:
     33 
     34  * we get no checking by the C compiler that the FFI declaration
     35    is correct.
     36 
     37== Prototypes ==
     38