diff options
author | Vineet Gupta <vineetg@rivosinc.com> | 2021-11-18 17:08:15 -0800 |
---|---|---|
committer | Vineet Gupta <vineetg@rivosinc.com> | 2021-11-18 18:03:43 -0800 |
commit | c73013342afb729f07ed12f5827687b40f6b14ad (patch) | |
tree | 731f6d28cfd4937c472348c7d0c3cd14ac98183d /Makefile.in | |
parent | b39e36160aa0649ba0dfb9aa314d375900d610fb (diff) | |
download | riscv-gnu-toolchain-c73013342afb729f07ed12f5827687b40f6b14ad.zip riscv-gnu-toolchain-c73013342afb729f07ed12f5827687b40f6b14ad.tar.gz riscv-gnu-toolchain-c73013342afb729f07ed12f5827687b40f6b14ad.tar.bz2 |
gcc: add source SHA1 which shows up in -v
This helps identify the exact sources used for building the compiler.
| riscv64-unknown-linux-gnu-gcc -v
|
| Before: gcc version 11.1.0 (GCC)
| After : gcc version 11.1.0 (g480822473a4a)
Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index 38e3a78..7779dff 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 \ |