[Pkg-golang-commits] [golang] 02/07: Build with GO386=387 to favor the 387 floating point unit over sse2 instructions

Michael Stapelberg michael at stapelberg.de
Mon Jul 7 06:52:00 UTC 2014


This is an automated email from the git hooks/post-receive script.

stapelberg pushed a commit to branch debian-sid
in repository golang.

commit 60c26d5600a1d471646b851faeaec8d106bd4206
Author: Michael Stapelberg <stapelberg at debian.org>
Date:   Thu Jul 3 19:49:22 2014 +0200

    Build with GO386=387 to favor the 387 floating point unit over sse2 instructions
    
    Closes: #753160
---
 debian/changelog | 2 ++
 debian/rules     | 9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 0d8059b..0a49a70 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 golang (2:1.3-2) unstable; urgency=medium
 
   * Add /usr/lib/go/test symlink
+  * Build with GO386=387 to favor the 387 floating point unit over sse2
+    instructions (Closes: #753160)
 
  -- Michael Stapelberg <stapelberg at debian.org>  Thu, 03 Jul 2014 19:08:34 +0200
 
diff --git a/debian/rules b/debian/rules
index ab5e3fd..d73e90f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -142,6 +142,13 @@ GOROOT_FINAL := $(libexecdir)
 GOBIN := $(CURDIR)$(bindir)
 GOARM :=
 
+# Always use the 387 floating point unit instead of sse2. This is important to
+# ensure that the binaries we build (both when compiling golang on the buildds
+# and when users cross-compile for 386) can actually run on older CPUs (where
+# old means e.g. an AMD Athlon XP 2400+). See http://bugs.debian.org/753160 and
+# https://code.google.com/p/go/issues/detail?id=8152
+GO386 := 387
+
 DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
 DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
 DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
@@ -199,6 +206,6 @@ else
     $(error unrecognized instruction set $(DEB_HOST_ARCH_CPU)!)
 endif
 
-export GOROOT GOROOT_FINAL GOOS GOARCH GOARM GOBIN GOHOSTARCH GOHOSTOS
+export GOROOT GOROOT_FINAL GOOS GOARCH GOARM GOBIN GOHOSTARCH GOHOSTOS GO386
 
 .PHONY: build clean install binary-arch binary-indep binary

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-golang/golang.git



More information about the pkg-golang-commits mailing list