From b9a4da47c0f08ae17c8892a98df276036f720520 Mon Sep 17 00:00:00 2001 From: Michael Stone Date: Fri, 26 Aug 2016 03:36:06 -0400 Subject: go: fix on darwin, make go-1.7 build with clang-3.8. (#18001) The darwin stdenv currently provides clang-3.7; however, a) go-1.7 currently expects a compiler that supports "-fdebug-prefix-map" arguments (which clang-3.8 supports but clang-3.7 does not) and b) even with clang-3.8, go-1.7 misinterprets the result of its runtime probes for support for the "-no-pie" flag, thereby failing to build runtime/cgo. This patch resolves (a) by building go-1.7 with clang-3.8 and resolves (b) by teaching go how to correctly probe "-no-pie" error messages from clang. --- pkgs/development/compilers/go/1.7.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkgs/development/compilers/go/1.7.nix') diff --git a/pkgs/development/compilers/go/1.7.nix b/pkgs/development/compilers/go/1.7.nix index 61d6a5e83917..25ae26f28181 100644 --- a/pkgs/development/compilers/go/1.7.nix +++ b/pkgs/development/compilers/go/1.7.nix @@ -98,6 +98,9 @@ stdenv.mkDerivation rec { sed -i '/TestDisasmExtld/areturn' src/cmd/objdump/objdump_test.go + sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go + sed -i 's/unrecognized/unknown/' src/cmd/go/build.go + touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd sed -i '1 a\exit 0' misc/cgo/errors/test.bash -- cgit 1.4.1