{"thread":{"id":"29217","subject":"[PATCH] Makefile: Change the default compiler from \"gcc\" to \"cc\"","startedAt":"2011-12-20T23:40:47Z","lastAt":"2012-02-12T00:05:43Z","messageCount":5,"participants":["Ævar Arnfjörð Bjarmason","Junio C Hamano","Linus Torvalds"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"181547","messageId":"1324424447-7164-1-git-send-email-avarab@gmail.com","threadId":"29217","inReplyTo":null,"subject":"[PATCH] Makefile: Change the default compiler from \"gcc\" to \"cc\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-12-20T23:40:47Z","receivedAt":"2011-12-20T23:40:47Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"Ever since the very first commit to git.git we've been setting CC to\n\"gcc\". Presumably this is behavior that Linus copied from the Linux\nMakefile.\n\nHowever unlike Linux Git is written in ANSI C and supports a multitude\nof compilers, including Clang, Sun Studio, xlc etc. On my Linux box\n\"cc\" is a symlink to clang, and on a Solaris box I have access to \"cc\"\nis Sun Studio's CC.\n\nBoth of these are perfectly capable of compiling Git, and it's\nannoying to have to specify CC=cc on the command-line when compiling\nGit when that's the default behavior of most other portable programs.\n\nSo change the default to \"cc\". Users who want to compile with GCC can\nstill add \"CC=gcc\" to the make(1) command-line, but those users who\ndon't have GCC as their \"cc\" will see expected behavior, and as a\nbonus we'll be more likely to smoke out new compilation warnings from\nour distributors since they'll me using a more varied set of compilers\nby default.\n\nSigned-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\n---\n Makefile |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 9470a10..958c6e6 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -336,7 +336,7 @@ pathsep = :\n \n export prefix bindir sharedir sysconfdir gitwebdir localedir\n \n-CC = gcc\n+CC = cc\n AR = ar\n RM = rm -f\n DIFF = diff\n-- \n1.7.7.3\n"},{"id":"181548","messageId":"7vr4zyiyih.fsf@alter.siamese.dyndns.org","threadId":"29217","inReplyTo":"1324424447-7164-1-git-send-email-avarab@gmail.com","subject":"Re: [PATCH] Makefile: Change the default compiler from \"gcc\" to \"cc\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-12-21T00:01:10Z","receivedAt":"2011-12-21T00:01:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n\n> However unlike Linux Git is written in ANSI C and supports a multitude\n> of compilers, including Clang, Sun Studio, xlc etc. On my Linux box\n> \"cc\" is a symlink to clang, and on a Solaris box I have access to \"cc\"\n> is Sun Studio's CC.\n>\n> Both of these are perfectly capable of compiling Git, and it's\n> annoying to have to specify CC=cc on the command-line when compiling\n> Git when that's the default behavior of most other portable programs.\n\nWould this affect folks in BSD land negatively?\n"},{"id":"181550","messageId":"CACBZZX629-hP6kPR1rHQ1E7SoXHSE0a_S8G0Lm0m4=aizk+6hA@mail.gmail.com","threadId":"29217","inReplyTo":"7vr4zyiyih.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Makefile: Change the default compiler from \"gcc\" to \"cc\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-12-21T01:06:52Z","receivedAt":"2011-12-21T01:06:52Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Dec 21, 2011 at 01:01, Junio C Hamano <gitster@pobox.com> wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>> However unlike Linux Git is written in ANSI C and supports a multitude\n>> of compilers, including Clang, Sun Studio, xlc etc. On my Linux box\n>> \"cc\" is a symlink to clang, and on a Solaris box I have access to \"cc\"\n>> is Sun Studio's CC.\n>>\n>> Both of these are perfectly capable of compiling Git, and it's\n>> annoying to have to specify CC=cc on the command-line when compiling\n>> Git when that's the default behavior of most other portable programs.\n>\n> Would this affect folks in BSD land negatively?\n"},{"id":"181557","messageId":"CA+55aFz-eHtttcE=WrkTTOz24Dz0iK3nTaNRWv9t5y185tNuew@mail.gmail.com","threadId":"29217","inReplyTo":"7vr4zyiyih.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Makefile: Change the default compiler from \"gcc\" to \"cc\"","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2011-12-21T01:33:07Z","receivedAt":"2011-12-21T01:33:07Z","isPatch":true,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"On Tue, Dec 20, 2011 at 4:01 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>\n> Would this affect folks in BSD land negatively?\n\nProbably not.\n\nThe people who might notice are the old=time crappy commercial unixes,\nbut they are all dead by now. The kinds where 'cc' isn't even ANSI C,\nit's K&R and you needed to pay extra for the \"real\" compiler.\n\nBut if those people still exist, they probably haven't figured out CVS\nyet, and still use RCS or SCCS. Their brains would explode messily if\nthey tried to use git.\n\n                           Linus\n"},{"id":"184489","messageId":"CACBZZX4BTiTCWQGXJ2Ny+G5UH3MCwy2sgwBPEVLbDSPYOoiOWw@mail.gmail.com","threadId":"29217","inReplyTo":"7vr4zyiyih.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] Makefile: Change the default compiler from \"gcc\" to \"cc\"","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2012-02-12T00:05:43Z","receivedAt":"2012-02-12T00:05:43Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, Dec 21, 2011 at 01:01, Junio C Hamano <gitster@pobox.com> wrote:\n> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:\n>\n>> However unlike Linux Git is written in ANSI C and supports a multitude\n>> of compilers, including Clang, Sun Studio, xlc etc. On my Linux box\n>> \"cc\" is a symlink to clang, and on a Solaris box I have access to \"cc\"\n>> is Sun Studio's CC.\n>>\n>> Both of these are perfectly capable of compiling Git, and it's\n>> annoying to have to specify CC=cc on the command-line when compiling\n>> Git when that's the default behavior of most other portable programs.\n>\n> Would this affect folks in BSD land negatively?\n\nI see my mail back it December didn't include a reply to that for some\nreason.\n\nAnyway like Linus said probably not, also the BSD's I use have cc as a\nsymlink to whatever the default compiler is, which is usually gcc.\n\nI've recently been hacking git on Solaris again and keep getting bit\nby this, I'd like to propose it for inclusion again, the patch still\napplies.\n"}]}