threads / patch / 53319

patchmacos: move PTHREAD_LIBS out of Makefile

Subject: [PATCH] macos: move PTHREAD_LIBS out of Makefile

## tl;dr

One message between Apr 25, 2020 and Apr 25, 2020. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Carlo Marcelo Arenas Belón· Apr 25, 2020, 10:26 UTC · lore

starting with f7d9d04e3b (make: Remove -pthread on Darwin (it is included by cstdlib)., 2009-01-26) building in macOS had made sure not to add any additional libraries for thread support.

the setting was missed when moving the rest of the system specific settings to config.uname.mak with e1b6dbb554 (Makefile: hoist uname autodetection to config.mak.uname, 2013-01-03), so do it now.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
 Makefile         | 4 +++-
 config.mak.uname | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
Show changes to 2 files +4 −1

Makefile, config.mak.uname

diff --git a/Makefile b/Makefile
index 7e3fc7ca79..4a6739386a 100644
--- a/Makefile
+++ b/Makefile
@@ -1290,6 +1290,9 @@ ifeq (no,$(USE_PARENS_AROUND_GETTEXT_N))
 endif
 endif
 
+# Platform specific configuration should go instead
+# in config.uname.mak, this is just a last pass to
+# make sure package managers are supported
 ifeq ($(uname_S),Darwin)
 	ifndef NO_FINK
 		ifeq ($(shell test -d /sw/lib && echo y),y)
@@ -1308,7 +1311,6 @@ ifeq ($(uname_S),Darwin)
 		APPLE_COMMON_CRYPTO = YesPlease
 		COMPAT_CFLAGS += -DAPPLE_COMMON_CRYPTO
 	endif
-	PTHREAD_LIBS =
 endif
 
 ifdef NO_LIBGEN_H
diff --git a/config.mak.uname b/config.mak.uname
index f89acdd15f..1f911a88e3 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -134,6 +134,7 @@ ifeq ($(uname_S),Darwin)
 	BASIC_CFLAGS += -DPRECOMPOSE_UNICODE
 	BASIC_CFLAGS += -DPROTECT_HFS_DEFAULT=1
 	HAVE_BSD_SYSCTL = YesPlease
+	PTHREAD_LIBS =
 	FREAD_READS_DIRECTORIES = UnfortunatelyYes
 	HAVE_NS_GET_EXECUTABLE_PATH = YesPlease
 	BASIC_CFLAGS += -I/usr/local/include
-- 
2.26.2.569.g1d74ac4d14

← back to recent threads