grpc: fixup build on aarch64-linux by using older C++

This was an older regression than the current staging-next iteration.
This commit is contained in:
Vladimír Čunát 2022-12-17 08:57:25 +01:00
parent 18273180d1
commit 9e9b992a5b
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA

View file

@ -60,7 +60,9 @@ stdenv.mkDerivation rec {
# only an issue with the useLLVM stdenv, not the darwin stdenv…
# https://github.com/grpc/grpc/issues/26473#issuecomment-860885484
useLLVMAndOldCC = (stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "11.0";
cxxStandard = if useLLVMAndOldCC then "11" else "17";
# With GCC 9 (current aarch64-linux) it fails with c++17 but OK with c++14.
useOldGCC = !(stdenv.hostPlatform.useLLVM or false) && lib.versionOlder stdenv.cc.cc.version "10";
cxxStandard = if useLLVMAndOldCC then "11" else if useOldGCC then "14" else "17";
in
[
"-DgRPC_ZLIB_PROVIDER=package"