Skip to content

Commit e7d6473

Browse files
committed
Merge bitcoin#34923: depends: remove workaround for Make older than 4.2.90
f1e14df depends: remove workaround for Make older than 4.2.90 (fanquake) Pull request description: This was introduced for distros shipping older `make`, such as Ubuntu `20.04` (`4.2.1`). It's likely that any distros being used for Darwin and Windows cross compilation, are shipping a newer make at this point. ACKs for top commit: hebasto: ACK f1e14df, I have reviewed the code and it looks OK. Tree-SHA512: bb5d785e4804f0b0d51c5abba31ee4537cf04247801edef51a5da728c7df7fff1189625d222f91b8f5896f9ec71dc8dbd11614a69e13e0dcad6017cab7dd5874
2 parents c4361e5 + f1e14df commit e7d6473

File tree

3 files changed

+19
-33
lines changed

3 files changed

+19
-33
lines changed

depends/hosts/darwin.mk

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,15 @@ LLD_VERSION=711
66

77
OSX_SDK=$(SDK_PATH)/Xcode-$(XCODE_VERSION)-$(XCODE_BUILD_ID)-extracted-SDK-with-libcxx-headers
88

9-
# We can't just use $(shell command -v clang) because GNU Make handles builtins
10-
# in a special way and doesn't know that `command` is a POSIX-standard builtin
11-
# prior to 1af314465e5dfe3e8baa839a32a72e83c04f26ef, first released in v4.2.90.
12-
# At the time of writing, GNU Make v4.2.1 is still being used in supported
13-
# distro releases.
14-
#
15-
# Source: https://lists.gnu.org/archive/html/bug-make/2017-11/msg00017.html
16-
clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang")
17-
clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++")
9+
clang_prog=$(shell command -v clang)
10+
clangxx_prog=$(shell command -v clang++)
1811

19-
darwin_AR=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ar")
20-
darwin_NM=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-nm")
21-
darwin_OBJCOPY=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objcopy")
22-
darwin_OBJDUMP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objdump")
23-
darwin_RANLIB=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ranlib")
24-
darwin_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip")
12+
darwin_AR=$(shell command -v llvm-ar)
13+
darwin_NM=$(shell command -v llvm-nm)
14+
darwin_OBJCOPY=$(shell command -v llvm-objcopy)
15+
darwin_OBJDUMP=$(shell command -v llvm-objdump)
16+
darwin_RANLIB=$(shell command -v llvm-ranlib)
17+
darwin_STRIP=$(shell command -v llvm-strip)
2518

2619
# Flag explanations:
2720
#

depends/hosts/freebsd.mk

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
FREEBSD_VERSION ?= 15.0
22
FREEBSD_SDK=$(SDK_PATH)/freebsd-$(host)-$(FREEBSD_VERSION)/
33

4-
# We can't just use $(shell command -v clang) because GNU Make handles builtins
5-
# in a special way and doesn't know that `command` is a POSIX-standard builtin
6-
# prior to 1af314465e5dfe3e8baa839a32a72e83c04f26ef, first released in v4.2.90.
7-
# At the time of writing, GNU Make v4.2.1 is still being used in supported
8-
# distro releases.
9-
#
10-
# Source: https://lists.gnu.org/archive/html/bug-make/2017-11/msg00017.html
11-
clang_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang")
12-
clangxx_prog=$(shell $(SHELL) $(.SHELLFLAGS) "command -v clang++")
13-
14-
freebsd_AR=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ar")
15-
freebsd_NM=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-nm")
16-
freebsd_OBJCOPY=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objcopy")
17-
freebsd_OBJDUMP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-objdump")
18-
freebsd_RANLIB=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-ranlib")
19-
freebsd_STRIP=$(shell $(SHELL) $(.SHELLFLAGS) "command -v llvm-strip")
4+
clang_prog=$(shell command -v clang)
5+
clangxx_prog=$(shell command -v clang++)
6+
7+
freebsd_AR=$(shell command -v llvm-ar)
8+
freebsd_NM=$(shell command -v llvm-nm)
9+
freebsd_OBJCOPY=$(shell command -v llvm-objcopy)
10+
freebsd_OBJDUMP=$(shell command -v llvm-objdump)
11+
freebsd_RANLIB=$(shell command -v llvm-ranlib)
12+
freebsd_STRIP=$(shell command -v llvm-strip)
2013

2114

2215
freebsd_CC=$(clang_prog) --target=$(host) \

depends/hosts/mingw32.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-gcc-posix"),)
1+
ifneq ($(shell command -v $(host)-gcc-posix),)
22
mingw32_CC := $(host)-gcc-posix
33
endif
4-
ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),)
4+
ifneq ($(shell command -v $(host)-g++-posix),)
55
mingw32_CXX := $(host)-g++-posix
66
endif
77

0 commit comments

Comments
 (0)