From: Ian Lance Taylor Date: Wed, 21 Jan 2015 23:03:41 +0000 (+0000) Subject: runtime: Add the Go language version information to the Version output. X-Git-Tag: releases/gcc-5.1.0~1475 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=663203471858a2a34ff52a7fe658beb43d498286;p=thirdparty%2Fgcc.git runtime: Add the Go language version information to the Version output. From-SVN: r219976 --- diff --git a/libgo/Makefile.am b/libgo/Makefile.am index 727662d5f1dc..f6f967e22a67 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 7c8fc320d93b..c908869cd61f 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 000000000000..40c8f5c53699 --- /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 53af8a9899fe..6b9e5bb99327 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