SRC_HC_OPTS instead of HC_OPTS in nofib shootout/ & fibon/?

Nicolas Frisby nicolas.frisby at
Tue Mar 12 11:50:41 CET 2013

(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

$(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

More information about the ghc-devs mailing list