diff mbox

libgo patch committed: Put base Go version in runtime.Version

Message ID CAOyqgcVyBgcqHSEbKNWv_PjuF6O_x3UpS52-qnZCFEumpc=O3g@mail.gmail.com
State New
Headers show

Commit Message

Ian Lance Taylor Jan. 21, 2015, 11:03 p.m. UTC
This patch by Lynn Boger adds the base Go version to the start of the
runtime.Version string.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian
diff mbox

Patch

diff -r 00adc946a742 libgo/Makefile.am
--- a/libgo/Makefile.am	Tue Jan 20 13:28:34 2015 -0800
+++ b/libgo/Makefile.am	Wed Jan 21 15:02:30 2015 -0800
@@ -971,7 +971,7 @@ 
 	rm -f version.go.tmp
 	echo "package runtime" > version.go.tmp
 	echo 'const defaultGoroot = "$(prefix)"' >> version.go.tmp
-	echo 'const theVersion = "'`$(GOC) --version | sed 1q`'"' >> version.go.tmp
+	echo 'const theVersion = "'`cat $(srcdir)/VERSION | sed 1q`' '`$(GOC) --version | sed 1q`'"' >> version.go.tmp
 	echo 'const theGoarch = "'$(GOARCH)'"' >> version.go.tmp
 	echo 'const theGoos = "'$(GOOS)'"' >> version.go.tmp
 	echo 'const theGccgoToolDir = "$(libexecsubdir)"' >> version.go.tmp
diff -r 00adc946a742 libgo/VERSION
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libgo/VERSION	Wed Jan 21 15:02:30 2015 -0800
@@ -0,0 +1,1 @@ 
+go1.4
\ No newline at end of file
diff -r 00adc946a742 libgo/merge.sh
--- a/libgo/merge.sh	Tue Jan 20 13:28:34 2015 -0800
+++ b/libgo/merge.sh	Wed Jan 21 15:02:30 2015 -0800
@@ -136,6 +136,16 @@ 
   fi
 }
 
+if test -f VERSION; then
+  if ! cmp -s ${NEWDIR}/VERSION VERSION; then
+    cp ${NEWDIR}/VERSION .
+  fi
+else
+  if test -f ${NEWDIR}/VERSION; then
+    cp ${NEWDIR}/VERSION .
+  fi
+fi
+
 (cd ${NEWDIR}/src && find . -name '*.go' -print) | while read f; do
   oldfile=${OLDDIR}/src/$f
   newfile=${NEWDIR}/src/$f