mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
go: make compiler usable for cross compiles
This commit is contained in:
parent
0ae3b49bb4
commit
5302222337
@ -133,12 +133,12 @@ stdenv.mkDerivation rec {
|
||||
|
||||
GOOS = if stdenv.isDarwin then "darwin" else "linux";
|
||||
GOARCH = if stdenv.isDarwin then "amd64"
|
||||
else if stdenv.targetPlatform.isi686 then "386"
|
||||
else if stdenv.targetPlatform.isx86_64 then "amd64"
|
||||
else if stdenv.targetPlatform.isAarch32 then "arm"
|
||||
else if stdenv.targetPlatform.isAarch64 then "arm64"
|
||||
else if stdenv.hostPlatform.isi686 then "386"
|
||||
else if stdenv.hostPlatform.isx86_64 then "amd64"
|
||||
else if stdenv.hostPlatform.isAarch32 then "arm"
|
||||
else if stdenv.hostPlatform.isAarch64 then "arm64"
|
||||
else throw "Unsupported system";
|
||||
GOARM = toString (stdenv.lib.intersectLists [(stdenv.targetPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
|
||||
GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
|
||||
GO386 = 387; # from Arch: don't assume sse2 on i686
|
||||
CGO_ENABLED = 1;
|
||||
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
|
||||
|
Loading…
Reference in New Issue
Block a user