'head -c BYTES' is non-portable

This commit is contained in:
Björn Ketelaars 2020-10-27 16:51:24 +01:00
parent 284d84ecf7
commit 1f661b5f6b
2 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ HASH ?= md5sum
HAVE_HASH := $(shell echo 1 | $(HASH) > /dev/null && echo 1 || echo 0)
ifeq ($(HAVE_HASH), 1)
HASH_VALUE := $(shell echo $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(ZSTD_FILES) | $(HASH) | head -c 16)
HASH_VALUE := $(shell echo $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(ZSTD_FILES) | $(HASH) | dd bs=1 count=16 status=none)
HASH_DIR := conf_$(HASH_VALUE)
else
$(info warning : could not find hash function to differentiate builds with different flags)

View File

@ -107,7 +107,7 @@ HASH ?= md5sum
HAVE_HASH := $(shell echo 1 | $(HASH) > /dev/null && echo 1 || echo 0)
ifeq ($(HAVE_HASH), 1)
HASH_VALUE := $(shell echo $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) | $(HASH) | head -c 16)
HASH_VALUE := $(shell echo $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) | $(HASH) | dd bs=1 count=16 status=none)
HASH_DIR := conf_$(HASH_VALUE)
else
$(info warning : could not find hash function to differentiate builds with different flags)