aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-01-21 23:03:41 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-01-21 23:03:41 +0000
commit663203471858a2a34ff52a7fe658beb43d498286 (patch)
tree55b9a98dd1e812ff9897d0df120c94326e0e1864
parent98f510444c41861865ac4d815df738fbc0fac93a (diff)
downloadgcc-663203471858a2a34ff52a7fe658beb43d498286.zip
gcc-663203471858a2a34ff52a7fe658beb43d498286.tar.gz
gcc-663203471858a2a34ff52a7fe658beb43d498286.tar.bz2
runtime: Add the Go language version information to the Version output.
From-SVN: r219976
-rw-r--r--libgo/Makefile.am2
-rw-r--r--libgo/Makefile.in2
-rw-r--r--libgo/VERSION1
-rwxr-xr-xlibgo/merge.sh10
4 files changed, 13 insertions, 2 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 727662d..f6f967e 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -971,7 +971,7 @@ s-version: Makefile
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 --git a/libgo/Makefile.in b/libgo/Makefile.in
index 7c8fc32..c908869 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -4387,7 +4387,7 @@ s-version: Makefile
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 --git a/libgo/VERSION b/libgo/VERSION
new file mode 100644
index 0000000..40c8f5c
--- /dev/null
+++ b/libgo/VERSION
@@ -0,0 +1 @@
+go1.4 \ No newline at end of file
diff --git a/libgo/merge.sh b/libgo/merge.sh
index 53af8a9..6b9e5bb 100755
--- a/libgo/merge.sh
+++ b/libgo/merge.sh
@@ -136,6 +136,16 @@ merge_c() {
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