From f1e14dfbe9b289a59b33e7bad0596250cb9294a7 Mon Sep 17 00:00:00 2001 From: fanquake Date: Thu, 26 Mar 2026 09:38:16 +0800 Subject: [PATCH] depends: remove workaround for Make older than 4.2.90 This was introduced for distros shipping older make, such as Ubuntu 20.04 (4.2.1). It's likely that all distros being used for Darwin and Qindows cross compilation, are shipping a newer make at this point. --- depends/hosts/darwin.mk | 23 ++++++++--------------- depends/hosts/freebsd.mk | 23 ++++++++--------------- depends/hosts/mingw32.mk | 4 ++-- 3 files changed, 18 insertions(+), 32 deletions(-) diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index 214bafafca7..373ab74e113 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -6,22 +6,15 @@ LLD_VERSION=711 OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers -# We can't just use $(shell command -v clang) because GNU Make handles builtins -# in a special way and doesn't know that `command` is a POSIX-standard builtin -# prior to 1af314465e5dfe3e8baa839a32a72e83c04f26ef, first released in v4.2.90. -# At the time of writing, GNU Make v4.2.1 is still being used in supported -# distro releases. -# -# Source: https://lists.gnu.org/archive/html/bug-make/2017-11/msg00017.html -clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang") -clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++") +clang_prog=$(shell command -v clang) +clangxx_prog=$(shell command -v clang++) -darwin_AR=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ar") -darwin_NM=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-nm") -darwin_OBJCOPY=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objcopy") -darwin_OBJDUMP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objdump") -darwin_RANLIB=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ranlib") -darwin_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip") +darwin_AR=$(shell command -v llvm-ar) +darwin_NM=$(shell command -v llvm-nm) +darwin_OBJCOPY=$(shell command -v llvm-objcopy) +darwin_OBJDUMP=$(shell command -v llvm-objdump) +darwin_RANLIB=$(shell command -v llvm-ranlib) +darwin_STRIP=$(shell command -v llvm-strip) # Flag explanations: # diff --git a/depends/hosts/freebsd.mk b/depends/hosts/freebsd.mk index bcbf2f77b65..240180f2fd2 100644 --- a/depends/hosts/freebsd.mk +++ b/depends/hosts/freebsd.mk @@ -1,22 +1,15 @@ FREEBSD_VERSION ?= 15.0 FREEBSD_SDK=$(SDK_PATH)/freebsd-$(host)-$(FREEBSD_VERSION)/ -# We can't just use $(shell command -v clang) because GNU Make handles builtins -# in a special way and doesn't know that `command` is a POSIX-standard builtin -# prior to 1af314465e5dfe3e8baa839a32a72e83c04f26ef, first released in v4.2.90. -# At the time of writing, GNU Make v4.2.1 is still being used in supported -# distro releases. -# -# Source: https://lists.gnu.org/archive/html/bug-make/2017-11/msg00017.html -clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang") -clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++") +clang_prog=$(shell command -v clang) +clangxx_prog=$(shell command -v clang++) -freebsd_AR=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ar") -freebsd_NM=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-nm") -freebsd_OBJCOPY=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objcopy") -freebsd_OBJDUMP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objdump") -freebsd_RANLIB=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ranlib") -freebsd_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip") +freebsd_AR=$(shell command -v llvm-ar) +freebsd_NM=$(shell command -v llvm-nm) +freebsd_OBJCOPY=$(shell command -v llvm-objcopy) +freebsd_OBJDUMP=$(shell command -v llvm-objdump) +freebsd_RANLIB=$(shell command -v llvm-ranlib) +freebsd_STRIP=$(shell command -v llvm-strip) freebsd_CC=$(clang_prog) --target=$(host) \ diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk index 7db6afaef6a..d433636fa4f 100644 --- a/depends/hosts/mingw32.mk +++ b/depends/hosts/mingw32.mk @@ -1,7 +1,7 @@ -ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-gcc-posix"),) +ifneq ($(shell command -v $(host)-gcc-posix),) mingw32_CC := $(host)-gcc-posix endif -ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),) +ifneq ($(shell command -v $(host)-g++-posix),) mingw32_CXX := $(host)-g++-posix endif