diff options
author | Han Shen <shenhan@google.com> | 2016-01-07 09:57:28 -0800 |
---|---|---|
committer | Han Shen <shenhan@google.com> | 2016-01-07 10:07:34 -0800 |
commit | f280657461aee54b6d2807881d8a77832f4e794c (patch) | |
tree | b6916284ef2913e2c43a6fbe650576efc31f1ada | |
parent | fad95906dc869be82834cf0678a5b99d2fe19095 (diff) | |
download | build-f280657461aee54b6d2807881d8a77832f4e794c.tar.gz |
Add githash to binutils version string.ndk-r14-beta2ndk-r14-beta1ndk-r14ndk-r13-beta2ndk-r13-beta1ndk-r13ndk-r12bndk-r12-beta2ndk-r12-beta1ndk-r11cndk-r11bndk-r11ndk-r14-releasendk-r13-releasendk-r12-releasendk-r11-release
So the output for 'ld -v' is something like -
GNU ld (binutils-2.25-3febaa7) 2.25.51.20141117
Tested by: ./build.py --toolchain arm-linux-androideabi --host linux
Change-Id: I4687fb5696bf3aa7a08a94149090055a76ec2294
-rw-r--r-- | Makefile.in | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in index ddce993..21f33d7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -183,6 +183,10 @@ find-package-srcdir = $(shell \ echo 'error cannot find $(strip $1)' ; \ fi) +# Find short git hash for a given git repo. +find-git-hash = $(shell \ + git -C $1 log -1 --pretty=format:%h 2>/dev/null || echo unknown-git-ver) + # Set effective <build>, <host> and <target>. ifneq ($(build_alias),) @@ -305,7 +309,8 @@ config-target-binutils: stmp-config-target-binutils # We do not want to enable shared libraries in binutils BINUTILS_CONFIG_ARGS=--prefix=$(prefix) \ --target=${cur_target} --host=${cur_host} --build=${cur_build} \ - $(baseargs) --disable-shared --disable-nls + $(baseargs) --disable-shared --disable-nls \ + --with-pkgversion=$(BINUTILS_VERSION)-$(call find-git-hash, $(srcdir)/../binutils) ifeq ($(ENABLE_GRAPHITE),yes) BINUTILS_CONFIG_ARGS+= --with-cloog=${CLOOG_DIR} --with-isl=${ISL_DIR} --with-gmp=${GMP_DIR} \ --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check $(CLOOG_BACKEND) |