aboutsummaryrefslogtreecommitdiff
path: root/src/make.bash
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-03-18 18:23:00 -0400
committerRuss Cox <rsc@golang.org>2011-03-18 18:23:00 -0400
commiteedfc445a3a3f4a5fb26e167a1eba717a883ea7c (patch)
tree703722487bbfb6bbb92bf254c179ed48ab2b5452 /src/make.bash
parent000d60ac6fc21ff19aa78c7c809b211c653ccc5f (diff)
downloadgo-eedfc445a3a3f4a5fb26e167a1eba717a883ea7c.tar.xz
build: diagnose Ubuntu's buggy copy of gold
R=iant, dsymonds CC=golang-dev https://golang.org/cl/4300041
Diffstat (limited to 'src/make.bash')
-rwxr-xr-xsrc/make.bash11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/make.bash b/src/make.bash
index d9ca40d427..79e368cb50 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -10,6 +10,17 @@ if [ ! -f env.bash ]; then
fi
. ./env.bash
+if ld --version 2>&1 | grep 'gold.*2\.20' >/dev/null; then
+ echo 'ERROR: Your system has gold 2.20 installed.'
+ echo 'This version is shipped by Ubuntu even though'
+ echo 'it is known not to work on Ubuntu.'
+ echo 'Binaries built with this linker are likely to fail in mysterious ways.'
+ echo
+ echo 'Run sudo apt-get remove binutils-gold.'
+ echo
+ exit 1
+fi
+
# Create target directories
if [ "$GOBIN" = "$GOROOT/bin" ]; then
mkdir -p "$GOROOT/bin"