Merge pull request #154089 from NickCao/zpaq

zpaq: cleanup and fix cross compilation
This commit is contained in:
7c6f434c 2022-01-09 13:41:10 +00:00 committed by GitHub
commit 372e11acc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,17 +13,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ perl /* for pod2man */ ];
preBuild = let
CPPFLAGS = with stdenv; ""
+ (lib.optionalString (!isi686 && !isx86_64) "-DNOJIT ")
+ "-Dunix";
CXXFLAGS = "-O3 -DNDEBUG";
in ''
buildFlagsArray=( "CPPFLAGS=${CPPFLAGS}" "CXXFLAGS=${CXXFLAGS}" )
'';
CPPFLAGS = [ "-Dunix" ] ++
lib.optional (!stdenv.isi686 && !stdenv.isx86_64) "-DNOJIT";
CXXFLAGS = [ "-O3" "-DNDEBUG" ];
enableParallelBuilding = true;
makeFlags = [ "CXX=${stdenv.cc.targetPrefix}c++" ];
installFlags = [ "PREFIX=$(out)" ];
meta = with lib; {