Skip to contentSkip to conversation

macos: move PTHREAD_LIBS out of Makefile

PATCH New Carlo Marcelo Arenas Belón 1 participant 1 message Apr 25, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 macos: move PTHREAD_LIBS out of Makefile

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.

---
 Makefile         | 4 +++-
 config.mak.uname | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
Makefile +3 -1
index 7e3fc7ca79..4a6739386a 100644
@@ -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
config.mak.uname +1 -0
index f89acdd15f..1f911a88e3 100644
@@ -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
Signature · 1 line
2.26.2.569.g1d74ac4d14