diff options
author | Michael Stone <michael@laptop.org> | 2016-08-26 03:36:06 -0400 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-08-26 07:36:06 +0000 |
commit | b9a4da47c0f08ae17c8892a98df276036f720520 (patch) | |
tree | 05848bc0ddf4a0807cf7f9809b141d484db235d0 /pkgs/top-level | |
parent | df343d4824284c8a0bdcba89a9ed9b62ecb9ba1b (diff) | |
download | nixlib-b9a4da47c0f08ae17c8892a98df276036f720520.tar nixlib-b9a4da47c0f08ae17c8892a98df276036f720520.tar.gz nixlib-b9a4da47c0f08ae17c8892a98df276036f720520.tar.bz2 nixlib-b9a4da47c0f08ae17c8892a98df276036f720520.tar.lz nixlib-b9a4da47c0f08ae17c8892a98df276036f720520.tar.xz nixlib-b9a4da47c0f08ae17c8892a98df276036f720520.tar.zst nixlib-b9a4da47c0f08ae17c8892a98df276036f720520.zip |
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.
Diffstat (limited to 'pkgs/top-level')
-rw-r--r-- | pkgs/top-level/all-packages.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c9f8dc5ca3d..66f1667dc32f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4738,9 +4738,11 @@ in inherit (darwin.apple_sdk.frameworks) Security Foundation; }; - go_1_7 = callPackage ../development/compilers/go/1.7.nix { + go_1_7 = callPackage ../development/compilers/go/1.7.nix ({ inherit (darwin.apple_sdk.frameworks) Security Foundation; - }; + } // stdenv.lib.optionalAttrs stdenv.isDarwin { + stdenv = stdenvAdapters.overrideCC pkgs.stdenv pkgs.clang_38; + }); go = self.go_1_7; |