Misuse of SRC_HC_OPTS
Originally reported here: http://www.haskell.org/pipermail/cvs-ghc/2009-May/048719.html
Thu May 21 07:19:38 PDT 2009 Ian Lynagh<igloo at earth.li> * Don't overwrite the *OPTS/*Opts variables in mk/validate-settings.mk Overwriting means we lose the -m64 on OS X 64. M ./mk/validate-settings.mk -5 +5
This is a bit worrying. We are really mis-using SRC_HC_OPTS all over the place (e.g. build.mk.sample), but usually we get away with it because SRC_HC_OPTS is only used for things like optimisation and heap settings that won't cause the build to fail if they are lost.
The right thing to do would be to introduce new variables for flags like optimisation and heap settings, that can safely be overriden, and keep SRC_HC_OPTS for flags that are part of the build system.
In any case, we need to do something here. If SRC_HC_OPTS cannot be overridden, the docs are wrong, and build.mk.sample is broken.