Replace mkDerivedConstants.c with DeriveConstants.hs
authorIan Lynagh <ian@well-typed.com>
Sat, 10 Nov 2012 23:28:58 +0000 (23:28 +0000)
committerIan Lynagh <ian@well-typed.com>
Mon, 12 Nov 2012 22:37:55 +0000 (22:37 +0000)
commitf49271c06434cace6f955c7b651295f0f1db3a03
treee1a595dd621388cd36b1ecdbe595d7e126e2c92d
parentb78b6b3472511c7e39d5c91b0449a59e0f361dcf
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 <ggreif@gmail.com>.
compiler/ghc.mk
compiler/main/DynFlags.hs
ghc.mk
includes/ghc.mk
includes/mkDerivedConstants.c [deleted file]
includes/mkDerivedConstants.cross.awk [deleted file]
includes/mkSizeMacros.cross.awk [deleted file]
utils/deriveConstants/DeriveConstants.hs [new file with mode: 0644]
utils/deriveConstants/Makefile [new file with mode: 0644]
utils/deriveConstants/ghc.mk [new file with mode: 0644]