X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=mk%2Fconfig.mk.in;h=af7dbe9c6034a0708810967925e23712c7ff600e;hb=3ab57e452b212ca2cf361841b24d67aae1860b47;hp=2ddfe828a81d4d37497de15930391f623109601b;hpb=4574f821b6c47a7a6304e76bf36f618cda06ef6d;p=ghc-hetmet.git diff --git a/mk/config.mk.in b/mk/config.mk.in index 2ddfe82..af7dbe9 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -56,6 +56,13 @@ # will be built as HC files for the target system, and likely won't # build on this host platform. # +# An important invariant is that for any piece of source code, the +# platform on which the code is going to run is the HOST platform, +# and the platform on which we are building is the BUILD platform. +# Additionally for the compiler, the platform this compiler will +# generate code for is the TARGET. TARGET is not meaningful outside +# the compiler sources. +# # Guidelines for when to use HOST vs. TARGET: # # - In the build system (Makefile, foo.mk), normally we should test @@ -65,11 +72,10 @@ # # - In the compiler itself, we should test HOST or TARGET depending # on whether the conditional relates to the code being generated, or -# the platform on which the compiler is running. For stage 2, -# HOSTPLATFORM should be reset to be TARGETPLATFORM (we currently -# don't do this, but we should). +# the platform on which the compiler is running. See the section +# on "Coding Style" in the commentary for more details. # -# - In the RTS and library code, we should be testing TARGET only. +# - In all other code, we should be testing HOST only. # # NOTE: cross-compiling is not well supported by the build system. # You have to do a lot of work by hand to cross compile: see the @@ -313,8 +319,13 @@ endif # # -O is pretty desirable, otherwise no inlining of prelude # things (incl "+") happens when compiling with this compiler +# +# -fgenerics switches on generation of support code for +# derivable type classes. This is now off by default, +# but we switch it on for the libraries so that we generate +# the code in case someone importing wants it -GhcLibHcOpts=-O -Rghc-timing +GhcLibHcOpts=-O -Rghc-timing -fgenerics # Win32 only: Enable the RTS and libraries to be built as DLLs DLLized=@EnableWin32DLLs@ @@ -758,12 +769,6 @@ HaveLibMingwEx = @HaveLibMingwEx@ HaveFrameworkHaskellSupport = @HaveFrameworkHaskellSupport@ #----------------------------------------------------------------------------- -# Regex library -# (if present in libc use that one, otherwise use the one in the tree) -# -HavePosixRegex = @HavePosixRegex@ - -#----------------------------------------------------------------------------- # Flex (currently unused, could be moved to glafp-utils) # FLEX = @LEX@