Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go: 1.5 darwin #9558

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkgs/development/compilers/go/1.5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,18 @@ stdenv.mkDerivation rec {
sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go

touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd

# Hack, dsymutil is an empty shim in the Darwin stdenv but we need it here
mkdir tmp
ln -s /usr/bin/dsymutil tmp/dsymutil
export PATH="$PWD/tmp:$PATH"
'';

patches = [
./cacert-1.5.patch
./remove-tools-1.5.patch
] ++ lib.optionals stdenv.isDarwin [
./assume-darwin-amd64-1.5.patch
];

GOOS = if stdenv.isDarwin then "darwin" else "linux";
Expand Down
33 changes: 33 additions & 0 deletions pkgs/development/compilers/go/assume-darwin-amd64-1.5.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
diff --git a/src/cmd/dist/util.go b/src/cmd/dist/util.go
index f13210f..8099a26 100644
--- a/src/cmd/dist/util.go
+++ b/src/cmd/dist/util.go
@@ -404,9 +404,9 @@ func main() {
switch gohostos {
case "darwin":
// Even on 64-bit platform, darwin uname -m prints i386.
- if strings.Contains(run("", CheckExit, "sysctl", "machdep.cpu.extfeatures"), "EM64T") {
- gohostarch = "amd64"
- }
+ // if strings.Contains(run("", CheckExit, "sysctl", "machdep.cpu.extfeatures"), "EM64T") {
+ gohostarch = "amd64"
+ // }
case "solaris":
// Even on 64-bit platform, solaris uname -m prints i86pc.
out := run("", CheckExit, "isainfo", "-n")
diff --git a/src/race.bash b/src/race.bash
index e091736..ee963e7 100755
--- a/src/race.bash
+++ b/src/race.bash
@@ -16,9 +16,9 @@ function usage {
case $(uname) in
"Darwin")
# why Apple? why?
- if sysctl machdep.cpu.extfeatures | grep -qv EM64T; then
+ # if sysctl machdep.cpu.extfeatures | grep -qv EM64T; then
usage
- fi
+ # fi
;;
"Linux")
if [ $(uname -m) != "x86_64" ]; then