From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 17:48:28 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F31761065670; Tue, 11 Sep 2012 17:48:27 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id C2E138FC12; Tue, 11 Sep 2012 17:48:27 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id q8BHmI4f096689; Tue, 11 Sep 2012 10:48:19 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id q8BHmIa9096688; Tue, 11 Sep 2012 10:48:18 -0700 (PDT) (envelope-from sgk) Date: Tue, 11 Sep 2012 10:48:18 -0700 From: Steve Kargl To: Mark Felder Message-ID: <20120911174818.GA96512@troutmask.apl.washington.edu> References: <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> <20120911133215.GB87126@troutmask.apl.washington.edu> <504F4650.9090700@protected-networks.net> <20120911170412.GA96297@troutmask.apl.washington.edu> <6a7877fa-190e-465e-ba11-e8506faa9ab7@email.android.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a7877fa-190e-465e-ba11-e8506faa9ab7@email.android.com> User-Agent: Mutt/1.4.2.3i Cc: Christer Solskogen , toolchain@freebsd.org, Michael Butler , current@freebsd.org Subject: Re: Clang as default compiler November 4th X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Sep 2012 17:48:28 -0000 On Tue, Sep 11, 2012 at 12:14:09PM -0500, Mark Felder wrote: > "Clang produces incorrect code" vs "Clang's floating point has > issues" are two different arguments. Wow. clang produces incorrect floating point code, and that's somehow just an issue with floating point. > For a mathematical application it would be stupid to use > clang if this is the case. I see no problem with it being > the default compiler though. If Atlas is in ports ther > maintainer can just force it to use the latest GCC. Last time I checked the code in src/lib/msun was built by the default compiler into a library named libm. If clang can't produce valid floating point code, are you suggesting that the base should have two compilers one (ie gcc) for libm and any other application that may use floating point and one (ie clang) for everything else? > I'm not sure why Clang being default is somehow a problem for you? For one, I'm the guy that has been fixing and implementing missing functions in libm. I've already shown that clang generates worse code than base gcc for a single function in libm. http://lists.freebsd.org/pipermail/freebsd-current/2012-September/036410.html Granted j0f() in my libm had a local patch, but that local patch actual improves j0f() accuracy over the range tested! It can take hours (for a quick test) or days (for more exhaustive testing) to test a simple patch, because I do testing on i385, amd64, and sparc64 machines. So, now, I have to do the testing with 2 compilers. You'll find that I'm the person that showed that clang can't do complex arithmetic correctly. http://llvm.org/bugs/show_bug.cgi?id=8532 That bug was reported almost 2 years ago. Finally, I'll note that I never stated that having clang as the default would be a problem for me. I know enough about compilers and floating pointing to test a new compiler. It the naive users (and I can assure you there are many more naive users than you may believe) that is of concern. -- Steve