(cc'd ghc-devs)

Hi Johan and David.

I've noticed that you used "HC_OPTS += -O2 ..." in the Makefiles for the shootout programs, eg in your commits a735c7a1 and a9cdc8b1.
 
I'm not seeing a way to override those options when invoking make on the command line. I've been using something like
 
  EXTRA_HC_OPTS="-O1 ..."
 
in order to build the tests *without* -O2, but $(EXTRA_HC_OPTS) comes before $(HC_OPTS) on the generated command line; from ghc-opts.mk:
 
HC_OPTS            = $(BOOTSTRAPPING_PACKAGE_CONF_HC_OPTS) $(SRC_HC_OPTS) $(WAY$(_way)_HC_OPTS) $($*_HC_OPTS) $(EXTRA_HC_OPTS)
 
Thus I can't turn -O2 off. I want to turn -O2 off, eg, since if I cause some horrific change in the code, I want to see it, even if -O2 would undo it.
 
From ghc-opts.mk, again:
 
# SRC_P_OPTS  Source-tree options for P
I suspect the options you put in HC_OPTS would better fit in SRC_HC_OPTS.
 
What do you think?
 
Thanks.