summaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-21 23:03:41 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-21 23:03:41 +0000
commitc5025ca0a7889775a0cea27e3766b45091b3fdd2 (patch)
tree55b9a98dd1e812ff9897d0df120c94326e0e1864 /libgo
parent27f3dbf1ba4b01d4b8751a226fdff226896fde23 (diff)
downloadgcc-c5025ca0a7889775a0cea27e3766b45091b3fdd2.tar.gz
runtime: Add the Go language version information to the Version output.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219976 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-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 727662d5f1d..f6f967e22a6 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 7c8fc320d93..c908869cd61 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 00000000000..40c8f5c5369
--- /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 53af8a9899f..6b9e5bb9932 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