From 9e9b992a5b318579a82e3d60cbdbf9108fffb5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 17 Dec 2022 08:57:25 +0100 Subject: [PATCH] grpc: fixup build on aarch64-linux by using older C++ This was an older regression than the current staging-next iteration. --- pkgs/development/libraries/grpc/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/grpc/default.nix b/pkgs/development/libraries/grpc/default.nix index 744f9652378f..b924f3f51d34 100644 --- a/pkgs/development/libraries/grpc/default.nix +++ b/pkgs/development/libraries/grpc/default.nix @@ -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"