Skip to content

Commit 8aff3fd

Browse files
committed
depends: don't use -h with touch on OpenBSD
Should fix #29447.
1 parent 54172c6 commit 8aff3fd

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

depends/builders/default.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ default_build_TAR = tar
55
default_build_RANLIB = ranlib
66
default_build_STRIP = strip
77
default_build_NM = nm
8+
default_build_TOUCH = touch -h -m -t 200001011200
89

910
define add_build_tool_func
1011
build_$(build_os)_$1 ?= $$(default_build_$1)
1112
build_$(build_arch)_$(build_os)_$1 ?= $$(build_$(build_os)_$1)
1213
build_$1=$$(build_$(build_arch)_$(build_os)_$1)
1314
endef
14-
$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL DSYMUTIL,$(eval $(call add_build_tool_func,$(var))))
15+
$(foreach var,CC CXX AR TAR RANLIB NM STRIP SHA256SUM DOWNLOAD OTOOL INSTALL_NAME_TOOL DSYMUTIL TOUCH,$(eval $(call add_build_tool_func,$(var))))
1516
define add_build_flags_func
1617
build_$(build_arch)_$(build_os)_$1 += $(build_$(build_os)_$1)
1718
build_$1=$$(build_$(build_arch)_$(build_os)_$1)

depends/builders/openbsd.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ build_openbsd_SHA256SUM = sha256
55
build_openbsd_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
66

77
build_openbsd_TAR = gtar
8+
# openBSD touch doesn't understand -h
9+
build_openbsd_TOUCH = touch -m -t 200001011200

depends/funcs.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ $($(1)_postprocessed): | $($(1)_staged)
234234
$($(1)_cached): | $($(1)_dependencies) $($(1)_postprocessed)
235235
echo Caching $(1)...
236236
cd $$($(1)_staging_dir)/$(host_prefix); \
237-
find . ! -name '.stamp_postprocessed' -print0 | TZ=UTC xargs -0r touch -h -m -t 200001011200; \
237+
find . ! -name '.stamp_postprocessed' -print0 | TZ=UTC xargs -0r $(build_TOUCH); \
238238
find . ! -name '.stamp_postprocessed' | LC_ALL=C sort | $(build_TAR) --numeric-owner --no-recursion -czf $$($(1)_staging_dir)/$$(@F) -T -
239239
mkdir -p $$(@D)
240240
rm -rf $$(@D) && mkdir -p $$(@D)

0 commit comments

Comments
 (0)