git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #27960 from LnL7/clang-libgcrypt

libgcrypt: fix clang build

commitde1110b52a7a78821c765db34b9300f08d3871e9 authorDaniel Peebles <copumpkin@users.noreply.github.com> dateMon 7 Aug 2017, 16:52 (9 years ago) parent44c354307796cc
1 file changed+8−4
pkgs/development/libraries/libgcrypt/default.nix+8−4
pkgs/development/libraries/libgcrypt/default.nix+8−4
@@ -1,4 +1,4 @@
1−{ lib, stdenv, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
1+{ stdenv, fetchurl, libgpgerror, enableCapabilities ? false, libcap }:
22
33assert enableCapabilities -> stdenv.isLinux;
44
@@ -14,9 +14,13 @@ stdenv.mkDerivation rec {
1414 outputs = [ "out" "dev" "info" ];
1515 outputBin = "dev";
1616
17− buildInputs =
18− [ libgpgerror ]
19− ++ lib.optional enableCapabilities libcap;
17+ # The CPU Jitter random number generator must not be compiled with
18+ # optimizations and the optimize -O0 pragma only works for gcc.
19+ # The build enables -O2 by default for everything else.
20+ hardeningDisable = stdenv.lib.optional stdenv.cc.isClang "fortify";
21+
22+ buildInputs = [ libgpgerror ]
23+ ++ stdenv.lib.optional enableCapabilities libcap;
2024
2125 # Make sure libraries are correct for .pc and .la files
2226 # Also make sure includes are fixed for callers who don't use libgpgcrypt-config