Fix compiler invocation for GHC >= 7.8
authorNiklas Hambuechen <niklash@google.com>
Mon, 3 Nov 2014 11:14:09 +0000 (12:14 +0100)
committerKlaus Aehlig <aehlig@google.com>
Wed, 6 May 2015 17:16:31 +0000 (19:16 +0200)
commit3b5c24256e3a6a1dd5f0042afdec83f632724311
treed22311733b99f5049c1438ad0ce1f7bf7687b07e
parent3714c81358e0ae04cc28bc4a1d44dcb2c0aa01c7
Fix compiler invocation for GHC >= 7.8

GHC 7.8 switched to dynamic linking being used for ghci, which requires
that .so file are being built for modules that are loaded for TH.

For this reason, GHC >= 7.8 has a -dynamic-too flag, which we now use.

However, -dynamic-too must not be enabled for profiling builds,
which is why this commit introduces a HFLAGS_NOPROF variable
(currently only containing -dynamic-too) that must be passed to
all GHC invocations that are not creating profiling output.

Signed-off-by: Niklas Hambuechen <niklash@google.com>
Reviewed-by: Hrvoje Ribicic <riba@google.com>

Cherry-picked-from: 083776b
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Makefile.am