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

[PATCH 1/1] config.mak.uname: Darwin: Use clang for Mac OS X 10.6

From
tboegi@web.de <tboegi@web.de>
Date
Feb 28, 2016, 20:09 UTC
Message-ID
<1456690184-25127-1-git-send-email-tboegi@web.de>
In-Reply-To
<xmqqfuwcg0g8.fsf@gitster.mtv.corp.google.com>
From: Torsten Bögershausen <tboegi@web.de>

Commit "tree-diff: catch integer overflow in combine_diff_path allocation" make gcc under Mac OX 10.6 crash like this:

CC combine-diff.o combine-diff.c: In function ‘diff_tree_combined’: combine-diff.c:1391: internal compiler error: Segmentation fault

Xcode for Mac OS X 10.6 has both gcc and clang. Later versions of Mac OSX/Xcode only provide clang, and gcc is a wrapper to it. Make Git compile under Mac OS X 10.6 by using clang instead of gcc

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 config.mak.uname | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/config.mak.uname b/config.mak.uname
index d6f7980..d0a3df3 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -102,6 +102,9 @@ ifeq ($(uname_S),Darwin)
 	ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
 		NO_STRLCPY = YesPlease
 	endif
+	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -eq 10 && echo 1),1)
+    CC = clang
+	endif
 	ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
 		HAVE_GETDELIM = YesPlease
 	endif
-- 
2.7.0.303.g2c4f448.dirty
Previous: Junio C HamanoNext: Jeff King
Message 10 of 14 in “What's cooking in git.git (Feb 2016, #07; Thu, 25)”
  1. Junio C HamanoFeb 25, 2016
  2. Torsten BögershausenFeb 26, 2016
  3. Junio C HamanoFeb 26, 2016
  4. Torsten BögershausenFeb 26, 2016
  5. Junio C HamanoFeb 26, 2016
  6. Jeff KingFeb 27, 2016
  7. Torsten BögershausenFeb 27, 2016
  8. Torsten BögershausenFeb 27, 2016
  9. Junio C HamanoFeb 28, 2016
  10. 1/1 config.mak.uname: Darwin: Use clang for Mac OS X 10.6tboegi@web.de, Feb 28, 2016
  11. Jeff KingFeb 29, 2016
  12. Eric SunshineFeb 29, 2016
  13. Junio C HamanoFeb 29, 2016
  14. Eric SunshineFeb 29, 2016

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.