gnu date is present in our staging_dir which means squashfskit will fail
to build. Prevent also a race condition if coreutils is build after
squashfskit.
To prevent a race condition, depend on coreutils.
Acked-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
$(curdir)/flex/compile := $(curdir)/libtool/compile
$(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile
$(curdir)/squashfs/compile := $(curdir)/lzma-old/compile
-$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
+$(curdir)/squashfskit4/compile := $(curdir)/coreutils/compile $(curdir)/xz/compile $(curdir)/zlib/compile
$(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile
$(curdir)/autoconf/compile := $(curdir)/m4/compile
$(curdir)/automake/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/pkg-config/compile $(curdir)/xz/compile
--- /dev/null
+--- a/squashfs-tools/version.sh
++++ b/squashfs-tools/version.sh
+@@ -27,13 +27,11 @@ if [ -z "$OUTPUT" ] ; then
+ fi
+
+ our_date() {
+-case $(uname) in
+-NetBSD|OpenBSD|DragonFly|FreeBSD|Darwin)
+- date -r "$1" "$2"
+- ;;
+-*)
+- date -d "@$1" "$2"
+-esac
++ if date --version 2>&1 | grep -q "GNU coreutils"; then
++ date -d "@$1" "$2"
++ else
++ date -r "$1" "$2"
++ fi
+ }
+
+ try_version() {