Skip to content

Commit 7b6daf8

Browse files
tboegigitster
authored andcommitted
config.mak.uname: use clang for Mac OS X 10.6
Gcc under Mac OX 10.6 throws an internal compiler error: CC combine-diff.o combine-diff.c: In function ‘diff_tree_combined’: combine-diff.c:1391: internal compiler error: Segmentation fault while attempting to build Git at 5b442c4 (tree-diff: catch integer overflow in combine_diff_path allocation, 2016-02-19). As clang that ships with the version does not have the same bug, make Git compile under Mac OS X 10.6 by using clang instead of gcc to work this around, as it is unlikely that we will see fixed GCC on that platform. Later versions of Mac OSX/Xcode only provide clang, and gcc is a wrapper to it. Signed-off-by: Torsten Bögershausen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f02fbc4 commit 7b6daf8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

config.mak.uname

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ ifeq ($(uname_S),Darwin)
102102
ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
103103
NO_STRLCPY = YesPlease
104104
endif
105+
ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -eq 10 && echo 1),1)
106+
CC = clang
107+
endif
105108
ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
106109
HAVE_GETDELIM = YesPlease
107110
endif

0 commit comments

Comments
 (0)