Merge pull request #27960 from LnL7/clang-libgcrypt

libgcrypt: fix clang build
This commit is contained in:
Daniel Peebles 2017-08-07 16:52:59 -04:00 committed by GitHub
commit de1110b52a

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, libgpgerror, enableCapabilities ? false, libcap }: { stdenv, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
assert enableCapabilities -> stdenv.isLinux; assert enableCapabilities -> stdenv.isLinux;
@ -14,9 +14,13 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" "info" ]; outputs = [ "out" "dev" "info" ];
outputBin = "dev"; outputBin = "dev";
buildInputs = # The CPU Jitter random number generator must not be compiled with
[ libgpgerror ] # optimizations and the optimize -O0 pragma only works for gcc.
++ lib.optional enableCapabilities libcap; # The build enables -O2 by default for everything else.
hardeningDisable = stdenv.lib.optional stdenv.cc.isClang "fortify";
buildInputs = [ libgpgerror ]
++ stdenv.lib.optional enableCapabilities libcap;
# Make sure libraries are correct for .pc and .la files # Make sure libraries are correct for .pc and .la files
# Also make sure includes are fixed for callers who don't use libgpgcrypt-config # Also make sure includes are fixed for callers who don't use libgpgcrypt-config