[commit: ghc] master: Replace mkDerivedConstants.c with DeriveConstants.hs (f49271c)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/f49271c06434cace6f955c7b651295f0f1db3a03

>---------------------------------------------------------------

commit f49271c06434cace6f955c7b651295f0f1db3a03
Author: Ian Lynagh <[email protected]>
Date:   Sat Nov 10 23:28:58 2012 +0000

    Replace mkDerivedConstants.c with DeriveConstants.hs
    
    DeriveConstants.hs works in a cross-compilation-friendly way. Rather
    than running a C program that prints out the constants, we just compile
    a C file which has the constants are encoded in symbol sizes. We then
    parse the output of 'nm' to find out what the constants are.
    
    Based on work by Gabor Greif <[email protected]>.

 compiler/ghc.mk                                  |   10 +
 compiler/main/DynFlags.hs                        |    4 +-
 ghc.mk                                           |    2 +
 includes/ghc.mk                                  |   78 +--
 includes/mkDerivedConstants.c                    |  829 ---------------------
 includes/mkDerivedConstants.cross.awk            |  350 ---------
 includes/mkSizeMacros.cross.awk                  |   82 --
 utils/deriveConstants/DeriveConstants.hs         |  858 ++++++++++++++++++++++
 {driver/split => utils/deriveConstants}/Makefile |    4 +-
 {driver/split => utils/deriveConstants}/ghc.mk   |   12 +-
 10 files changed, 902 insertions(+), 1327 deletions(-)


Diff suppressed because of size. To see it, use:

    git show f49271c06434cace6f955c7b651295f0f1db3a03
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.