summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2011-12-20 23:40:47 +0000
committerJunio C Hamano <gitster@pobox.com>2012-02-13 02:28:54 -0800
commit6d62c983f7d91565a15e49955b3ed94ae7c73434 (patch)
tree0ba4b1b3a901e8d90080624d4b8b76e8031b1c36
parentbf5cf766af62e4ee34b1217c6351c6fc48eaf255 (diff)
downloadgit-6d62c983f7d91565a15e49955b3ed94ae7c73434.tar.gz
Makefile: Change the default compiler from "gcc" to "cc"
Ever since the very first commit to git.git we've been setting CC to "gcc". Presumably this is behavior that Linus copied from the Linux Makefile. However unlike Linux Git is written in ANSI C and supports a multitude of compilers, including Clang, Sun Studio, xlc etc. On my Linux box "cc" is a symlink to clang, and on a Solaris box I have access to "cc" is Sun Studio's CC. Both of these are perfectly capable of compiling Git, and it's annoying to have to specify CC=cc on the command-line when compiling Git when that's the default behavior of most other portable programs. So change the default to "cc". Users who want to compile with GCC can still add "CC=gcc" to the make(1) command-line, but those users who don't have GCC as their "cc" will see expected behavior, and as a bonus we'll be more likely to smoke out new compilation warnings from our distributors since they'll me using a more varied set of compilers by default. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a782409306..b5530cbaae 100644
--- a/Makefile
+++ b/Makefile
@@ -339,7 +339,7 @@ pathsep = :
export prefix bindir sharedir sysconfdir gitwebdir localedir
-CC = gcc
+CC = cc
AR = ar
RM = rm -f
DIFF = diff