Workaround bug with old distributions c99 issue

When in c99 mode (which is needed for some of our newer additions),
old distributions has an glibc inlining bug which triggers lots of
duplicated symbols.

Add a cabal flag to revert the inliner to c89 mode.

Fixes #64
This commit is contained in:
Vincent Hanquez 2016-02-10 12:05:42 +00:00
parent b7d12b957b
commit c82785473d

View File

@ -80,6 +80,11 @@ Flag support_deepseq
Default: True
Manual: True
Flag old_toolchain_inliner
Description: use -fgnu89-inline to workaround an old compiler / linker / glibc issue.
Default: False
Manual: True
Library
Exposed-modules: Crypto.Cipher.AES
Crypto.Cipher.Blowfish
@ -187,6 +192,8 @@ Library
ghc-options: -Wall -fwarn-tabs -optc-O3 -fno-warn-unused-imports
default-language: Haskell2010
cc-options: -std=gnu99
if flag(old_toolchain_inliner)
cc-options: -fgnu89-inline
C-sources: cbits/cryptonite_chacha.c
, cbits/cryptonite_salsa.c
, cbits/cryptonite_rc4.c