From 60c26d5600a1d471646b851faeaec8d106bd4206 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 3 Jul 2014 19:49:22 +0200 Subject: 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 0d8059bea..0a49a7023 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 Thu, 03 Jul 2014 19:08:34 +0200 diff --git a/debian/rules b/debian/rules index ab5e3fdb1..d73e90fab 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 -- cgit v1.2.3