Browse Source

Merge pull request #992 from vineetgarc/gcc-v-report-git-ver

gcc: add source SHA1 which shows up in -v
pull/1023/head 2022.02.11
Kito Cheng 4 years ago
committed by GitHub
parent
commit
75b82e1f0b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      Makefile.in

8
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 \

Loading…
Cancel
Save