diff options
author | Ayke van Laethem <[email protected]> | 2023-10-15 15:59:57 +0200 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-10-15 17:51:13 +0200 |
commit | 51bed3afae330b8c1b8a87888cc3107cba560c12 (patch) | |
tree | b5ce127aedec4f69398600719bdba5f4743837ab /GNUmakefile | |
parent | 4d4ccddad8ebb1be5246ec889f1ce3a9b9cf9e9e (diff) | |
download | tinygo-51bed3afae330b8c1b8a87888cc3107cba560c12.tar.gz tinygo-51bed3afae330b8c1b8a87888cc3107cba560c12.zip |
nix: fix md5sum on MacOS
The default on MacOS is `md5`, while Nix only has `md5sum` available.
Therefore, make it possible to override the variable via the environment
so that flake.nix can set the correct binary name.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/GNUmakefile b/GNUmakefile index 433356596..9084b145f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -32,9 +32,6 @@ export GOROOT = $(shell $(GO) env GOROOT) # Flags to pass to go test. GOTESTFLAGS ?= -# md5sum binary -MD5SUM = md5sum - # tinygo binary for tests TINYGO ?= $(call detect,tinygo,tinygo $(CURDIR)/build/tinygo) @@ -130,14 +127,14 @@ ifeq ($(OS),Windows_NT) USE_SYSTEM_BINARYEN ?= 1 else ifeq ($(shell uname -s),Darwin) - MD5SUM = md5 + MD5SUM ?= md5 CGO_LDFLAGS += -lxar USE_SYSTEM_BINARYEN ?= 1 else ifeq ($(shell uname -s),FreeBSD) - MD5SUM = md5 + MD5SUM ?= md5 START_GROUP = -Wl,--start-group END_GROUP = -Wl,--end-group else @@ -145,6 +142,9 @@ else END_GROUP = -Wl,--end-group endif +# md5sum binary default, can be overridden by an environment variable +MD5SUM ?= md5sum + # Libraries that should be linked in for the statically linked Clang. CLANG_LIB_NAMES = clangAnalysis clangAST clangASTMatchers clangBasic clangCodeGen clangCrossTU clangDriver clangDynamicASTMatchers clangEdit clangExtractAPI clangFormat clangFrontend clangFrontendTool clangHandleCXX clangHandleLLVM clangIndex clangLex clangParse clangRewrite clangRewriteFrontend clangSema clangSerialization clangSupport clangTooling clangToolingASTDiff clangToolingCore clangToolingInclusions CLANG_LIBS = $(START_GROUP) $(addprefix -l,$(CLANG_LIB_NAMES)) $(END_GROUP) -lstdc++ |