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-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Doug Barton
On 9/12/2012 1:49 AM, David Chisnall wrote:
> On 12 Sep 2012, at 10:09, Doug Barton wrote:
> 
>> Also, users who actually are helping with testing clang for ports
>> continue to report runtime problems, even with things that build fine.
> 
> I hope that you are encouraging maintainers of ports that don't work as 
> expected with clang to submit bug reports upstream.  We can't fix bugs if we 
> aren't made aware of them.

I personally am not directly involved in this effort (other than for my
own ports), but from what I've seen the classical emphasis on pushing
bug reports upstream has been applied in this area as well.

hth,

Doug
___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-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-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-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-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


Re: Clang as default compiler November 4th

2012-09-12 Thread Doug Barton
On 09/11/2012 05:03 AM, Steve Kargl wrote:
> On Tue, Sep 11, 2012 at 04:10:13PM +0200, Dimitry Andric wrote:
>>
>> However, I think the majority of users can get by just fine using clang,
>> right now.  Doug Barton even confirmed in this thread that 80% of our
>> ports already work with it!
> 
> He stated that 80% build with clang.  I doubt that he actually
> tested the functionality of some 17000 ports.

Correct.

Also, users who actually are helping with testing clang for ports
continue to report runtime problems, even with things that build fine.

Doug

___
freebsd-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-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-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


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-toolchain@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"


Re: [rfc] a few kern.mk and bsd.sys.mk related changes

2011-05-31 Thread Doug Barton

On 05/31/2011 07:39, Alexander Best wrote:

...which leads me to the conclusion that -O should be set when DEBUG was
defined: an all ARCHS.


+1

--

Nothin' ever doesn't change, but nothin' changes much.
-- OK Go

Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price.  :)  http://SupersetSolutions.com/

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