passing CFLAGS and LDFLAGS to ghc via Cabal?

Jens Petersen juhpetersen at gmail.com
Mon Oct 27 08:50:41 UTC 2014


On 25 October 2014 05:10, Sergei Trofimovich <slyich at gmail.com> wrote:
>
> I believe the proper way to pass them is via
>     --ghc-option="-optc$EACH_CFLAG -optl$EACH_LDFLAG -opta$EACH_ASFLAG"
> as Cabal uses ghc to compile .c/.cpp files.
>

Thanks Sergei that helped a lot. :)

I can now get proper debuginfo generated for libraries,
but somehow not for executables: but that looks
like some ghc behaviour problem perhaps.

http://pkgs.fedoraproject.org/cgit/ghc-rpm-macros.git/tree/macros.ghc?id=e5c8c16492266bfe8ef02ec58cac0f745533e165#n26
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/cabal-devel/attachments/20141027/344e0cf6/attachment.html>


More information about the cabal-devel mailing list