diff --git a/pkgs/development/compilers/go/1.14.nix b/pkgs/development/compilers/go/1.14.nix index b467c998c3e..9c7d70e63e4 100644 --- a/pkgs/development/compilers/go/1.14.nix +++ b/pkgs/development/compilers/go/1.14.nix @@ -1,7 +1,8 @@ { stdenv, fetchurl, tzdata, iana-etc, runCommand , perl, which, pkgconfig, patch, procps, pcre, cacert, Security, Foundation , mailcap, runtimeShell -, buildPackages, pkgsTargetTarget +, buildPackages +, pkgsBuildTarget , fetchpatch }: @@ -25,8 +26,12 @@ let "armv5tel" = "arm"; "armv6l" = "arm"; "armv7l" = "arm"; + "powerpc64le" = "ppc64le"; }.${platform.parsed.cpu.name} or (throw "Unsupported system"); + # We need a target compiler which is still runnable at build time, + # to handle the cross-building case where build != host == target + targetCC = pkgsBuildTarget.targetPackages.stdenv.cc; in stdenv.mkDerivation rec { @@ -166,11 +171,11 @@ stdenv.mkDerivation rec { # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those # to be different from CC/CXX CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then - "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}cc" + "${targetCC}/bin/${targetCC.targetPrefix}cc" else null; CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then - "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}c++" + "${targetCC}/bin/${targetCC.targetPrefix}c++" else null; diff --git a/pkgs/development/compilers/go/1.15.nix b/pkgs/development/compilers/go/1.15.nix index 8dd48e3396e..ca08ee190c2 100644 --- a/pkgs/development/compilers/go/1.15.nix +++ b/pkgs/development/compilers/go/1.15.nix @@ -1,7 +1,8 @@ { stdenv, fetchurl, tzdata, iana-etc, runCommand , perl, which, pkgconfig, patch, procps, pcre, cacert, Security, Foundation , mailcap, runtimeShell -, buildPackages, pkgsTargetTarget +, buildPackages +, pkgsBuildTarget , fetchpatch }: @@ -25,8 +26,12 @@ let "armv5tel" = "arm"; "armv6l" = "arm"; "armv7l" = "arm"; + "powerpc64le" = "ppc64le"; }.${platform.parsed.cpu.name} or (throw "Unsupported system"); + # We need a target compiler which is still runnable at build time, + # to handle the cross-building case where build != host == target + targetCC = pkgsBuildTarget.targetPackages.stdenv.cc; in stdenv.mkDerivation rec { @@ -169,11 +174,11 @@ stdenv.mkDerivation rec { # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those # to be different from CC/CXX CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then - "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}cc" + "${targetCC}/bin/${targetCC.targetPrefix}cc" else null; CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then - "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}c++" + "${targetCC}/bin/${targetCC.targetPrefix}c++" else null;