diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2022-02-11 00:33:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 00:33:11 +0800 |
commit | 75b82e1f0b4fc8537305da7e5c6059cb8c73d54f (patch) | |
tree | 5ea4f2222301c064a57b7d89ba2c35f36daee78c | |
parent | f640044a947afb39c78b96fa1ba1db8aa31b1d89 (diff) | |
parent | c73013342afb729f07ed12f5827687b40f6b14ad (diff) | |
download | riscv-gnu-toolchain-75b82e1f0b4fc8537305da7e5c6059cb8c73d54f.zip riscv-gnu-toolchain-75b82e1f0b4fc8537305da7e5c6059cb8c73d54f.tar.gz riscv-gnu-toolchain-75b82e1f0b4fc8537305da7e5c6059cb8c73d54f.tar.bz2 |
Merge pull request #992 from vineetgarc/gcc-v-report-git-ver2022.02.11
gcc: add source SHA1 which shows up in -v
-rw-r--r-- | Makefile.in | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index 685a7c5..ede8573 100644 --- a/Makefile.in +++ b/Makefile.in @@ -243,6 +243,12 @@ else GLIBC_SRC_GIT := endif +ifneq ("$(wildcard $(GCC_SRCDIR)/.git)","") +GCCPKGVER := g$(shell git -C $(GCC_SRCDIR) describe --always --dirty --exclude '*') +else +GCCPKGVER := +endif + $(srcdir)/%/.git: cd $(srcdir) && \ flock `git rev-parse --git-dir`/config git submodule init $(dir $@) && \ @@ -396,6 +402,7 @@ stamps/build-gcc-linux-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) $(addprefix stamps/b $(CONFIGURE_HOST) \ --prefix=$(INSTALL_DIR) \ --with-sysroot=$(SYSROOT) \ + --with-pkgversion="$(GCCPKGVER)" \ @with_system_zlib@ \ --enable-shared \ --enable-tls \ @@ -621,6 +628,7 @@ stamps/build-gcc-newlib-stage2: $(GCC_SRCDIR) $(GCC_SRC_GIT) stamps/build-newlib --disable-shared \ --disable-threads \ --enable-languages=c,c++ \ + --with-pkgversion="$(GCCPKGVER)" \ @with_system_zlib@ \ --enable-tls \ --with-newlib \ |