git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] macos: move PTHREAD_LIBS out of Makefile

From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
Date
Apr 25, 2020, 10:26 UTC
Message-ID
<20200425102651.51961-1-carenas@gmail.com>

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(-)
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
Message 1 of 1 in “macos: move PTHREAD_LIBS out of Makefile”
  1. macos: move PTHREAD_LIBS out of MakefileCarlo Marcelo Arenas Belón, Apr 25, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.