All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Makefile: Change the default compiler from "gcc" to "cc"
@ 2011-12-20 23:40 Ævar Arnfjörð Bjarmason
  2011-12-21  0:01 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2011-12-20 23:40 UTC (permalink / raw)
  To: git
  Cc: Junio C Hamano, Linus Torvalds, Ævar Arnfjörð Bjarmason

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>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 9470a10..958c6e6 100644
--- a/Makefile
+++ b/Makefile
@@ -336,7 +336,7 @@ pathsep = :
 
 export prefix bindir sharedir sysconfdir gitwebdir localedir
 
-CC = gcc
+CC = cc
 AR = ar
 RM = rm -f
 DIFF = diff
-- 
1.7.7.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: Change the default compiler from "gcc" to "cc"
  2011-12-20 23:40 [PATCH] Makefile: Change the default compiler from "gcc" to "cc" Ævar Arnfjörð Bjarmason
@ 2011-12-21  0:01 ` Junio C Hamano
  2011-12-21  1:06   ` Ævar Arnfjörð Bjarmason
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Junio C Hamano @ 2011-12-21  0:01 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git, Linus Torvalds

Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:

> 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.

Would this affect folks in BSD land negatively?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: Change the default compiler from "gcc" to "cc"
  2011-12-21  0:01 ` Junio C Hamano
@ 2011-12-21  1:06   ` Ævar Arnfjörð Bjarmason
  2011-12-21  1:33   ` Linus Torvalds
  2012-02-12  0:05   ` Ævar Arnfjörð Bjarmason
  2 siblings, 0 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2011-12-21  1:06 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Linus Torvalds

On Wed, Dec 21, 2011 at 01:01, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> 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.
>
> Would this affect folks in BSD land negatively?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: Change the default compiler from "gcc" to "cc"
  2011-12-21  0:01 ` Junio C Hamano
  2011-12-21  1:06   ` Ævar Arnfjörð Bjarmason
@ 2011-12-21  1:33   ` Linus Torvalds
  2012-02-12  0:05   ` Ævar Arnfjörð Bjarmason
  2 siblings, 0 replies; 5+ messages in thread
From: Linus Torvalds @ 2011-12-21  1:33 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Ævar Arnfjörð, git

On Tue, Dec 20, 2011 at 4:01 PM, Junio C Hamano <gitster@pobox.com> wrote:
>
> Would this affect folks in BSD land negatively?

Probably not.

The people who might notice are the old=time crappy commercial unixes,
but they are all dead by now. The kinds where 'cc' isn't even ANSI C,
it's K&R and you needed to pay extra for the "real" compiler.

But if those people still exist, they probably haven't figured out CVS
yet, and still use RCS or SCCS. Their brains would explode messily if
they tried to use git.

                           Linus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Makefile: Change the default compiler from "gcc" to "cc"
  2011-12-21  0:01 ` Junio C Hamano
  2011-12-21  1:06   ` Ævar Arnfjörð Bjarmason
  2011-12-21  1:33   ` Linus Torvalds
@ 2012-02-12  0:05   ` Ævar Arnfjörð Bjarmason
  2 siblings, 0 replies; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2012-02-12  0:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Linus Torvalds

On Wed, Dec 21, 2011 at 01:01, Junio C Hamano <gitster@pobox.com> wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> 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.
>
> Would this affect folks in BSD land negatively?

I see my mail back it December didn't include a reply to that for some
reason.

Anyway like Linus said probably not, also the BSD's I use have cc as a
symlink to whatever the default compiler is, which is usually gcc.

I've recently been hacking git on Solaris again and keep getting bit
by this, I'd like to propose it for inclusion again, the patch still
applies.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-12  0:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-20 23:40 [PATCH] Makefile: Change the default compiler from "gcc" to "cc" Ævar Arnfjörð Bjarmason
2011-12-21  0:01 ` Junio C Hamano
2011-12-21  1:06   ` Ævar Arnfjörð Bjarmason
2011-12-21  1:33   ` Linus Torvalds
2012-02-12  0:05   ` Ævar Arnfjörð Bjarmason

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.