Re: [PATCH] BUILD: makefile: change default value of CC from gcc to cc

2020-09-14 Thread Brad Smith

On 9/15/2020 1:31 AM, Willy Tarreau wrote:

On Mon, Sep 14, 2020 at 11:42:47PM -0400, Brad Smith wrote:

It's not about package maintainers as they know to do the right
thing. It's
about end users that don't know any better. In this case someone
submitted
a bogus patch which was commited based on using the wrong compiler.

why they do not just use package system ?

I don't know, but it's beside the point now. All kinds of people for various
reasons (re)build software outside of pre-built packages.

Well, after sleeping over it, I think your points above are valid. We
used to support exclusively gcc by extensively using GNU extensions,
but over time other compilers like icc, clang, and tcc have adopted a
lot of these GNU extensions and are compatible. And it makes sense not
to ask them to call themselves gcc of course. So I think we can do this,
and that 2.3 is the right version to do it, and it will leave us enough
time to see if any issues are reported. In practice I expect the vast
majority of systems where development packages are installed to have
at least one working "cc".

I'm going to take your patch, thanks!


Thanks.



Re: [PATCH] BUILD: makefile: change default value of CC from gcc to cc

2020-09-14 Thread Willy Tarreau
On Mon, Sep 14, 2020 at 11:42:47PM -0400, Brad Smith wrote:
> > It's not about package maintainers as they know to do the right
> > thing. It's
> > about end users that don't know any better. In this case someone
> > submitted
> > a bogus patch which was commited based on using the wrong compiler.
> > 
> > why they do not just use package system ?
> 
> I don't know, but it's beside the point now. All kinds of people for various
> reasons (re)build software outside of pre-built packages.

Well, after sleeping over it, I think your points above are valid. We
used to support exclusively gcc by extensively using GNU extensions,
but over time other compilers like icc, clang, and tcc have adopted a
lot of these GNU extensions and are compatible. And it makes sense not
to ask them to call themselves gcc of course. So I think we can do this,
and that 2.3 is the right version to do it, and it will leave us enough
time to see if any issues are reported. In practice I expect the vast
majority of systems where development packages are installed to have
at least one working "cc".

I'm going to take your patch, thanks!

Willy



Re: [PATCH] BUILD: makefile: change default value of CC from gcc to cc

2020-09-14 Thread Brad Smith

On 9/14/2020 11:25 PM, Илья Шипицин wrote:



вт, 15 сент. 2020 г. в 02:42, Brad Smith >:


On 9/14/2020 5:26 AM, Willy Tarreau wrote:
> Hi Brad,
>
> On Sun, Sep 13, 2020 at 02:53:06AM -0400, Brad Smith wrote:
>> Change the default value of CC from gcc to cc to be more
appropriate
>> for modern day mix of compilers. On GCC based OS's cc -> gcc.
On Clang
>> based OS's cc -> clang. FreeBSD / OpenBSD have switched to
Clang and
>> this corrects building with the proper compiler on OS's using Clang
>> as the default compiler. This especially matters for the
necessity for
>> TLS on OpenBSD. I would expect this affects OpenMandriva and other
>> Linux OS's using Clang as well.
> I don't have a strong opinion on this one, I'd like to get feedback
> from distro maintainers first. In any case it's trivial to set CC
> while building so it's no big deal for sure.

It's not about package maintainers as they know to do the right
thing. It's
about end users that don't know any better. In this case someone
submitted
a bogus patch which was commited based on using the wrong compiler.



why they do not just use package system ?


I don't know, but it's beside the point now. All kinds of people for 
various reasons

(re)build software outside of pre-built packages.


Re: [PATCH] BUILD: makefile: change default value of CC from gcc to cc

2020-09-14 Thread Илья Шипицин
вт, 15 сент. 2020 г. в 02:42, Brad Smith :

