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>.
Showing
- compiler/ghc.mk 10 additions, 0 deletionscompiler/ghc.mk
- compiler/main/DynFlags.hs 2 additions, 2 deletionscompiler/main/DynFlags.hs
- ghc.mk 2 additions, 0 deletionsghc.mk
- includes/ghc.mk 22 additions, 56 deletionsincludes/ghc.mk
- includes/mkDerivedConstants.c 0 additions, 829 deletionsincludes/mkDerivedConstants.c
- includes/mkDerivedConstants.cross.awk 0 additions, 350 deletionsincludes/mkDerivedConstants.cross.awk
- includes/mkSizeMacros.cross.awk 0 additions, 82 deletionsincludes/mkSizeMacros.cross.awk
- utils/deriveConstants/DeriveConstants.hs 858 additions, 0 deletionsutils/deriveConstants/DeriveConstants.hs
- utils/deriveConstants/Makefile 15 additions, 0 deletionsutils/deriveConstants/Makefile
- utils/deriveConstants/ghc.mk 19 additions, 0 deletionsutils/deriveConstants/ghc.mk
Loading
Please register or sign in to comment