aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6d901956f..7235c9dc3 100644
--- a/Makefile
+++ b/Makefile
@@ -130,7 +130,7 @@ LDLIBS += -lrt
endif
YOSYS_VER := 0.17+33
-GIT_REV := $(shell git -C $(YOSYS_SRC) rev-parse --short HEAD 2> /dev/null || echo UNKNOWN)
+GIT_REV := $(shell git ls-remote $(YOSYS_SRC) HEAD -q | $(AWK) 'BEGIN {R = "UNKNOWN"}; ($$2 == "HEAD") {R = substr($$1, 1, 9); exit} END {print R}')
OBJS = kernel/version_$(GIT_REV).o
bumpversion: