Re: Clang as default compiler November 4th

2012-09-12 Thread Mark Linimon
On Thu, Sep 13, 2012 at 08:21:31AM +0200, Pietro Cerutti wrote:
> On 2012-Sep-11, 23:29, Doug Barton wrote:
> > What we need to do is what I and others have been asking to do for
> > years. We need to designate a modern version of gcc (no less than 4.6)
> > as the official default ports compiler, and rework whatever is needed to
> > support this. Fortunately, that goal is much more easily achieved than
> > fixing ports to build and run with clang. (It's harder than it sounds
> > because there are certain key libs that define some paths depending on
> > what compiler they were built with, but still easier than dealing with
> > clang in the short term.)
> 
> I like the idea very much. My only concern is that gcc is heavy to
> build.

Gerald has been advocating this for a while as well.  In fact, he's
just made a commit that makes the lang/gcc42 compiler much easier to
bootstrap itself.

There's a set of interlocking changes that we need to make to the
infrastructure to modernize our compiler choices.  I've been talking
to Gerald about some of the aspects of it and hope to have something
to propose fairly soon.

But IMHO it's a little bit trickier than it appears at first glance.

mcl
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Pietro Cerutti
On 2012-Sep-11, 23:29, Doug Barton wrote:
> What we need to do is what I and others have been asking to do for
> years. We need to designate a modern version of gcc (no less than 4.6)
> as the official default ports compiler, and rework whatever is needed to
> support this. Fortunately, that goal is much more easily achieved than
> fixing ports to build and run with clang. (It's harder than it sounds
> because there are certain key libs that define some paths depending on
> what compiler they were built with, but still easier than dealing with
> clang in the short term.)

I like the idea very much. My only concern is that gcc is heavy to
build. I can't imagine booting into a freshly installed production
machine and having to install gcc just to build the couple of ports
that I need there. Unless we provide a fast shortcut way to have make
depends install gcc via pkg when needed, or some similar mechanism..

-- 
Pietro Cerutti
The FreeBSD Project
g...@freebsd.org

PGP Public Key:
http://gahr.ch/pgp


pgpjvBufkSprf.pgp
Description: PGP signature


Re: Clang as default compiler November 4th

2012-09-12 Thread Jan Beich
Doug Barton  writes:

> On 09/11/2012 02:52 AM, Erik Cederstrand wrote:
>> So can we do a sweep on the ports tree and mark the 2232 ports with 
>> USE_GCC=4.2 until they can actually build with clang?
>
> Unfortunately it isn't that simple. We already have a statistically
> significant number of ports that don't even compile with gcc 4.2.1. How
> many compilers do we expect the users to install? :)
>
> What we need to do is what I and others have been asking to do for
> years. We need to designate a modern version of gcc (no less than 4.6)
> as the official default ports compiler, and rework whatever is needed to
> support this. Fortunately, that goal is much more easily achieved than
> fixing ports to build and run with clang. (It's harder than it sounds
> because there are certain key libs that define some paths depending on
> what compiler they were built with, but still easier than dealing with
> clang in the short term.)

To that effect ports also need to respect CC/CXX. There were a few -exp
runs without /usr/bin/{cc,gcc,etc} to find out non-conforming ones as
part of ports/159117. However, the issue was quickly shoved under the
carpet in order to focus on the more important, clang as default.

# last try, assumes_gcc are ports ignoring CC/CXX, many are fixed
http://pointyhat.freebsd.org/errorlogs/amd64-errorlogs/e.9-exp.20110723205754/index-reason.html

>
> Once that is done, the compiler in the base is an afterthought, and we
> can do away with gcc in the base altogether much more easily. Users who
> want to help support building ports with clang can continue to do so.
>
> Doug

--
Ignoring for the moment clang -exp runs are *still* done with clang 3.0
while we're discussing here clang 3.2 becoming default.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Daniel Nebdal
On Wed, Sep 12, 2012 at 10:59 PM, Doug Barton  wrote:
> On 9/12/2012 1:22 AM, Jerry wrote:
>> On Tue, 11 Sep 2012 23:29:27 -1000
>> Doug Barton articulated:
>>
>>> What we need to do is what I and others have been asking to do for
>>> years. We need to designate a modern version of gcc (no less than 4.6)
>>> as the official default ports compiler, and rework whatever is needed
>>> to support this. Fortunately, that goal is much more easily achieved
>>> than fixing ports to build and run with clang. (It's harder than it
>>> sounds because there are certain key libs that define some paths
>>> depending on what compiler they were built with, but still easier
>>> than dealing with clang in the short term.)
>>
>> That is a well thought out, highly intuitive and completely doable
>> idea. Therefore it will be ignored.
>
> No, it'll be ignored because I suggested it. :)
>
>> It seems that the FreeBSD authors are more concerned with the
>> licensing language of GCC than in getting a fully functioning port's
>> compiler into the FreeBSD base system.
>
> Just to be clear, I'm not suggesting putting the "ports compiler" into
> the base. I'm suggesting that it be managed as a port, just like pkg is.
> This works fine for the ports that are already hard-coding compiler
> dependencies, and mostly worked for me back when I get it a test run
> when I made the suggestion years ago. The few glitches I (and others who
> have done it since) ran into just need some elbow grease applied.
>
> By keeping ports-related things in the ports tree we gain a huge amount
> of agility, and lose the concerns about licensing in the base. It's a
> win/win.
>
> Doug
>


Three-ish things:
a) Doesn't that remove all incentives for eventually converging on
just one compiler (bar some specific exceptions)?
a.1) Isn't that bad?
b) Doesn't that mean that at some future point, we'll have to jump the
ports compiler to a newer (probably much newer) version, with all the
maintenance fun of that?
c) I guess this still lets me use clang for most ports if I really
wish to? (I've compiled most ports with clang for a while, and the
speed + useful error messages would be hard to give up...)

I'm not sure if those are big or small issues - probably a matter of taste. :)

-- 
Daniel Nebdal
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Doug Barton
On 9/12/2012 1:22 AM, Jerry wrote:
> On Tue, 11 Sep 2012 23:29:27 -1000
> Doug Barton articulated:
> 
>> What we need to do is what I and others have been asking to do for
>> years. We need to designate a modern version of gcc (no less than 4.6)
>> as the official default ports compiler, and rework whatever is needed
>> to support this. Fortunately, that goal is much more easily achieved
>> than fixing ports to build and run with clang. (It's harder than it
>> sounds because there are certain key libs that define some paths
>> depending on what compiler they were built with, but still easier
>> than dealing with clang in the short term.)
> 
> That is a well thought out, highly intuitive and completely doable
> idea. Therefore it will be ignored.

No, it'll be ignored because I suggested it. :)

> It seems that the FreeBSD authors are more concerned with the
> licensing language of GCC than in getting a fully functioning port's
> compiler into the FreeBSD base system.

Just to be clear, I'm not suggesting putting the "ports compiler" into
the base. I'm suggesting that it be managed as a port, just like pkg is.
This works fine for the ports that are already hard-coding compiler
dependencies, and mostly worked for me back when I get it a test run
when I made the suggestion years ago. The few glitches I (and others who
have done it since) ran into just need some elbow grease applied.

By keeping ports-related things in the ports tree we gain a huge amount
of agility, and lose the concerns about licensing in the base. It's a
win/win.

Doug

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Doug Barton
On 9/12/2012 12:40 AM, Erik Cederstrand wrote:
> Den 12/09/2012 kl. 11.29 skrev Doug Barton :
> 
>> On 09/11/2012 02:52 AM, Erik Cederstrand wrote:
>>> So can we do a sweep on the ports tree and mark the 2232 ports
>>> with USE_GCC=4.2 until they can actually build with clang?
>> 
>> Unfortunately it isn't that simple. We already have a
>> statistically significant number of ports that don't even compile
>> with gcc 4.2.1. How many compilers do we expect the users to
>> install? :)
> 
> If a port doesn't compile with the default compiler in base, I expect
> that port to add a build dependency on the compiler that it actually
> does compiles with.

Yes, they do this now. The problem is that the set is growing, and the
rate of growth is increasing.

> Of course, I hope to not have 6 different
> compilers installed on my system, but the list of build or runtime
> dependencies are at the discretion of the port (maintainer). As you
> (I think) said, we can't force port maintainers to patch their ports
> to support clang.

Those are unrelated issues. Please re-read the bits of my post that you
snipped. The overwhelming majority of problems we have with compiling
ports now would be fixed by having a modern version of gcc as the
official (i.e., supported) "ports compiler." The clang efforts would be
a parallel track.

Doug

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Mark Linimon
On Wed, Sep 12, 2012 at 03:03:43PM +0200, Lars Engels wrote:
> two of the ports I maintain don't build with CLANG, yet. I
> just checked that on the wiki page [1].

To repeat myself, the ports I've listed on that page are the "big
problems".  People need to look at the errorlogs URLs up at the
top to see the complete list.

mcl
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Lars Engels
On Wed, Sep 12, 2012 at 04:15:20AM -0500, Mark Linimon wrote:
> On Tue, Sep 11, 2012 at 11:27:50AM +0200, Lars Engels wrote:
> > At the moment the ports maintainers don't give much about if their ports
> > build with CLANG or not because they're not forced to.
> 
> I think this is a mis-representation.
> 
> Adding the requirement "your ports must work on clang" is adding an
> ex-post-facto requirement.  This creates the following matrix of what
> we are implicitly asking maintainers to do:
> 
> (FreeBSD 7|8|9|10) * (amd64|arm|i386|powerpc|sparc64) * (base gcc|base clang)
> 
> It is completely insane to expect anyone to be able to test in all of those
> environments, or even a tiny subset of them.  This isn't what most people
> sign up for when they sign up to maintain ports.

No, I didn't mean it that way. I only meant that the people /
maintainers running CURRENT will actually see that their ports don't
work and if they want to keep on using them on CURRENT they need to fix
them. e.g. two of the ports I maintain don't build with CLANG, yet. I
just checked that on the wiki page [1].
I had to look that up manually, but would have experienced that if I my
CURRENT box was building with CLANG by default. :)

It's clear that we cannot expect our maintainers to check all possible
combinations of FreeBSD, architecture and compiler.

> 
> > Those who don't run CURRENT won't notice, but those who do will have to
> > get their butts up and fix the ports
> 
> I think it's foolish to assume that maintainres don't have their butts in
> gear as it is.  Please note, we have nearly 1300 PRs, hundreds of ports with
> build errors and/or PRs, and hundreds that fail on -current only.  I try to
> advertise all these things the best I know how.  Adding the hundreds that
> fail on -clang only and then blaming the maintainers is simply going to be
> counter-productive.



[1] http://wiki.freebsd.org/PortsAndClang


pgp2qfIiXlAlJ.pgp
Description: PGP signature


Re: Clang as default compiler November 4th

2012-09-12 Thread Jerry
On Tue, 11 Sep 2012 23:29:27 -1000
Doug Barton articulated:

> What we need to do is what I and others have been asking to do for
> years. We need to designate a modern version of gcc (no less than 4.6)
> as the official default ports compiler, and rework whatever is needed
> to support this. Fortunately, that goal is much more easily achieved
> than fixing ports to build and run with clang. (It's harder than it
> sounds because there are certain key libs that define some paths
> depending on what compiler they were built with, but still easier
> than dealing with clang in the short term.)

That is a well thought out, highly intuitive and completely doable
idea. Therefore it will be ignored.

It seems that the FreeBSD authors are more concerned with the
licensing language of GCC than in getting a fully functioning port's
compiler into the FreeBSD base system. Thank God that everyone isn't as
narrow minded as that. Imagine if we all hated people simple because of
their skin color or religion ... or do we?

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__
It would save me a lot of time if you just gave up and went mad now.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Erik Cederstrand
Den 12/09/2012 kl. 11.29 skrev Doug Barton :

> On 09/11/2012 02:52 AM, Erik Cederstrand wrote:
>> So can we do a sweep on the ports tree and mark the 2232 ports with 
>> USE_GCC=4.2 until they can actually build with clang?
> 
> Unfortunately it isn't that simple. We already have a statistically
> significant number of ports that don't even compile with gcc 4.2.1. How
> many compilers do we expect the users to install? :)

If a port doesn't compile with the default compiler in base, I expect that port 
to add a build dependency on the compiler that it actually does compiles with. 
Of course, I hope to not have 6 different compilers installed on my system, but 
the list of build or runtime dependencies are at the discretion of the port 
(maintainer). As you (I think) said, we can't force port maintainers to patch 
their ports to support clang.

So even today, we have a significant number of ports that don't compile with 
the default compiler (GCC 4.2.1). Aren't they broken already, in the sense that 
they fail to tell me, the user, which compiler I should use?

Thanks,
Erik___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Doug Barton
On 09/11/2012 11:15 PM, Mark Linimon wrote:
> On Tue, Sep 11, 2012 at 11:27:50AM +0200, Lars Engels wrote:
>> At the moment the ports maintainers don't give much about if their ports
>> build with CLANG or not because they're not forced to.
> 
> I think this is a mis-representation.
> 
> Adding the requirement "your ports must work on clang" is adding an
> ex-post-facto requirement.  This creates the following matrix of what
> we are implicitly asking maintainers to do:
> 
> (FreeBSD 7|8|9|10) * (amd64|arm|i386|powerpc|sparc64) * (base gcc|base clang)
> 
> It is completely insane to expect anyone to be able to test in all of those
> environments, or even a tiny subset of them.  This isn't what most people
> sign up for when they sign up to maintain ports.
> 
>> Those who don't run CURRENT won't notice, but those who do will have to
>> get their butts up and fix the ports
> 
> I think it's foolish to assume that maintainres don't have their butts in
> gear as it is.  Please note, we have nearly 1300 PRs, hundreds of ports with
> build errors and/or PRs, and hundreds that fail on -current only.  I try to
> advertise all these things the best I know how.  Adding the hundreds that
> fail on -clang only and then blaming the maintainers is simply going to be
> counter-productive.

Write the day on your calendars folks, I completely agree with what Mark
said above. :) This is a big part of what I meant with some of my more
colorful comments in my original post on this topic.

Doug

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Doug Barton
On 09/11/2012 02:52 AM, Erik Cederstrand wrote:
> So can we do a sweep on the ports tree and mark the 2232 ports with 
> USE_GCC=4.2 until they can actually build with clang?

Unfortunately it isn't that simple. We already have a statistically
significant number of ports that don't even compile with gcc 4.2.1. How
many compilers do we expect the users to install? :)

What we need to do is what I and others have been asking to do for
years. We need to designate a modern version of gcc (no less than 4.6)
as the official default ports compiler, and rework whatever is needed to
support this. Fortunately, that goal is much more easily achieved than
fixing ports to build and run with clang. (It's harder than it sounds
because there are certain key libs that define some paths depending on
what compiler they were built with, but still easier than dealing with
clang in the short term.)

Once that is done, the compiler in the base is an afterthought, and we
can do away with gcc in the base altogether much more easily. Users who
want to help support building ports with clang can continue to do so.

Doug
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Mark Blackman

On 12 Sep 2012, at 10:15, Mark Linimon  wrote:

> On Tue, Sep 11, 2012 at 11:27:50AM +0200, Lars Engels wrote:
>> At the moment the ports maintainers don't give much about if their ports
>> build with CLANG or not because they're not forced to.
> 
> I think this is a mis-representation.
> 
> Adding the requirement "your ports must work on clang" is adding an
> ex-post-facto requirement.  This creates the following matrix of what
> we are implicitly asking maintainers to do:
> 
> (FreeBSD 7|8|9|10) * (amd64|arm|i386|powerpc|sparc64) * (base gcc|base clang)
> 
> It is completely insane to expect anyone to be able to test in all of those
> environments, or even a tiny subset of them.  This isn't what most people
> sign up for when they sign up to maintain ports.
> 
>> Those who don't run CURRENT won't notice, but those who do will have to
>> get their butts up and fix the ports
> 
> I think it's foolish to assume that maintainres don't have their butts in
> gear as it is.  Please note, we have nearly 1300 PRs, hundreds of ports with
> build errors and/or PRs, and hundreds that fail on -current only.  I try to
> advertise all these things the best I know how.  Adding the hundreds that
> fail on -clang only and then blaming the maintainers is simply going to be
> counter-productive.

I'd also guess that FreeBSD ports is probably the biggest exposure clang
has ever seen to 3rd party code. I can't think of any other project 
except maybe macports who try to run clang over some much 3rd party code and 
so FreeBSD  ports is hitting all the bumps in the road that most people get
to ignore.

- Mark


___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Mark Linimon
On Tue, Sep 11, 2012 at 11:27:50AM +0200, Lars Engels wrote:
> At the moment the ports maintainers don't give much about if their ports
> build with CLANG or not because they're not forced to.

I think this is a mis-representation.

Adding the requirement "your ports must work on clang" is adding an
ex-post-facto requirement.  This creates the following matrix of what
we are implicitly asking maintainers to do:

(FreeBSD 7|8|9|10) * (amd64|arm|i386|powerpc|sparc64) * (base gcc|base clang)

It is completely insane to expect anyone to be able to test in all of those
environments, or even a tiny subset of them.  This isn't what most people
sign up for when they sign up to maintain ports.

> Those who don't run CURRENT won't notice, but those who do will have to
> get their butts up and fix the ports

I think it's foolish to assume that maintainres don't have their butts in
gear as it is.  Please note, we have nearly 1300 PRs, hundreds of ports with
build errors and/or PRs, and hundreds that fail on -current only.  I try to
advertise all these things the best I know how.  Adding the hundreds that
fail on -clang only and then blaming the maintainers is simply going to be
counter-productive.

mcl
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-11 Thread Paul Schmehl
--On September 11, 2012 2:44:03 AM -0700 Doug Barton  
wrote:


Doug, as you can already use CLANG instead of GCC now, you will be able
to use GCC instead of CLANG after November 4th.


There's lots of things I _can_ do, what we're discussing is what the
defaults should be.


At the moment the ports maintainers don't give much about if their ports
build with CLANG or not


Do you follow ports development? At all? There have been extensive
efforts over the last several years to get more ports compiling with
clang. The problem is that things like the c89 issue don't percolate
down, and we don't have a concerted effort from all of the relevant
parties to improve the issue.

Fixing the problem of getting the right eyeballs on the things that need
fixing won't be improved by switching the default before they are fixed.
In fact, it's likely to make the people who are src-centric now even
less likely to help because their work will be "done."


Those who don't run CURRENT won't notice, but those who do will have to
get their butts up and fix the ports, so 10.0 can have 99% of all ports
build with CLANG and even 8.x and 9.x can already profit from having the
broken ports fixed now.


Yeah, and I'm going to get a pony out of this deal, right? :)

You completely misunderstand the nature of the problem, therefore your
proposed solution isn't going to solve it.



Perhaps a port maintainer's input would help?  I'd never even heard of 
clang until recently.  I'm not a programmer.  If I can't get my ports to 
compile with clang without a knowledge of programming, I'll abandon them. 
I'm too old and too tired to try learning a brand new system.  I doubt I'm 
alone.


--
Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
***
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-11 Thread Doug Barton
On 09/11/2012 02:27 AM, Lars Engels wrote:
> On Mon, Sep 10, 2012 at 10:54:04PM -0700, Doug Barton wrote:
>> As of last week, 4,680 ports out of 23,857 failed to build with clang on
>> 9-amd64. That's almost a 20% failure rate. Until we have better support
>> for either building ports with clang, or have better support for the
>> idea of a "ports compiler," this change is premature. The ports are an
>> important part of the FreeBSD Operating _System_, and pulling the
>> trigger on the default compiler before the ports problems are addressed
>> robustly seems like a big fat FU.
>>
>> That said, I agree that this issue needs to be addressed. In fact, 9
>> months before the release of 9.0 I said on the internal committers list
>> that there was no point in making a new release until we had thoroughly
>> addressed both the default compiler for the base, and resolving the
>> "ports compiler" issue. While there has been some movement on the
>> former, there has been nothing done on the latter for years now, even
>> though everyone agrees that it is an important issue.
>>
>> I'd like to request that rather than moving the default compiler
>> prematurely that you call for volunteers to address the problems with
>> the ports. Both the issues of fixing more ports to build correctly with
>> clang, and the issue of defining a "ports compiler" version of gcc (and
>> appropriate infrastructure) for those that can't. Once those issues are
>> resolved there would not be any further obstacles to moving the default.
>> Until they are, the change is premature.
>>
>> Doug
> 
> Doug, as you can already use CLANG instead of GCC now, you will be able
> to use GCC instead of CLANG after November 4th.

There's lots of things I _can_ do, what we're discussing is what the
defaults should be.

> At the moment the ports maintainers don't give much about if their ports
> build with CLANG or not

Do you follow ports development? At all? There have been extensive
efforts over the last several years to get more ports compiling with
clang. The problem is that things like the c89 issue don't percolate
down, and we don't have a concerted effort from all of the relevant
parties to improve the issue.

Fixing the problem of getting the right eyeballs on the things that need
fixing won't be improved by switching the default before they are fixed.
In fact, it's likely to make the people who are src-centric now even
less likely to help because their work will be "done."

> Those who don't run CURRENT won't notice, but those who do will have to
> get their butts up and fix the ports, so 10.0 can have 99% of all ports
> build with CLANG and even 8.x and 9.x can already profit from having the
> broken ports fixed now.

Yeah, and I'm going to get a pony out of this deal, right? :)

You completely misunderstand the nature of the problem, therefore your
proposed solution isn't going to solve it.

Doug

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-11 Thread Lars Engels
On Mon, Sep 10, 2012 at 10:54:04PM -0700, Doug Barton wrote:
> As of last week, 4,680 ports out of 23,857 failed to build with clang on
> 9-amd64. That's almost a 20% failure rate. Until we have better support
> for either building ports with clang, or have better support for the
> idea of a "ports compiler," this change is premature. The ports are an
> important part of the FreeBSD Operating _System_, and pulling the
> trigger on the default compiler before the ports problems are addressed
> robustly seems like a big fat FU.
> 
> That said, I agree that this issue needs to be addressed. In fact, 9
> months before the release of 9.0 I said on the internal committers list
> that there was no point in making a new release until we had thoroughly
> addressed both the default compiler for the base, and resolving the
> "ports compiler" issue. While there has been some movement on the
> former, there has been nothing done on the latter for years now, even
> though everyone agrees that it is an important issue.
> 
> I'd like to request that rather than moving the default compiler
> prematurely that you call for volunteers to address the problems with
> the ports. Both the issues of fixing more ports to build correctly with
> clang, and the issue of defining a "ports compiler" version of gcc (and
> appropriate infrastructure) for those that can't. Once those issues are
> resolved there would not be any further obstacles to moving the default.
> Until they are, the change is premature.
> 
> Doug

Doug, as you can already use CLANG instead of GCC now, you will be able
to use GCC instead of CLANG after November 4th.

At the moment the ports maintainers don't give much about if their ports
build with CLANG or not because they're not forced to.
Those who don't run CURRENT won't notice, but those who do will have to
get their butts up and fix the ports, so 10.0 can have 99% of all ports
build with CLANG and even 8.x and 9.x can already profit from having the
broken ports fixed now.


pgpFIV5jKkyQL.pgp
Description: PGP signature


Re: Clang as default compiler November 4th

2012-09-10 Thread Doug Barton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

As of last week, 4,680 ports out of 23,857 failed to build with clang on
9-amd64. That's almost a 20% failure rate. Until we have better support
for either building ports with clang, or have better support for the
idea of a "ports compiler," this change is premature. The ports are an
important part of the FreeBSD Operating _System_, and pulling the
trigger on the default compiler before the ports problems are addressed
robustly seems like a big fat FU.

That said, I agree that this issue needs to be addressed. In fact, 9
months before the release of 9.0 I said on the internal committers list
that there was no point in making a new release until we had thoroughly
addressed both the default compiler for the base, and resolving the
"ports compiler" issue. While there has been some movement on the
former, there has been nothing done on the latter for years now, even
though everyone agrees that it is an important issue.

I'd like to request that rather than moving the default compiler
prematurely that you call for volunteers to address the problems with
the ports. Both the issues of fixing more ports to build correctly with
clang, and the issue of defining a "ports compiler" version of gcc (and
appropriate infrastructure) for those that can't. Once those issues are
resolved there would not be any further obstacles to moving the default.
Until they are, the change is premature.

Doug


On 09/10/2012 14:12, Brooks Davis wrote:
> [Please confine your replies to toolch...@freebsd.org to keep the thread
> on the most relevant list.]
> 
> For the past several years we've been working towards migrating from
> GCC to Clang/LLVM as our default compiler.  We intend to ship FreeBSD
> 10.0 with Clang as the default compiler on i386 and amd64 platforms.  To
> this end, we will make WITH_CLANG_IS_CC the default on i386 and amd64
> platforms on November 4th.
> 
> What does the mean to you?
> 
>  * When you build world after the default is changed /usr/bin/cc, cpp, and
>c++ will be links to clang.
> 
>  * This means the initial phase of buildworld and "old style" kernel
>compilation will use clang instead of gcc.  This is known to work.
> 
>  * It also means that ports will build with clang by default.  A major
>of ports work, but a significant number are broken or blocked by
>broken ports. For more information see:
>  http://wiki.freebsd.org/PortsAndClang
> 
> What issues remain?
> 
>  * The gcc->clang transition currently requires setting CC, CXX, and CPP
>in addition to WITH_CLANG_IS_CC.  I will post a patch to toolchain@
>to address this shortly.
> 
>  * Ports compiler selection infrastructure is still under development.
> 
>  * Some ports could build with clang with appropriate tweaks.
> 
> What can you do to help?
> 
>  * Switch (some of) your systems.  Early adoption can help us find bugs.
> 
>  * Fix ports to build with clang.  If you don't have a clang system, you
>can use the CLANG/amd64 or CLANG/i386 build environments on
>redports.org.
> 
> tl;dr: Clang will become the default compiler for x86 architectures on 
> 2012-11-04
> 
> -- Brooks
> 


- -- 

I am only one, but I am one.  I cannot do everything, but I can do
something.  And I will not let what I cannot do interfere with what
I can do.
-- Edward Everett Hale, (1822 - 1909)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (FreeBSD)

iQEcBAEBCAAGBQJQTtH8AAoJEFzGhvEaGryEU3gIAJ3X2EHDCVnkC/CYTMOkceho
KS6qVcQK4OCbbG+8TKkjrHNdiBO7ZuJKxfvr/TZC1zNKc8wYBlWo3s07wCHmu8Nj
OP8UwTMKumnljnYlRanQiLO9iAZKwGfI2gdxJTb5YABN2StRMXnD17Yyic6pw090
7l+cQw3iJAI8vbO4su33HJOhru0o4XLodbazHXFc6RjabAfXfuk1W6V0PfAodVC9
ZUGbF4WA7F0sJOEVuohmSk8ICHQRzTWofpdvCTlhHc1XYTaQ9u/dLGUp1C8g/BUG
CJQua7wsBdf4VgsvlYBxTAOEpURqot0Ild7zQL+9vZtf7cGCsfalpwBWzQ9J/Wk=
=gRkN
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-10 Thread matt

On 09/10/12 14:22, Daniel Eischen wrote:

On Mon, 10 Sep 2012, Brooks Davis wrote:


[Please confine your replies to toolch...@freebsd.org to keep the thread
on the most relevant list.]

For the past several years we've been working towards migrating from
GCC to Clang/LLVM as our default compiler.  We intend to ship FreeBSD
10.0 with Clang as the default compiler on i386 and amd64 platforms.  To
this end, we will make WITH_CLANG_IS_CC the default on i386 and amd64
platforms on November 4th.

What does the mean to you?

* When you build world after the default is changed /usr/bin/cc, cpp, 
and

  c++ will be links to clang.

* This means the initial phase of buildworld and "old style" kernel
  compilation will use clang instead of gcc.  This is known to work.

* It also means that ports will build with clang by default.  A major
  of ports work, but a significant number are broken or blocked by
  broken ports. For more information see:
http://wiki.freebsd.org/PortsAndClang

What issues remain?

* The gcc->clang transition currently requires setting CC, CXX, and CPP
  in addition to WITH_CLANG_IS_CC.  I will post a patch to toolchain@
  to address this shortly.


I assume this will be done, tested and committed before 2012-11-04
(or whenever the switchover date is).



* Ports compiler selection infrastructure is still under development.


This should be a prerequisite before making the switch, given
that ports will be broken without a work-around for building
them with gcc.

I've been using a somewhat dirty method of doing this by checking the 
presence of a file in the port's main directory, e.g. if "basegcc" is 
present, build with that, if "clang" is present use it, otherwise 
default to gcc47.  Obviously that configuration is system specific, but 
the fundamental idea is look for a file in the ports directory that 
dictates the compiler. Perhaps even add a make ccconfig. It works quite 
nicely because you can resume a portmaster spree without having to 
suspend and change CC manually, or build all clang ports first etc. 
Further csup doesn't touch files it doesn't no about, so updating the 
tree (without wiping it out) preserves the fact you'd prefer or need to 
build a given port with something else.


There are definitely some ports that have been ignoring libmap.conf, 
which tends to require me to build some of their dependencies with base 
gcc, but otherwise I've been running this system for a few months and it 
works quite well...portmaster can upgrade without user intervention, and 
it's quite easy to add cflags logic.


Granted this works for me and is probably not the ideal solution...also 
hacked on it to post, so probably typos :)
Something like this in make.conf (with fstack-protector-all for all 
ports which works great)


.if !empty(.CURDIR:M/usr/ports/*)
CFLAGS+= -fstack-protector-all
.endif

.if empty(.CURDIR:M/usr/ports/*) && exists(/usr/local/bin/gcc47) && 
!exists(basegcc) && !exists(clang)

# this was occasionally necessary
#LDFLAGS+=-lintl
# custom cflags if desired
#CFLAGS+=-custom cflags for gcc47
#custom cputype if desired
CPUTYPE=amdfam10
CC=gcc47
CPP=cpp47
CXX=g++47
.endif
.if empty(.CURDIR:M/usr/ports/*) && exists(/usr/bin/clang) && exists(clang)
.if !defined(CC) || ${CC} == "cc"
CC=clang
.endif
.if !defined(CXX) || ${CXX} == "c++"
CXX=clang++
.endif
.if !defined(CPP) || ${CPP} == "cpp"
CPP=clang-cpp
.endif
NO_WERROR=
WERROR=
.endif

Usage is as simple as "touch basegcc" in the port dir or "touch clang" 
etc. to select appropriate compiler


Matt
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"