> On 9/14/2020 5:26 AM, Willy Tarreau wrote:
> > Hi Brad,
> >
> > On Sun, Sep 13, 2020 at 02:53:06AM -0400, Brad Smith wrote:
> >> Change the default value of CC from gcc to cc to be more appropriate
> >> for modern day mix of compilers. On GCC based OS's cc -> gcc. On Clang
> >> based OS's cc -> clang. FreeBSD / OpenBSD have switched to Clang and
> >> this corrects building with the proper compiler on OS's using Clang
> >> as the default compiler. This especially matters for the necessity for
> >> TLS on OpenBSD. I would expect this affects OpenMandriva and other
> >> Linux OS's using Clang as well.
> > I don't have a strong opinion on this one, I'd like to get feedback
> > from distro maintainers first. In any case it's trivial to set CC
> > while building so it's no big deal for sure.
>
> It's not about package maintainers as they know to do the right thing. It's
> about end users that don't know any better. In this case someone submitted
> a bogus patch which was commited based on using the wrong compiler.
>


why they do not just use package system ?


Re: [PATCH] BUILD: makefile: change default value of CC from gcc to cc

2020-09-14 Thread Brad Smith

On 9/14/2020 5:26 AM, Willy Tarreau wrote:

Hi Brad,

On Sun, Sep 13, 2020 at 02:53:06AM -0400, Brad Smith wrote:

Change the default value of CC from gcc to cc to be more appropriate
for modern day mix of compilers. On GCC based OS's cc -> gcc. On Clang
based OS's cc -> clang. FreeBSD / OpenBSD have switched to Clang and
this corrects building with the proper compiler on OS's using Clang
as the default compiler. This especially matters for the necessity for
TLS on OpenBSD. I would expect this affects OpenMandriva and other
Linux OS's using Clang as well.

I don't have a strong opinion on this one, I'd like to get feedback
from distro maintainers first. In any case it's trivial to set CC
while building so it's no big deal for sure.


It's not about package maintainers as they know to do the right thing. It's
about end users that don't know any better. In this case someone submitted
a bogus patch which was commited based on using the wrong compiler.



Re: [PATCH] BUILD: makefile: change default value of CC from gcc to cc

2020-09-14 Thread Willy Tarreau
Hi Brad,

On Sun, Sep 13, 2020 at 02:53:06AM -0400, Brad Smith wrote:
> Change the default value of CC from gcc to cc to be more appropriate
> for modern day mix of compilers. On GCC based OS's cc -> gcc. On Clang
> based OS's cc -> clang. FreeBSD / OpenBSD have switched to Clang and
> this corrects building with the proper compiler on OS's using Clang
> as the default compiler. This especially matters for the necessity for
> TLS on OpenBSD. I would expect this affects OpenMandriva and other
> Linux OS's using Clang as well.

I don't have a strong opinion on this one, I'd like to get feedback
from distro maintainers first. In any case it's trivial to set CC
while building so it's no big deal for sure.

Thanks,
Willy



[PATCH] BUILD: makefile: change default value of CC from gcc to cc

2020-09-12 Thread Brad Smith
Change the default value of CC from gcc to cc to be more appropriate
for modern day mix of compilers. On GCC based OS's cc -> gcc. On Clang
based OS's cc -> clang. FreeBSD / OpenBSD have switched to Clang and
this corrects building with the proper compiler on OS's using Clang
as the default compiler. This especially matters for the necessity for
TLS on OpenBSD. I would expect this affects OpenMandriva and other
Linux OS's using Clang as well.


diff --git a/Makefile b/Makefile
index 48c595511..841b4a639 100644
--- a/Makefile
+++ b/Makefile
@@ -58,8 +58,8 @@
 # given TARGET is enumerated at the end of "make help".
 #
 # Variables useful for packagers :
-#   CC is set to "gcc" by default and is used for compilation only.
-#   LD is set to "gcc" by default and is used for linking only.
+#   CC is set to "cc" by default and is used for compilation only.
+#   LD is set to "cc" by default and is used for linking only.
 #   ARCH may be useful to force build of 32-bit binary on 64-bit systems
 #   CFLAGS is automatically set for the specified CPU and may be overridden.
 #   LDFLAGS is automatically set to -g and may be overridden.
@@ -157,8 +157,7 @@ CPU = generic
 ARCH =
 
  Toolchain options.
-# GCC is normally used both for compiling and linking.
-CC = gcc
+CC = cc
 LD = $(CC)
 
  Debug flags (typically "-g").