From db3e180a411333b250cbd6a3cad019ebef1586a3 Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Mon, 22 Jun 2015 14:05:29 +0100 Subject: [PATCH] [Random] add a flag to be able to disable rdrand --- cryptonite.cabal | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cryptonite.cabal b/cryptonite.cabal index 63785f7..953714a 100644 --- a/cryptonite.cabal +++ b/cryptonite.cabal @@ -51,6 +51,11 @@ Flag support_aesni Default: True Manual: True +Flag support_rdrand + Description: allow compilation with AESNI on system and architecture that supports it + Default: True + Manual: True + Flag support_pclmuldq Description: Allow compilation with pclmuldq on architecture that supports it Default: False @@ -202,7 +207,7 @@ Library if arch(i386) CPP-options: -DARCH_X86 - if arch(x86_64) + if flag(support_rdrand) && arch(x86_64) CPP-options: -DARCH_X86_64 CPP-options: -DSUPPORT_RDRAND Other-modules: Crypto.Random.Entropy.RDRand