From owner-freebsd-toolchain@FreeBSD.ORG Mon Sep 10 21:12:18 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2DC5E1065670; Mon, 10 Sep 2012 21:12:18 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id B41B98FC0C; Mon, 10 Sep 2012 21:12:13 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8ALC7jn065894; Mon, 10 Sep 2012 16:12:07 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8ALC7LH065893; Mon, 10 Sep 2012 16:12:07 -0500 (CDT) (envelope-from brooks) Date: Mon, 10 Sep 2012 16:12:07 -0500 From: Brooks Davis To: current@freebsd.org Message-ID: <20120910211207.GC64920@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8vCeF2GUdMpe9ZbK" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toolchain@freebsd.org Subject: Clang as default compiler November 4th X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: toolchain@freebsd.org List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 21:12:18 -0000 --8vCeF2GUdMpe9ZbK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [Please confine your replies to toolchain@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 --8vCeF2GUdMpe9ZbK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQTlekXY6L6fI4GtQRAuwKAJ4/bCjiPFP2zZ3azflWrDv1xgwZlQCfeBVy E2GYj9wze230nn0uttWW1Ic= =ST1I -----END PGP SIGNATURE----- --8vCeF2GUdMpe9ZbK-- From owner-freebsd-toolchain@FreeBSD.ORG Mon Sep 10 21:28:36 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 D8CA41065672; Mon, 10 Sep 2012 21:28:36 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 8E72A8FC0A; Mon, 10 Sep 2012 21:28:36 +0000 (UTC) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.5/8.14.5/NETPLEX) with ESMTP id q8ALMbWQ027516; Mon, 10 Sep 2012 17:22:37 -0400 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.2.7 (mail.netplex.net [204.213.176.10]); Mon, 10 Sep 2012 17:22:37 -0400 (EDT) Date: Mon, 10 Sep 2012 17:22:37 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: toolchain@freebsd.org In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> Message-ID: References: <20120910211207.GC64920@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: 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 Reply-To: Daniel Eischen List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 21:28:37 -0000 On Mon, 10 Sep 2012, Brooks Davis wrote: > [Please confine your replies to toolchain@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. -- DE From owner-freebsd-toolchain@FreeBSD.ORG Mon Sep 10 21:57:01 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A817F106564A for ; Mon, 10 Sep 2012 21:57:01 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 0B0D08FC0C for ; Mon, 10 Sep 2012 21:56:56 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8ALuucH066139 for ; Mon, 10 Sep 2012 16:56:56 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8ALuucK066138 for toolchain@freebsd.org; Mon, 10 Sep 2012 16:56:56 -0500 (CDT) (envelope-from brooks) Date: Mon, 10 Sep 2012 16:56:56 -0500 From: Brooks Davis To: toolchain@freebsd.org Message-ID: <20120910215656.GD64920@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gneEPciiIl/aKvOT" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: improving bootstrapping of WITH_CLANG_IS_CC 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: Mon, 10 Sep 2012 21:57:01 -0000 --gneEPciiIl/aKvOT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Currently, when WITH_CLANG_IS_CC is set for the first time (/usr/bin/cc is gcc) you must also set CC=3Dclang, CXX=3Dclang++, and CPP=3Dclang-cpp. This is due to the fact that we currently hardcode knowledge of which compiler cc is and key if off of WITH_CLANG_IS_CC. Thus while building things required to build clang as a cross compiler we end up passing clang CFLAGS to gcc. I propose that we correct this by adding a new internal variable COMPILER_TYPE which indicates which compiler we are using. For now it just supports two values gcc and clang. Further refinement will be required as we add support for external toolchains. The following patch implements this feature. It allows me to complete "make -DWITH_CLANG_IS_CC buildworld" and "make -DWITH_CLANG_IS_CC installworld" on amd64 and survives a "make tinderbox". The core logic lives in the new bsd.compiler.mk which determines which type our compiler is from ${CC}. If ${CC} isn't a known compiler name it is run with --version and we attempt to determine it from there. To compensate for the fact that this is a) slow and b) the default case I have patched Makefile.inc1 to set COMPILER_TYPE appropriately in the environment of the submakes. In the stages leading up to cross build I rely on bsd.compiler.mk. For the world stage I rely on knowing what compiler will be built as a cross compiler. With these optimizations we end up with four extra invocations of ${CC} which should not be noticeable in practice. The rest of the patch replaces things like: =2Eif ${MK_CLANG_IS_CC} =3D=3D "no" && ${CC:T:Mclang} !=3D "clang" with things like: =2Eif ${COMPILER_TYPE} !=3D "clang" I'd like to commit this in the next few days unless there are objections requiring a major redesign. -- Brooks Index: share/mk/Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/Makefile (revision 240210) +++ share/mk/Makefile (working copy) @@ -3,7 +3,8 @@ =20 FILES=3D bsd.README FILES+=3D bsd.arch.inc.mk -FILES+=3D bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk +FILES+=3D bsd.compat.mk bsd.compiler.mk bsd.cpu.mk +FILES+=3D bsd.dep.mk bsd.doc.mk bsd.dtrace.mk FILES+=3D bsd.endian.mk FILES+=3D bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk FILES+=3D bsd.kmod.mk Index: share/mk/bsd.compiler.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/bsd.compiler.mk (revision 0) +++ share/mk/bsd.compiler.mk (working copy) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.if !defined(COMPILER_TYPE) +. if ${CC:T:Mgcc} =3D=3D "gcc" +COMPILER_TYPE:=3D gcc =20 +. elif ${CC:T:Mclang} =3D=3D "clang" +COMPILER_TYPE:=3D clang +. else +_COMPILER_VERSION !=3D ${CC} --version +. if ${_COMPILER_VERSION:Mgcc} =3D=3D "gcc" +COMPILER_TYPE:=3D gcc +. elif ${_COMPILER_VERSION:M\(GCC\)} =3D=3D "(GCC)" +COMPILER_TYPE:=3D gcc +. elif ${_COMPILER_VERSION:Mclang} =3D=3D "clang" +COMPILER_TYPE:=3D clang +. else +.error Unable to determing compiler type for ${CC} +. endif +. endif +.endif Index: share/mk/bsd.sys.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/bsd.sys.mk (revision 240210) +++ share/mk/bsd.sys.mk (working copy) @@ -8,6 +8,8 @@ =20 # for GCC: http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Warning-Options.h= tml =20 +.include + # the default is gnu99 for now CSTD?=3D gnu99 =20 @@ -28,8 +30,8 @@ .if defined(WARNS) .if ${WARNS} >=3D 1 CWARNFLAGS+=3D -Wsystem-headers -.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} =3D=3D "no" && \ - ${CC:T:Mclang} !=3D "clang") || !defined(NO_WERROR.clang)) +.if !defined(NO_WERROR) && (${COMPILER_TYPE} !=3D "clang" \ + || !defined(NO_WERROR.clang)) CWARNFLAGS+=3D -Werror .endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang) .endif # WARNS >=3D 1 @@ -43,8 +45,8 @@ .if ${WARNS} >=3D 4 CWARNFLAGS+=3D -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow\ -Wunused-parameter -.if !defined(NO_WCAST_ALIGN) && ((${MK_CLANG_IS_CC} =3D=3D "no" && \ - ${CC:T:Mclang} !=3D "clang") || !defined(NO_WCAST_ALIGN.clang)) +.if !defined(NO_WCAST_ALIGN) && (${COMPILER_TYPE} !=3D "clang" \ + || !defined(NO_WCAST_ALIGN.clang)) CWARNFLAGS+=3D -Wcast-align .endif # !NO_WCAST_ALIGN && (!CLANG || !NO_WCAST_ALIGN.clang) .endif # WARNS >=3D 4 @@ -61,8 +63,7 @@ CWARNFLAGS+=3D -Wno-pointer-sign # Clang has more warnings enabled by default, and when using -Wall, so if = WARNS # is set to low values, these have to be disabled explicitly. -.if (${MK_CLANG_IS_CC} !=3D "no" || ${CC:T:Mclang} =3D=3D "clang") && \ - !defined(EARLY_BUILD) +.if ${COMPILER_TYPE} =3D=3D "clang" && !defined(EARLY_BUILD) .if ${WARNS} <=3D 6 CWARNFLAGS+=3D -Wno-empty-body -Wno-string-plus-int .endif # WARNS <=3D 6 @@ -89,20 +90,18 @@ .if ${WFORMAT} > 0 #CWARNFLAGS+=3D -Wformat-nonliteral -Wformat-security -Wno-format-extra-ar= gs CWARNFLAGS+=3D -Wformat=3D2 -Wno-format-extra-args -.if (${MK_CLANG_IS_CC} !=3D "no" || ${CC:T:Mclang} =3D=3D "clang") && \ - !defined(EARLY_BUILD) +.if ${COMPILER_TYPE} =3D=3D "clang" && !defined(EARLY_BUILD) .if ${WARNS} <=3D 3 CWARNFLAGS+=3D -Wno-format-nonliteral .endif # WARNS <=3D 3 .endif # CLANG -.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} =3D=3D "no" && \ - ${CC:T:Mclang} !=3D "clang") || !defined(NO_WERROR.clang)) +.if !defined(NO_WERROR) && (${COMPILER_TYPE} !=3D "clang" \ + || !defined(NO_WERROR.clang)) CWARNFLAGS+=3D -Werror .endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang) .endif # WFORMAT > 0 .endif # WFORMAT -.if defined(NO_WFORMAT) || ((${MK_CLANG_IS_CC} !=3D "no" || \ - ${CC:T:Mclang} =3D=3D "clang") && defined(NO_WFORMAT.clang)) +.if defined(NO_WFORMAT) || (${COMPILER_TYPE} =3D=3D "clang" && defined(NO_= WFORMAT.clang)) CWARNFLAGS+=3D -Wno-format .endif # NO_WFORMAT || (CLANG && NO_WFORMAT.clang) .endif # !NO_WARNS @@ -111,8 +110,7 @@ CWARNFLAGS+=3D -Wno-unknown-pragmas .endif # IGNORE_PRAGMA =20 -.if (${MK_CLANG_IS_CC} !=3D "no" || ${CC:T:Mclang} =3D=3D "clang") && \ - !defined(EARLY_BUILD) +.if ${COMPILER_TYPE} =3D=3D "clang" && !defined(EARLY_BUILD) CLANG_NO_IAS=3D -no-integrated-as CLANG_OPT_SMALL=3D -mstack-alignment=3D8 -mllvm -inline-threshold=3D3\ -mllvm -enable-load-pre=3Dfalse -mllvm -simplifycfg-dup-ret Index: Makefile.inc1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile.inc1 (revision 240210) +++ Makefile.inc1 (working copy) @@ -46,6 +46,7 @@ =20 .include .include +.include =20 # We must do share/info early so that installation of info `dir' # entries works correctly. Do it first since it is less likely to @@ -235,7 +236,8 @@ PATH=3D${BPATH}:${PATH} \ WORLDTMP=3D${WORLDTMP} \ VERSION=3D"${VERSION}" \ - MAKEFLAGS=3D"-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" + MAKEFLAGS=3D"-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ + COMPILER_TYPE=3D${COMPILER_TYPE} BMAKE=3D MAKEOBJDIRPREFIX=3D${WORLDTMP} \ ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ DESTDIR=3D \ @@ -270,6 +272,16 @@ .if ${MK_CDDL} =3D=3D "no" WMAKEENV+=3D NO_CTF=3D1 .endif +.if ${CC:T:Mgcc} =3D=3D "gcc" +WMAKECOMPILER_TYPE=3D gcc +.elif ${CC:T:Mclang} =3D=3D "clang" +WMAKECOMPILER_TYPE=3D clang +.elif ${MK_CLANG_IS_CC} =3D=3D "no" +WMAKECOMPILER_TYPE=3D gcc +.else +WMAKECOMPILER_TYPE=3D clang +.endif +WMAKEENV+=3D COMPILER_TYPE=3D${WMAKE_COMPILER_TYPE} WMAKE=3D ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=3D${WORLDTMP} =20 .if ${TARGET_ARCH} =3D=3D "amd64" || ${TARGET_ARCH} =3D=3D "powerpc64" @@ -313,7 +325,8 @@ CC=3D"${CC} ${LIB32FLAGS}" \ CXX=3D"${CXX} ${LIB32FLAGS}" \ LIBDIR=3D/usr/lib32 \ - SHLIBDIR=3D/usr/lib32 + SHLIBDIR=3D/usr/lib32 \ + COMPILER_TYPE=3D${WMAKE_COMPILER_TYPE} =20 LIB32WMAKE=3D ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ Index: sys/conf/kmod.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/conf/kmod.mk (revision 240210) +++ sys/conf/kmod.mk (working copy) @@ -73,6 +73,7 @@ .endif =20 .include +.include =20 .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S =20 @@ -108,7 +109,7 @@ # for example. CFLAGS+=3D -I@/contrib/altq =20 -.if ${MK_CLANG_IS_CC} =3D=3D "no" && ${CC:T:Mclang} !=3D "clang" +.if ${COMPILER_TYPE} !=3D "clang" CFLAGS+=3D -finline-limit=3D${INLINE_LIMIT} CFLAGS+=3D --param inline-unit-growth=3D100 CFLAGS+=3D --param large-function-growth=3D1000 Index: sys/conf/kern.pre.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/conf/kern.pre.mk (revision 240210) +++ sys/conf/kern.pre.mk (working copy) @@ -4,6 +4,7 @@ # of the definitions that need to be before %BEFORE_DEPEND. =20 .include +.include =20 # backwards compat option for older systems. MACHINE_CPUARCH?=3D${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb= )?/arm/:C/powerpc64/powerpc/} @@ -34,7 +35,7 @@ .endif .endif .if ${MACHINE_CPUARCH} =3D=3D "amd64" -.if ${MK_CLANG_IS_CC} =3D=3D "no" && ${CC:T:Mclang} !=3D "clang" +.if ${COMPILER_TYPE} !=3D "clang" COPTFLAGS?=3D-O2 -frename-registers -pipe .else COPTFLAGS?=3D-O2 -pipe @@ -84,7 +85,7 @@ =20 CFLAGS=3D ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS} CFLAGS+=3D ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt= _global.h -.if ${MK_CLANG_IS_CC} =3D=3D "no" && ${CC:T:Mclang} !=3D "clang" +.if ${COMPILER_TYPE} !=3D "clang" CFLAGS+=3D -fno-common -finline-limit=3D${INLINE_LIMIT} .if ${MACHINE_CPUARCH} !=3D "mips" CFLAGS+=3D --param inline-unit-growth=3D100 @@ -101,7 +102,7 @@ # XXX LOCORE means "don't declare C stuff" not "for locore.s". ASM_CFLAGS=3D -x assembler-with-cpp -DLOCORE ${CFLAGS} =20 -.if ${MK_CLANG_IS_CC} !=3D "no" || ${CC:T:Mclang} =3D=3D "clang" +.if ${COMPILER_TYPE} =3D=3D "clang" CLANG_NO_IAS=3D -no-integrated-as .endif =20 Index: sys/conf/kern.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/conf/kern.mk (revision 240210) +++ sys/conf/kern.mk (working copy) @@ -15,7 +15,7 @@ # Disable a few warnings for clang, since there are several places in the # kernel where fixing them is more trouble than it is worth, or where ther= e is # a false positive. -.if ${MK_CLANG_IS_CC} !=3D "no" || ${CC:T:Mclang} =3D=3D "clang" +.if ${COMPILER_TYPE} =3D=3D "clang" NO_WCONSTANT_CONVERSION=3D -Wno-constant-conversion NO_WARRAY_BOUNDS=3D -Wno-array-bounds NO_WSHIFT_COUNT_NEGATIVE=3D -Wno-shift-count-negative @@ -52,7 +52,7 @@ # Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 an= d -mno-sse42 # .if ${MACHINE_CPUARCH} =3D=3D "i386" -.if ${MK_CLANG_IS_CC} =3D=3D "no" && ${CC:T:Mclang} !=3D "clang" +.if ${COMPILER_TYPE} !=3D "clang" CFLAGS+=3D -mno-align-long-strings -mpreferred-stack-boundary=3D2 .else CFLAGS+=3D -mno-aes -mno-avx @@ -100,7 +100,7 @@ # (-mfpmath=3D is not supported) # .if ${MACHINE_CPUARCH} =3D=3D "amd64" -.if ${MK_CLANG_IS_CC} !=3D "no" || ${CC:T:Mclang} =3D=3D "clang" +.if ${COMPILER_TYPE} =3D=3D "clang" CFLAGS+=3D -mno-aes -mno-avx .endif CFLAGS+=3D -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float \ --gneEPciiIl/aKvOT Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQTmInXY6L6fI4GtQRAvqnAJ9wJPBC4y/QfkeXMJva9zq6rigbFwCg1qJK eCldP9DrNR6kfV/atK08O/g= =lx3v -----END PGP SIGNATURE----- --gneEPciiIl/aKvOT-- From owner-freebsd-toolchain@FreeBSD.ORG Mon Sep 10 22:01:21 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 7A143106564A; Mon, 10 Sep 2012 22:01:21 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 296838FC0C; Mon, 10 Sep 2012 22:01:20 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8AM1JSq066192; Mon, 10 Sep 2012 17:01:19 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8AM1JpC066191; Mon, 10 Sep 2012 17:01:19 -0500 (CDT) (envelope-from brooks) Date: Mon, 10 Sep 2012 17:01:19 -0500 From: Brooks Davis To: Daniel Eischen Message-ID: <20120910220119.GE64920@lor.one-eyed-alien.net> References: <20120910211207.GC64920@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="APlYHCtpeOhspHkB" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toolchain@freebsd.org, 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: Mon, 10 Sep 2012 22:01:21 -0000 --APlYHCtpeOhspHkB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 10, 2012 at 05:22:37PM -0400, Daniel Eischen wrote: > On Mon, 10 Sep 2012, Brooks Davis wrote: >=20 > > [Please confine your replies to toolchain@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, a= nd > > 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. >=20 > I assume this will be done, tested and committed before 2012-11-04 > (or whenever the switchover date is). Pending review it will be done this week. > > * Ports compiler selection infrastructure is still under development. >=20 > This should be a prerequisite before making the switch, given > that ports will be broken without a work-around for building > them with gcc. We've defacto done that for more than a year. Some progress has resulted, but not enough. I will be helping fix ports and I hope others do as well. It's worth noting that a switchable compiler isn't a magic bullet. Many ports will need to be patched to support a compiler other than /usr/bin/cc or /usr/bin/gcc. -- Brooks --APlYHCtpeOhspHkB Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQTmMuXY6L6fI4GtQRApXSAJ4yCIdCPurc1KZi3MO3koiWtbwt8ACffsXR eYjBdhIqqhYgWTV7JXrSarY= =rLLO -----END PGP SIGNATURE----- --APlYHCtpeOhspHkB-- From owner-freebsd-toolchain@FreeBSD.ORG Mon Sep 10 22:35:08 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 38A871065675; Mon, 10 Sep 2012 22:35:08 +0000 (UTC) (envelope-from break19@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id C950F8FC08; Mon, 10 Sep 2012 22:35:07 +0000 (UTC) Received: by obbun3 with SMTP id un3so4846721obb.13 for ; Mon, 10 Sep 2012 15:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=A2TLPDKr3uqxwHQtPuLWIZyLV1tTolAbSIiQZS5nc60=; b=WZaJzbjz8WiMR0JoEbraEvz7wBbNvGUCHTeHz3iDsAUTPkKHvXmSkQABUTciv7YP5/ ygb0PJ0HYoalFbm2aCfEAx4dt/dOwXRliInUHZIqs27a9A3iHYjlt4GNz2UQunMJV23W FMx0pqTJukNoeuHxtOy1R3yuLT8Lz7WiiyNMi+0Ep0XP9sjJukckmyH5jtoWGGzcAhQw OW90UTy+POL3SE+TWrrtYlcflALn8SESCHKBwfOFOuBmbsvkVhLuh/JLX7MI7x9V6tgi oZ05Bm9XY83Sw4sy2jiclMkK45HuYPE3qDPObVK2v8+NXvV2T6CMdF8kaQdTjhjG7GTC u1jQ== MIME-Version: 1.0 Received: by 10.60.13.104 with SMTP id g8mr15670305oec.82.1347316507007; Mon, 10 Sep 2012 15:35:07 -0700 (PDT) Received: by 10.76.2.202 with HTTP; Mon, 10 Sep 2012 15:35:06 -0700 (PDT) In-Reply-To: <20120910220119.GE64920@lor.one-eyed-alien.net> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120910220119.GE64920@lor.one-eyed-alien.net> Date: Mon, 10 Sep 2012 17:35:06 -0500 Message-ID: From: Chuck Burns To: Brooks Davis Content-Type: text/plain; charset=ISO-8859-1 Cc: Daniel Eischen , toolchain@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: Mon, 10 Sep 2012 22:35:08 -0000 On Mon, Sep 10, 2012 at 5:01 PM, Brooks Davis wrote: > On Mon, Sep 10, 2012 at 05:22:37PM -0400, Daniel Eischen wrote: >> On Mon, 10 Sep 2012, Brooks Davis wrote: >> >> > [Please confine your replies to toolchain@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). > > Pending review it will be done this week. > >> > * 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. > > We've defacto done that for more than a year. Some progress has > resulted, but not enough. I will be helping fix ports and I hope others > do as well. It's worth noting that a switchable compiler isn't a magic > bullet. Many ports will need to be patched to support a compiler other > than /usr/bin/cc or /usr/bin/gcc. > > -- Brooks This is actually a pretty good thing. Because -before- it's the default compiler, some ports maintainers (and even more upstreams) have the attitude of "My port works fine" until it no longer does.. bringing this change will make a few of these people realize that we are -serious- about switching to clang. For those worrying about "zomg, my system wont work?!" Remember.. This is a -current thing. If you're running bleeding edge, you have to expect to get cut every now and then. -- Chuck Burns From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 02:31:10 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 9B65E106564A; Tue, 11 Sep 2012 02:31:10 +0000 (UTC) (envelope-from sendtomatt@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 21A558FC1A; Tue, 11 Sep 2012 02:31:09 +0000 (UTC) Received: by oagm1 with SMTP id m1so7695oag.13 for ; Mon, 10 Sep 2012 19:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=BjDNhKJ0szsLmL8arlC/7aQM+8WmV0Un/WYqK0JQVPI=; b=JUfyNJexkFSbYPAZnxQ7qwFQotfE9f8kaYCLM1G8E1AzuNoDBByzwz8cafo71f0Dhu ZJS18BVHRozduBcJBprdcbAoTBeHGpfbq71Aw+KxATYw4b/PGKPdXBbg8n+X5GC+VZbl JVMHH9YF2sM7La4sbvve/S9YwJeEIU3LZEYspbZQmUAyl17ETHboskKhWPClcjPR/HBT czjJmMurtgkvZ9vyRUluFhPO8PJx8MqnZYRIVz5rijNsrvRWqzA3qvmtEYc1pdnly2Rj PEXNwQAhcHrT6FNffK860an5l+Cyg4ZPJ18ewyZbQzLFeRtiTi5KpkMoN8pe+UX65XrV YJig== Received: by 10.182.212.98 with SMTP id nj2mr16230252obc.18.1347330669288; Mon, 10 Sep 2012 19:31:09 -0700 (PDT) Received: from flatline.local (70-36-223-239.dsl.dynamic.sonic.net. [70.36.223.239]) by mx.google.com with ESMTPS id n8sm11829911oec.5.2012.09.10.19.31.06 (version=SSLv3 cipher=OTHER); Mon, 10 Sep 2012 19:31:08 -0700 (PDT) Message-ID: <504EA266.4060602@gmail.com> Date: Mon, 10 Sep 2012 19:31:02 -0700 From: matt User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120902 Thunderbird/15.0 MIME-Version: 1.0 To: Daniel Eischen References: <20120910211207.GC64920@lor.one-eyed-alien.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org, toolchain@freebsd.org, 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 02:31:10 -0000 On 09/10/12 14:22, Daniel Eischen wrote: > On Mon, 10 Sep 2012, Brooks Davis wrote: > >> [Please confine your replies to toolchain@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 From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 05:54:05 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 2186A106564A; Tue, 11 Sep 2012 05:54:05 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from opti.dougb.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id D0F7714DBA0; Tue, 11 Sep 2012 05:54:04 +0000 (UTC) Message-ID: <504ED1FC.3090608@FreeBSD.org> Date: Mon, 10 Sep 2012 22:54:04 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120907 Thunderbird/15.0 MIME-Version: 1.0 To: toolchain@freebsd.org References: <20120910211207.GC64920@lor.one-eyed-alien.net> In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> X-Enigmail-Version: 1.4.4 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: current@freebsd.org, freebsd-ports@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 05:54:05 -0000 -----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 toolchain@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----- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 07:58:39 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 8959E106564A; Tue, 11 Sep 2012 07:58:39 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 1EF5F8FC15; Tue, 11 Sep 2012 07:58:35 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cmbg15-2-0-cust445.5-4.cable.virginmedia.com [86.26.13.190]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q8B7wSDj019847 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 11 Sep 2012 07:58:29 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> Date: Tue, 11 Sep 2012 08:58:23 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <004BADDB-E79D-4497-89EE-641F0359E9BE@FreeBSD.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> To: toolchain@FreeBSD.org X-Mailer: Apple Mail (2.1278) Cc: 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 07:58:39 -0000 I'd add one more thing that needs fixing: Clang should default to c89 mode when invoked as cc. I had a patch to = do this, but I seem to have misplaced it. I'll try to find or rewrite = it in the next couple of days. =20 A lot of the ports failures I saw were due to ports using cc as the = default C compiler (autoconf seems to select it) and then using GNU89 = inlining rules, so that they died with linker failures. Given that = POSIX deprecated cc in 1997, I'm quite tempted to say that we should = just remove it entirely and just have c89, c99 and c11 (which the spec = for cc says you should use instead), forcing people to explicitly select = their language dialect, but that's a bikeshed for another day. David On 10 Sep 2012, at 22:12, Brooks Davis wrote: > [Please confine your replies to toolchain@freebsd.org to keep the = thread > on the most relevant list.] >=20 > 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. >=20 > What does the mean to you? >=20 > * When you build world after the default is changed /usr/bin/cc, cpp, = and > c++ will be links to clang. >=20 > * This means the initial phase of buildworld and "old style" kernel > compilation will use clang instead of gcc. This is known to work. >=20 > * 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 >=20 > What issues remain? >=20 > * 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. >=20 > * Ports compiler selection infrastructure is still under development. >=20 > * Some ports could build with clang with appropriate tweaks. >=20 > What can you do to help? >=20 > * Switch (some of) your systems. Early adoption can help us find = bugs. >=20 > * 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. >=20 > tl;dr: Clang will become the default compiler for x86 architectures on = 2012-11-04 >=20 > -- Brooks From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 08:18:58 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 834BB106564A; Tue, 11 Sep 2012 08:18:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3B2BD8FC1F; Tue, 11 Sep 2012 08:18:57 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:897e:8083:4c98:946f] (unknown [IPv6:2001:7b8:3a7:0:897e:8083:4c98:946f]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id DA96D5C37; Tue, 11 Sep 2012 10:18:50 +0200 (CEST) Message-ID: <504EF3ED.7050502@FreeBSD.org> Date: Tue, 11 Sep 2012 10:18:53 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: David Chisnall References: <20120910211207.GC64920@lor.one-eyed-alien.net> <004BADDB-E79D-4497-89EE-641F0359E9BE@FreeBSD.org> In-Reply-To: <004BADDB-E79D-4497-89EE-641F0359E9BE@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: toolchain@FreeBSD.org, 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 08:18:58 -0000 On 2012-09-11 09:58, David Chisnall wrote: > Clang should default to c89 mode when invoked as cc. I had a patch to do this, but I seem to have misplaced it. I'll try to find or rewrite it in the next couple of days. > > A lot of the ports failures I saw were due to ports using cc as the default C compiler (autoconf seems to select it) and then using GNU89 inlining rules, so that they died with linker failures. Yes, this happens a lot, even with relatively new software. Though I don't see why we couldn't just add -std=gnu89 by default in bsd.port.mk, if no CSTD= setting is specified. This should work for any version of clang, or any other compilers that don't default to gnu89. So I am a bit reluctant to change clang's default standard to c89, unless clang upstream agrees with this. In the interest of prodding people to update their software, I would rather have the default stay c99, personally. :) > Given that POSIX deprecated cc in 1997, I'm quite tempted to say that we should just remove it entirely and just have c89, c99 and c11 (which the spec for cc says you should use instead), forcing people to explicitly select their language dialect, but that's a bikeshed for another day. I think that is a little bit overkill. People who don't care about standards anyway, will not go through the trouble of setting CC carefully to 'c89', 'c99' or 'c11'. Most of their software simply hardcodes "gcc", and must be fixed manually after all. From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 09:07:12 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 1E13B106566C; Tue, 11 Sep 2012 09:07:12 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id DE7A58FC16; Tue, 11 Sep 2012 09:07:11 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q8B97AX6020121 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 11 Sep 2012 09:07:10 GMT (envelope-from theraven@freebsd.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: <504EF3ED.7050502@FreeBSD.org> Date: Tue, 11 Sep 2012 10:07:04 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120910211207.GC64920@lor.one-eyed-alien.net> <004BADDB-E79D-4497-89EE-641F0359E9BE@FreeBSD.org> <504EF3ED.7050502@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.1278) Cc: toolchain@freebsd.org, 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 09:07:12 -0000 On 11 Sep 2012, at 09:18, Dimitry Andric wrote: > So I am a bit reluctant to change clang's default standard to c89, > unless clang upstream agrees with this. In the interest of prodding > people to update their software, I would rather have the default stay > c99, personally. :) I'm not proposing changing the default when invoked as clang. When = invoked as clang or clang++, the default remains the same: the latest = version of the standard (which will be C11 and C++11 in clang 3.2). I = am proposing changing the default to be C89 when invoked as cc or c89. Clang upstream is happy with this (I asked on the mailing list at = BSDCan, I just never got around to committing the change) and it also = fixes another bug: clang is always in C99 mode, even when invoked as c89 = or c11. >> Given that POSIX deprecated cc in 1997, I'm quite tempted to say that = we should just remove it entirely and just have c89, c99 and c11 (which = the spec for cc says you should use instead), forcing people to = explicitly select their language dialect, but that's a bikeshed for = another day. >=20 > I think that is a little bit overkill. People who don't care about > standards anyway, will not go through the trouble of setting CC > carefully to 'c89', 'c99' or 'c11'. Most of their software simply > hardcodes "gcc", and must be fixed manually after all. There is some logic in the clang driver already for knowing when it is = invoked as gcc. I'd be quite tempted to make gcc a symlink to clang and = make clang default to gnu89 when invoked in that way. David= From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 09:27:53 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0B2DE106566C; Tue, 11 Sep 2012 09:27:53 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [217.69.76.211]) by mx1.freebsd.org (Postfix) with ESMTP id B2A308FC16; Tue, 11 Sep 2012 09:27:52 +0000 (UTC) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id 371196A6001; Tue, 11 Sep 2012 11:27:51 +0200 (CEST) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.5/8.14.5) with ESMTP id q8B9Rpqg006016; Tue, 11 Sep 2012 11:27:51 +0200 (CEST) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.5/8.14.5/Submit) id q8B9RoXj004689; Tue, 11 Sep 2012 11:27:50 +0200 (CEST) (envelope-from lars) Date: Tue, 11 Sep 2012 11:27:50 +0200 From: Lars Engels To: Doug Barton Message-ID: <20120911092750.GF20762@e-new.0x20.net> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <504ED1FC.3090608@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SxSZg4s9qMTG5wS5" Content-Disposition: inline In-Reply-To: <504ED1FC.3090608@FreeBSD.org> X-Editor: VIM - Vi IMproved 7.3 X-Operation-System: FreeBSD 8.3-RELEASE-p2 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toolchain@FreeBSD.org, Brooks Davis , current@FreeBSD.org, freebsd-ports@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 09:27:53 -0000 --SxSZg4s9qMTG5wS5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. >=20 > 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. >=20 > 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. --SxSZg4s9qMTG5wS5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBPBBYACgkQKc512sD3afjTugCgsB791kAflPBiDqCaYID16NfB ScAAn2MVLDX5mneZBCfUM6Twcv+LjddO =LJGW -----END PGP SIGNATURE----- --SxSZg4s9qMTG5wS5-- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 09:44:08 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 5E4361065670; Tue, 11 Sep 2012 09:44:08 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id ECE0314E266; Tue, 11 Sep 2012 09:44:03 +0000 (UTC) Message-ID: <504F07E3.4010004@FreeBSD.org> Date: Tue, 11 Sep 2012 02:44:03 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Lars Engels References: <20120910211207.GC64920@lor.one-eyed-alien.net> <504ED1FC.3090608@FreeBSD.org> <20120911092750.GF20762@e-new.0x20.net> In-Reply-To: <20120911092750.GF20762@e-new.0x20.net> X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: toolchain@FreeBSD.org, Brooks Davis , current@FreeBSD.org, freebsd-ports@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 09:44:08 -0000 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 From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 10:45:26 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AF58E106564A; Tue, 11 Sep 2012 10:45:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 46BD58FC18; Tue, 11 Sep 2012 10:45:25 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8BAjUNh030634; Tue, 11 Sep 2012 13:45:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8BAjIP9082076; Tue, 11 Sep 2012 13:45:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8BAjI7r082071; Tue, 11 Sep 2012 13:45:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 11 Sep 2012 13:45:18 +0300 From: Konstantin Belousov To: toolchain@freebsd.org Message-ID: <20120911104518.GF37286@deviant.kiev.zoral.com.ua> References: <20120910211207.GC64920@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eDB11BtaWSyaBkpc" Content-Disposition: inline In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: 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 10:45:26 -0000 --eDB11BtaWSyaBkpc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 10, 2012 at 04:12:07PM -0500, Brooks Davis wrote: > [Please confine your replies to toolchain@freebsd.org to keep the thread > on the most relevant list.] I do not see how removing current@ can be done, toolchain@ is not relevant for this discussion. Proposed is not a local change in the toolchain itself, but a far reaching and IMO premature change. >=20 > 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. >=20 > What does the mean to you? >=20 > * When you build world after the default is changed /usr/bin/cc, cpp, and > c++ will be links to clang. >=20 > * This means the initial phase of buildworld and "old style" kernel > compilation will use clang instead of gcc. This is known to work. >=20 > * 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 >=20 > What issues remain? >=20 > * 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. >=20 > * Ports compiler selection infrastructure is still under development. >=20 > * Some ports could build with clang with appropriate tweaks. >=20 > What can you do to help? >=20 > * Switch (some of) your systems. Early adoption can help us find bugs. >=20 > * 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. >=20 > tl;dr: Clang will become the default compiler for x86 architectures on 20= 12-11-04 There was a chorus of voices talking about ports already. My POV is that suggesting to 'fix remaining ports to work with clang' is just a nonsense. You are proposing to fork the development of all the programs which do not compile with clang. Often, upstream developers do not care about clang at all since it not being default compiler in Debian/Fedora/Whatever Linux. The project simply do not have resources to maintain the fork of 20K programs. Looking from less amiable angle, you propose to knowingly break significant and important piece of the project work. My belief is that switch cannot be done before ports switch to the port-provided compiler. Another issue with the switch, which seems to be not only not addressed, but even not talked about, is the performance impact of the change. I do not remember any measurements, whatever silly they could be, of the performance change by the compiler switch. We often have serious and argumented push-back for kernel changes that give as low as 2-3% of the speed hit. What are the numbers for clang change, any numbers ? And, some small but annoying things left with clang, like ABI change requiring 16-byte stack alignment on i386, but lets ignore this until two big issues are resolved. --eDB11BtaWSyaBkpc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBPFj4ACgkQC3+MBN1Mb4gHAwCdHH6VZPlaLd/CRrpjRakb62MQ BWcAoK5mKbi5W3u6ctJFN/AZx/8pRWII =pgIm -----END PGP SIGNATURE----- --eDB11BtaWSyaBkpc-- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 12:06:58 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 677E9106564A; Tue, 11 Sep 2012 12:06:58 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 2911D8FC0C; Tue, 11 Sep 2012 12:06:57 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 5D93C7F38CA; Tue, 11 Sep 2012 14:06:49 +0200 (CEST) Date: Tue, 11 Sep 2012 14:06:49 +0200 From: Roman Divacky To: toolchain@freebsd.org, current@freebsd.org Message-ID: <20120911120649.GA52235@freebsd.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120911104518.GF37286@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 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 12:06:58 -0000 > > tl;dr: Clang will become the default compiler for x86 architectures on 2012-11-04 > > There was a chorus of voices talking about ports already. My POV > is that suggesting to 'fix remaining ports to work with clang' is > just a nonsense. You are proposing to fork the development of all the > programs which do not compile with clang. Often, upstream developers > do not care about clang at all since it not being default compiler in > Debian/Fedora/Whatever Linux. The project simply do not have resources > to maintain the fork of 20K programs. We currently dont compile 4680 ports (out of 23857). Top 10 ports that prevent the most other ports from compiling together prevent 2222 ports from compilation. So if we fixed those 10 ports we could be at around 2500 ports not compiling. Thats quite far from your claim of forking 20k programs. > Looking from less amiable angle, you propose to knowingly break significant > and important piece of the project work. My belief is that switch cannot > be done before ports switch to the port-provided compiler. I believe majority of the broken ports is broken because their maintainer never saw them being broken with clang just because it's not the default compiler. Thus by making it the default majority of the problems would just go away. Note that the work needed to make ports compiling with clang is largely shared with the work to make them compiliable with newer GCCs (as they are stricter etc.) > Another issue with the switch, which seems to be not only not addressed, > but even not talked about, is the performance impact of the change. I > do not remember any measurements, whatever silly they could be, of the > performance change by the compiler switch. We often have serious and > argumented push-back for kernel changes that give as low as 2-3% of > the speed hit. What are the numbers for clang change, any numbers ? Agreed. We should provide numbers. At least how buildworld times change with clang compiled kernel/workd and gcc compiler kernel/world. > And, some small but annoying things left with clang, like ABI change > requiring 16-byte stack alignment on i386, but lets ignore this until > two big issues are resolved. Thank you for pointing this out. This is, in my opinion, one of the strongest reasons to switch to clang. We can go, fix issues or report we find upstream and then import newer clang. Unlike with gcc. Thank you, Roman From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 12:21:30 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 91530106566B; Tue, 11 Sep 2012 12:21:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 28BCC8FC12; Tue, 11 Sep 2012 12:21:29 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8BCLYaq042941; Tue, 11 Sep 2012 15:21:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8BCLMJD003903; Tue, 11 Sep 2012 15:21:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8BCLMvu003902; Tue, 11 Sep 2012 15:21:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 11 Sep 2012 15:21:22 +0300 From: Konstantin Belousov To: Roman Divacky Message-ID: <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lYetfuAxy9ic4HK3" Content-Disposition: inline In-Reply-To: <20120911120649.GA52235@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: toolchain@freebsd.org, 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 12:21:30 -0000 --lYetfuAxy9ic4HK3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 11, 2012 at 02:06:49PM +0200, Roman Divacky wrote: > > > tl;dr: Clang will become the default compiler for x86 architectures o= n 2012-11-04 > >=20 > > There was a chorus of voices talking about ports already. My POV > > is that suggesting to 'fix remaining ports to work with clang' is > > just a nonsense. You are proposing to fork the development of all the > > programs which do not compile with clang. Often, upstream developers > > do not care about clang at all since it not being default compiler in > > Debian/Fedora/Whatever Linux. The project simply do not have resources > > to maintain the fork of 20K programs. > =20 > We currently dont compile 4680 ports (out of 23857). Top 10 ports that pr= event > the most other ports from compiling together prevent 2222 ports from > compilation. So if we fixed those 10 ports we could be at around 2500 por= ts > not compiling. Thats quite far from your claim of forking 20k programs. Sorry, I cannot buy the argument. How many patches there are already in the ports tree to cope with clang incompatibility with gcc ? You may declare that all of them are application bugs, but it completely misses the point. >=20 > > Looking from less amiable angle, you propose to knowingly break signifi= cant > > and important piece of the project work. My belief is that switch cannot > > be done before ports switch to the port-provided compiler. > =20 > I believe majority of the broken ports is broken because their maintainer > never saw them being broken with clang just because it's not the default > compiler. Thus by making it the default majority of the problems would ju= st > go away. Can you, please, read what I wrote ? Fixing _ports_ to compile with clang is plain wrong. Upstream developers use gcc almost always for development and testing. Establishing another constant cost on the porting work puts burden on the ports submitters, maintainers and even ports users. I do strongly oppose the attempt to drain the freebsd resources by forcing porters to port third-party code to other compiler. >=20 > Note that the work needed to make ports compiling with clang is largely s= hared > with the work to make them compiliable with newer GCCs (as they are stric= ter > etc.) >=20 > > Another issue with the switch, which seems to be not only not addressed, > > but even not talked about, is the performance impact of the change. I > > do not remember any measurements, whatever silly they could be, of the > > performance change by the compiler switch. We often have serious and > > argumented push-back for kernel changes that give as low as 2-3% of > > the speed hit. What are the numbers for clang change, any numbers ? >=20 > Agreed. We should provide numbers. At least how buildworld times change > with clang compiled kernel/workd and gcc compiler kernel/world. For this 'silly' benchmark, I would suggest to benchmark the identical buildworlds with only different kernels, compiled with in-tree gcc and clang. >=20 > > And, some small but annoying things left with clang, like ABI change > > requiring 16-byte stack alignment on i386, but lets ignore this until > > two big issues are resolved. >=20 > Thank you for pointing this out. This is, in my opinion, one of the stron= gest > reasons to switch to clang. We can go, fix issues or report we find upstr= eam > and then import newer clang. Unlike with gcc. We do not want to hunt for the compiler bugs at all, goal of FreeBSD is to develop the OS and not a compiler. --lYetfuAxy9ic4HK3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBPLMIACgkQC3+MBN1Mb4igOQCeKrtDri/g8Cxnlsm4JUdb++Sx I9cAoJ3jv6OTuz3VvlMxLC1mtKjUzwGQ =fhTx -----END PGP SIGNATURE----- --lYetfuAxy9ic4HK3-- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 12:38:36 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 4ADE7106564A; Tue, 11 Sep 2012 12:38:36 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id C8E208FC12; Tue, 11 Sep 2012 12:38:35 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 16FF07F38CA; Tue, 11 Sep 2012 14:38:33 +0200 (CEST) Date: Tue, 11 Sep 2012 14:38:33 +0200 From: Roman Divacky To: toolchain@freebsd.org, current@freebsd.org Message-ID: <20120911123833.GA54483@freebsd.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: 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 12:38:36 -0000 On Tue, Sep 11, 2012 at 03:21:22PM +0300, Konstantin Belousov wrote: > On Tue, Sep 11, 2012 at 02:06:49PM +0200, Roman Divacky wrote: > > > > tl;dr: Clang will become the default compiler for x86 architectures on 2012-11-04 > > > > > > There was a chorus of voices talking about ports already. My POV > > > is that suggesting to 'fix remaining ports to work with clang' is > > > just a nonsense. You are proposing to fork the development of all the > > > programs which do not compile with clang. Often, upstream developers > > > do not care about clang at all since it not being default compiler in > > > Debian/Fedora/Whatever Linux. The project simply do not have resources > > > to maintain the fork of 20K programs. > > > > We currently dont compile 4680 ports (out of 23857). Top 10 ports that prevent > > the most other ports from compiling together prevent 2222 ports from > > compilation. So if we fixed those 10 ports we could be at around 2500 ports > > not compiling. Thats quite far from your claim of forking 20k programs. > Sorry, I cannot buy the argument. How many patches there are already > in the ports tree to cope with clang incompatibility with gcc ? You may > declare that all of them are application bugs, but it completely misses > the point. > > > > > > Looking from less amiable angle, you propose to knowingly break significant > > > and important piece of the project work. My belief is that switch cannot > > > be done before ports switch to the port-provided compiler. > > > > I believe majority of the broken ports is broken because their maintainer > > never saw them being broken with clang just because it's not the default > > compiler. Thus by making it the default majority of the problems would just > > go away. > Can you, please, read what I wrote ? Fixing _ports_ to compile with > clang is plain wrong. Upstream developers use gcc almost always for > development and testing. Establishing another constant cost on the > porting work puts burden on the ports submitters, maintainers and even > ports users. Upstream developers almost never use gcc4.2.1 as we do. So right now the ports maintainer must check whats wrong in the case the (upgraded) port doesnt compile with our in-tree gcc. It can be trivial USE_GCC=4.something but the burden is exactly the same as with clang. > I do strongly oppose the attempt to drain the freebsd resources by > forcing porters to port third-party code to other compiler. We dont force anyone. Any port maintainer can decide to USE_GCC=4.2. We are not advocating removing gcc but making clang default. The possibility of fallback to gcc is still there. > > > And, some small but annoying things left with clang, like ABI change > > > requiring 16-byte stack alignment on i386, but lets ignore this until > > > two big issues are resolved. > > > > Thank you for pointing this out. This is, in my opinion, one of the strongest > > reasons to switch to clang. We can go, fix issues or report we find upstream > > and then import newer clang. Unlike with gcc. > > We do not want to hunt for the compiler bugs at all, goal of FreeBSD > is to develop the OS and not a compiler. By the nature of "developing the OS" we are forced to use compilers and toolchains. Recently I saw you submitting/committing patches with .byte sequences because our default assembler cant handle the instructions. I saw jhb@ updating binutils to support invept/invvpid. In my eyes, switching to clang by default lowers the compiler/toolchain maintenance burden we have. Thank you, Roman. From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 13:01:17 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 030AE1065677; Tue, 11 Sep 2012 13:01:17 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp3.one.com (csmtp3.one.com [91.198.169.23]) by mx1.freebsd.org (Postfix) with ESMTP id B60BF8FC19; Tue, 11 Sep 2012 13:01:16 +0000 (UTC) Received: from [192.168.1.41] (unknown [176.222.238.90]) by csmtp3.one.com (Postfix) with ESMTPA id 571002413F04; Tue, 11 Sep 2012 12:52:21 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: Erik Cederstrand In-Reply-To: <20120911123833.GA54483@freebsd.org> Date: Tue, 11 Sep 2012 14:52:20 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> To: Roman Divacky X-Mailer: Apple Mail (2.1486) Cc: toolchain@freebsd.org, 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 13:01:17 -0000 Roman, Den 11/09/2012 kl. 14.38 skrev Roman Divacky : >=20 > Upstream developers almost never use gcc4.2.1 as we do. So right now = the > ports maintainer must check whats wrong in the case the (upgraded) = port > doesnt compile with our in-tree gcc. >=20 >=20 > It can be trivial USE_GCC=3D4.something but the burden is exactly the = same > as with clang. So can we do a sweep on the ports tree and mark the 2232 ports with = USE_GCC=3D4.2 until they can actually build with clang? This could allow = the clang switch to proceed. Hopefully, waiting for GCC to compile just = to install some tiny port will be enough of a nuisance for people to = eventually fix the remaining ports. > By the nature of "developing the OS" we are forced to use compilers = and > toolchains. Recently I saw you submitting/committing patches with = .byte > sequences because our default assembler cant handle the instructions. > I saw jhb@ updating binutils to support invept/invvpid. >=20 > In my eyes, switching to clang by default lowers the = compiler/toolchain > maintenance burden we have. I agree. Switching away from abandonware to a compiler that is actively = maintained is a good thing. Regarding performance, I could do some benchmarking in my spare time, = but it does seem like an unforgiving task. Anyone posting any benchmark = numbers on these lists is going to be tarred, feathered, forced to print = out the full GCC 4.2.1 source code, read it out loud on the town square, = and spend the next month addressing concerns from people not willing to = do the work themselves :-) Erik= From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 13:24:17 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C53B106564A; Tue, 11 Sep 2012 13:24:17 +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 3E7618FC08; Tue, 11 Sep 2012 13:24:17 +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 q8BDOA3p087209; Tue, 11 Sep 2012 06:24:10 -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 q8BDOATC087208; Tue, 11 Sep 2012 06:24:10 -0700 (PDT) (envelope-from sgk) Date: Tue, 11 Sep 2012 06:24:10 -0700 From: Steve Kargl To: Roman Divacky Message-ID: <20120911132410.GA87126@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120911120649.GA52235@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: toolchain@freebsd.org, 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 13:24:17 -0000 On Tue, Sep 11, 2012 at 02:06:49PM +0200, Roman Divacky wrote: > > > tl;dr: Clang will become the default compiler for x86 architectures on 2012-11-04 > > > Another issue with the switch, which seems to be not only not addressed, > > but even not talked about, is the performance impact of the change. I > > do not remember any measurements, whatever silly they could be, of the > > performance change by the compiler switch. We often have serious and > > argumented push-back for kernel changes that give as low as 2-3% of > > the speed hit. What are the numbers for clang change, any numbers ? > > Agreed. We should provide numbers. At least how buildworld times change > with clang compiled kernel/workd and gcc compiler kernel/world. How fast clang builds world in comparison to gcc is irrelevant. What is important is whether software built with clang functions correctly. See for example, http://math-atlas.sourceforge.net/errata.html#WhatComp Has anyone run Spec CPU2006 on i386 and amd64 FreeBSD? -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 13:32:20 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 6492C106566B; Tue, 11 Sep 2012 13:32:20 +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 23C5E8FC08; Tue, 11 Sep 2012 13:32:20 +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 q8BDWFnU087268; Tue, 11 Sep 2012 06:32:15 -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 q8BDWFbi087267; Tue, 11 Sep 2012 06:32:15 -0700 (PDT) (envelope-from sgk) Date: Tue, 11 Sep 2012 06:32:15 -0700 From: Steve Kargl To: Erik Cederstrand Message-ID: <20120911133215.GB87126@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> User-Agent: Mutt/1.4.2.3i Cc: toolchain@freebsd.org, 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 13:32:20 -0000 On Tue, Sep 11, 2012 at 02:52:20PM +0200, Erik Cederstrand wrote: > Den 11/09/2012 kl. 14.38 skrev Roman Divacky : > > By the nature of "developing the OS" we are forced to use compilers and > > toolchains. Recently I saw you submitting/committing patches with .byte > > sequences because our default assembler cant handle the instructions. > > I saw jhb@ updating binutils to support invept/invvpid. > > > > In my eyes, switching to clang by default lowers the compiler/toolchain > > maintenance burden we have. > > I agree. Switching away from abandonware to a compiler that > is actively maintained is a good thing. Interest twist of history. GCC is not abandonware. I can assure you GCC development is very much alive. The abandonment of GCC was a FreeBSD developers/community decision. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 13:45:09 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 2B0211065741; Tue, 11 Sep 2012 13:45:09 +0000 (UTC) (envelope-from christer.solskogen@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id C466A8FC15; Tue, 11 Sep 2012 13:45:08 +0000 (UTC) Received: by iayy25 with SMTP id y25so499032iay.13 for ; Tue, 11 Sep 2012 06:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=/a9M4bWC6TRIAIVjHKxD1vhCjWB/qrcnRGNNgdW0mSw=; b=qww/amKc7lUrFFMgCQHEQW2AQKq1hX7yq7Q1YNKuqQxGJNzTXLj5fy4SfLgKwk7iV1 HB3CHYDs7KoJv+tpCE6YmaTt4ppAMZ2LR/q6a+PlJYxe1XwJMunHhIpW0yOLwxIeR3hq 8bJ/63+GLrBzzYV/ieTVHkaik/hDEsFgQQJ7Y4fYiHElhLcyOiBzsCwNmVb3uHXQ1uVn vYF1p23E/SskQOfIj5wj2lixBEUWfbQGXQgignELNBG94Gt8h7fruJzCT812cqBnOMOF FdBJhNXpHiUnWFaZ/u+ncO8RlTVVX8GeINudynqwTquqT+aMcxJ0JztLvRP/4a1Q/W+X ecDQ== Received: by 10.50.85.134 with SMTP id h6mr16016977igz.2.1347371108032; Tue, 11 Sep 2012 06:45:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.103.103 with HTTP; Tue, 11 Sep 2012 06:44:46 -0700 (PDT) In-Reply-To: <20120911133215.GB87126@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <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> From: Christer Solskogen Date: Tue, 11 Sep 2012 15:44:46 +0200 Message-ID: To: Steve Kargl Content-Type: text/plain; charset=UTF-8 Cc: toolchain@freebsd.org, 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 13:45:09 -0000 On Tue, Sep 11, 2012 at 3:32 PM, Steve Kargl wrote: > Interest twist of history. GCC is not abandonware. Correct, but GCC 4.2.1 is. -- chs, From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 14:08:27 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 EDEEB106566C; Tue, 11 Sep 2012 14:08:26 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 48CF48FC0A; Tue, 11 Sep 2012 14:08:26 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8BE8PMu073737; Tue, 11 Sep 2012 09:08:25 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8BE8P1F073736; Tue, 11 Sep 2012 09:08:25 -0500 (CDT) (envelope-from brooks) Date: Tue, 11 Sep 2012 09:08:25 -0500 From: Brooks Davis To: Konstantin Belousov Message-ID: <20120911140825.GA73518@lor.one-eyed-alien.net> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FL5UXtIhxfXey3p5" Content-Disposition: inline In-Reply-To: <20120911104518.GF37286@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toolchain@freebsd.org, 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 14:08:27 -0000 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 11, 2012 at 01:45:18PM +0300, Konstantin Belousov wrote: > On Mon, Sep 10, 2012 at 04:12:07PM -0500, Brooks Davis wrote: > > 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. > >=20 > > What does the mean to you? > >=20 > > * When you build world after the default is changed /usr/bin/cc, cpp, = and > > c++ will be links to clang. > >=20 > > * This means the initial phase of buildworld and "old style" kernel > > compilation will use clang instead of gcc. This is known to work. > >=20 > > * 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 > >=20 > > What issues remain? > >=20 > > * 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. > >=20 > > * Ports compiler selection infrastructure is still under development. > >=20 > > * Some ports could build with clang with appropriate tweaks. > >=20 > > What can you do to help? > >=20 > > * Switch (some of) your systems. Early adoption can help us find bugs. > >=20 > > * 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. > >=20 > > tl;dr: Clang will become the default compiler for x86 architectures on = 2012-11-04 >=20 > There was a chorus of voices talking about ports already. My POV > is that suggesting to 'fix remaining ports to work with clang' is > just a nonsense. You are proposing to fork the development of all the > programs which do not compile with clang. Often, upstream developers > do not care about clang at all since it not being default compiler in > Debian/Fedora/Whatever Linux. The project simply do not have resources > to maintain the fork of 20K programs. I may have phrased the above poorly, but in most cases I'd be happy with using USE_GCC as a solution, but to the extent that port maintainers can fix their ports to build with clang, that's a good thing. Having a deadline will help focus efforts towards finding the right fix for the most important ports in a timely manner. If we near the deadline and find that we need a few more weeks, nothing prevents us from slipping the date a bit. > Another issue with the switch, which seems to be not only not addressed, > but even not talked about, is the performance impact of the change. I > do not remember any measurements, whatever silly they could be, of the > performance change by the compiler switch. We often have serious and > argumented push-back for kernel changes that give as low as 2-3% of > the speed hit. What are the numbers for clang change, any numbers ? Florian Smeets (flo) did one round of benchmarks back in June with sysbench/mysql. There is a small but measurable slowdown both with world compiled with clang and with mysql compiled with clang. You can see the results on the last page of this document: http://people.freebsd.org/~flo/perf.pdf The total impacts are on the order of 1-2%. That's more than I'd like and I expect some pushback, but I feel it is in the range of acceptable code debt to take on to accomplish a multi-year project goal. -- Brooks --FL5UXtIhxfXey3p5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQT0XYXY6L6fI4GtQRAgvtAKDPrwu05OQOb/j6EvsOeKsEbvHIdQCeIE7J wXb5+Tm66WW7tve8Jtw1jPs= =oZ8q -----END PGP SIGNATURE----- --FL5UXtIhxfXey3p5-- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 14:10:14 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 E8D88106564A; Tue, 11 Sep 2012 14:10:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id A1F7A8FC16; Tue, 11 Sep 2012 14:10:14 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:897e:8083:4c98:946f] (unknown [IPv6:2001:7b8:3a7:0:897e:8083:4c98:946f]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id BE94F5C37; Tue, 11 Sep 2012 16:10:12 +0200 (CEST) Message-ID: <504F4645.4070900@FreeBSD.org> Date: Tue, 11 Sep 2012 16:10:13 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: Steve Kargl References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> In-Reply-To: <20120911132410.GA87126@troutmask.apl.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: toolchain@freebsd.org, 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 14:10:15 -0000 On 2012-09-11 15:24, Steve Kargl wrote: ... > How fast clang builds world in comparison to gcc is irrelevant. Not at all irrelevant: this proposal is about changing the default compiler for the FreeBSD system itself, not for all software out there. If certain software performs significantly better with gcc, and using newer versions of the GPL is no problem, then it is obviously the better choice. 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! > What is important is whether software built with clang functions > correctly. See for example, > > http://math-atlas.sourceforge.net/errata.html#WhatComp Yes, maths support, specifically precision, is admittedly still one of clang's (really llvm's) weaker points. It is currently not really a high priority item for upstream. This is obviously something that a certain part of our userbase will care a lot about, while most of the time they won't care so much about licensing or politics. So those people are probably better off using gcc for the time being. > Has anyone run Spec CPU2006 on i386 and amd64 FreeBSD? I am not aware of it, but is that test available publicly? I might take a shot, if I can get my hands on it. From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 14:10:34 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3B3E1065715; Tue, 11 Sep 2012 14:10:34 +0000 (UTC) (envelope-from imb@protected-networks.net) Received: from sarah.protected-networks.net (sarah.protected-networks.net [IPv6:2001:470:1f07:4e1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 708728FC08; Tue, 11 Sep 2012 14:10:34 +0000 (UTC) Received: from toshi.auburn.protected-networks.net (toshi.auburn.protected-networks.net [IPv6:2001:470:1f07:4e1::4]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "Iain Butler", Issuer "RSA Class 2 Personal CA v2" (verified OK)) (Authenticated sender: imb@protected-networks.net) by sarah.protected-networks.net (Postfix) with ESMTPSA id 951D9612E; Tue, 11 Sep 2012 10:10:26 -0400 (EDT) DomainKey-Signature: a=rsa-sha1; s=200509; d=protected-networks.net; c=nofws; q=dns; h=message-id:date:from:user-agent:mime-version:to:cc:subject: references:in-reply-to:x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=anncXciuKpB4ev8EpsXxo5U8MWtJMpzsS7A6c9vIz+srD04yw4MDqRaI/bPPy4ZgE DzxCwKbgTlhNPfqhq88VyCuDJ/uUBwLgj6kWxUobZqXsKQoghdtFHf2gsw40UsB Message-ID: <504F4650.9090700@protected-networks.net> Date: Tue, 11 Sep 2012 10:10:24 -0400 From: Michael Butler User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:15.0) Gecko/20120910 Thunderbird/15.0.1 MIME-Version: 1.0 To: Christer Solskogen References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <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> In-Reply-To: X-Enigmail-Version: 1.4.3 OpenPGP: id=0442D492 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: toolchain@freebsd.org, 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 14:10:34 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 09/11/12 09:44, Christer Solskogen wrote: > On Tue, Sep 11, 2012 at 3:32 PM, Steve Kargl > wrote: >> Interest twist of history. GCC is not abandonware. > > Correct, but GCC 4.2.1 is. > While this may be true, I'm not inclined to move any of my gear to a platform which is built on a tool-chain which is described in terms such as .. "In particular, clang/LLVM presently fails to produce correct code for some operations, and is not performance competitive with gcc for any." - From the link (http://math-atlas.sourceforge.net/errata.html#WhatComp) that Steve Kargl referenced (dated July 2012). While I appreciate the desire and need to move away from a legally encumbering environment, stability and maturity are both critical considerations. This is not to say that GCC 4.2.1 is either bug-free or sufficiently featureful as more modern versions but its idiosyncrasies are better known and understood, imb -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBPRlAACgkQQv9rrgRC1JLRUACeOGb8PryPla1yyhLeWzuVT4jM +JEAoIbn1IEed5oXR5+e9SCIfmfQ4V5R =ahHY -----END PGP SIGNATURE----- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 14:17:26 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F0E9E106566B; Tue, 11 Sep 2012 14:17:25 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 735A68FC1E; Tue, 11 Sep 2012 14:17:25 +0000 (UTC) Received: by qcsg15 with SMTP id g15so394164qcs.13 for ; Tue, 11 Sep 2012 07:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=fnLkup1pRJuUBu7vFA0bwE7S9HIDojfXf3+dSq6/MWg=; b=Usw8VXHpLTdMVKyGCZQnAKSXkFDLfgt/V4TquR3mgLxOllk5Am/Ev9O0WEIbivKlUz AHk9QAoIZWfzzYcU4mHRY1qg0o1/fB+pwXcr+pTlHZyfeax5KZ1eVZqFtOSRQStbpxso 3ascurqd4uQwDkHP+D6B6N+VhGV09SWkPLP8PvVrBB8H98PpSnQmbQU57to5+pUQ/tXr 2SPzgpqkVPHo6OSNA68f1PnVwvuLXubEvXhdb5cBh6VMQ3n8+0to8nKsBdG6ZpCWsqFX UsFC7kPOJwJ6n6bWnxPzNOejFEN1SmijhFJ3xYFJK5ukhoRtuZxSL+nWhgqGHUxUaVWE rNmQ== MIME-Version: 1.0 Received: by 10.229.137.7 with SMTP id u7mr4705769qct.63.1347373044793; Tue, 11 Sep 2012 07:17:24 -0700 (PDT) Received: by 10.49.2.38 with HTTP; Tue, 11 Sep 2012 07:17:24 -0700 (PDT) In-Reply-To: <20120911140825.GA73518@lor.one-eyed-alien.net> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911140825.GA73518@lor.one-eyed-alien.net> Date: Wed, 12 Sep 2012 00:17:24 +1000 Message-ID: From: koobs k To: Brooks Davis Content-Type: text/plain; charset=UTF-8 Cc: toolchain@freebsd.org, 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 14:17:26 -0000 On 12 September 2012 00:08, Brooks Davis wrote: > On Tue, Sep 11, 2012 at 01:45:18PM +0300, Konstantin Belousov wrote: >> On Mon, Sep 10, 2012 at 04:12:07PM -0500, Brooks Davis wrote: >> > 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 >> >> There was a chorus of voices talking about ports already. My POV >> is that suggesting to 'fix remaining ports to work with clang' is >> just a nonsense. You are proposing to fork the development of all the >> programs which do not compile with clang. Often, upstream developers >> do not care about clang at all since it not being default compiler in >> Debian/Fedora/Whatever Linux. The project simply do not have resources >> to maintain the fork of 20K programs. > > I may have phrased the above poorly, but in most cases I'd be happy with > using USE_GCC as a solution, but to the extent that port maintainers > can fix their ports to build with clang, that's a good thing. Having a > deadline will help focus efforts towards finding the right fix for the > most important ports in a timely manner. On that note, just identified the issue with multimedia/x264 and have submitted a PR for it (ports/171542) It also highlighted a missing libprofile_rt.a in base clang that theraven has pinged dim@ about ~448 less affected ports to worry about now :) --Koobs From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 14:28:40 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E8A2106564A; Tue, 11 Sep 2012 14:28:40 +0000 (UTC) (envelope-from prvs=594a7e427=pschmehl_lists@tx.rr.com) Received: from ip-002.utdallas.edu (ip-002.utdallas.edu [129.110.20.108]) by mx1.freebsd.org (Postfix) with ESMTP id 23B448FC16; Tue, 11 Sep 2012 14:28:39 +0000 (UTC) X-Group: None X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlEFAK1JT1CBbgogWWdsb2JhbABFq1iQEAEjEIJbAQEFOAIzDBALGC5DFAYBEhuHdadClD+LEIVGYAOIU6Ar X-IronPort-AV: E=Sophos;i="4.80,405,1344229200"; d="scan'208";a="98709269" Received: from zxtm01.utdallas.edu (HELO [129.110.200.11]) ([129.110.10.32]) by ip-002.utdallas.edu with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Sep 2012 09:27:27 -0500 Date: Tue, 11 Sep 2012 09:27:25 -0500 From: Paul Schmehl To: Doug Barton , Lars Engels Message-ID: <899949C4294E09BFD34754CE@localhost> In-Reply-To: <504F07E3.4010004@FreeBSD.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <504ED1FC.3090608@FreeBSD.org> <20120911092750.GF20762@e-new.0x20.net> <504F07E3.4010004@FreeBSD.org> X-Mailer: Mulberry/4.1.0a1 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline; size=2164 Cc: toolchain@FreeBSD.org, Brooks Davis , current@FreeBSD.org, freebsd-ports@FreeBSD.org Subject: Re: Clang as default compiler November 4th X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl 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 14:28:40 -0000 --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 From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 14:29:13 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 11E321065706; Tue, 11 Sep 2012 14:29:13 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay001.isp.belgacom.be (mailrelay001.isp.belgacom.be [195.238.6.51]) by mx1.freebsd.org (Postfix) with ESMTP id 448BC8FC17; Tue, 11 Sep 2012 14:29:11 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQFADRJT1BbsVPi/2dsb2JhbABFhUC2D4EIgiABAQVWIgEQCw4KCRYPCQMCAQIBJx4GDQEHAQGIEAe7e4sQhiYDjmWBIJV1gmg Received: from 226.83-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.83.226]) by relay.skynet.be with ESMTP; 11 Sep 2012 16:28:01 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q8BES0w1003115; Tue, 11 Sep 2012 16:28:00 +0200 (CEST) (envelope-from tijl@coosemans.org) Message-ID: <504F4A6B.4010001@coosemans.org> Date: Tue, 11 Sep 2012 16:27:55 +0200 From: Tijl Coosemans User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120804 Thunderbird/14.0 MIME-Version: 1.0 To: Dimitry Andric References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> In-Reply-To: <504F4645.4070900@FreeBSD.org> X-Enigmail-Version: 1.4.2 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigBFD8D9E5ECC97448A85D6470" Cc: toolchain@FreeBSD.org, current@FreeBSD.org, Steve Kargl 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 14:29:13 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBFD8D9E5ECC97448A85D6470 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 11-09-2012 16:10, Dimitry Andric wrote: > On 2012-09-11 15:24, Steve Kargl wrote: >> What is important is whether software built with clang functions >> correctly. See for example, >> >> http://math-atlas.sourceforge.net/errata.html#WhatComp >=20 > Yes, maths support, specifically precision, is admittedly still one of > clang's (really llvm's) weaker points. It is currently not really a > high priority item for upstream. >=20 > This is obviously something that a certain part of our userbase will > care a lot about, while most of the time they won't care so much about > licensing or politics. So those people are probably better off using > gcc for the time being. Does it affect the accuracy of libm functions? --------------enigBFD8D9E5ECC97448A85D6470 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlBPSnAACgkQfoCS2CCgtivMWQD/VQ92Zv0/xh1leFgSZlnBjQQY 72yUvBStfMih/BvtiQoA/jiyDeQ0pJJFfc63eOjeVVstprPzYaX0V6XBOLdNDQTr =JkS9 -----END PGP SIGNATURE----- --------------enigBFD8D9E5ECC97448A85D6470-- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 14:35:11 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 22333106564A; Tue, 11 Sep 2012 14:35:11 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 48FC38FC12; Tue, 11 Sep 2012 14:35:09 +0000 (UTC) Received: by eeke52 with SMTP id e52so529769eek.13 for ; Tue, 11 Sep 2012 07:35:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VmZ7WlXc7FlZgBpjDN7V74p55pbWoHdbTzvPF2uwnVw=; b=ueD2MXrymKJXIHNO1fhpkHoKbmuocNOAYuTru3LVtC+4v7OhhPzQoQw2s8MUdZsXZN sF+CsAJTZdt23Zm2UxSXPTSxc6vtAPyPiTdL3YonvTC/9ViXeL8VoOs4ZI7Ee0vL8WvB 5pB/izzsjYGO3qGsSAWYqU20HqaOtjsQgYUO6OjiQUma44/G54DTIF7bFLuFaPV25+qi 6f9JCadsFCMrk3Qj/Sv1rxAv6fODcbbuMm7cORK/KtZmYES2kgHSYI3oX1sbldWGxqPz 2RdRVTwccyPjwNrCR3Bm+SQQQFBh/PiyHQopfdd8JhdubZVNxc0YL3gBBJ9UADwu7qRH m6zg== MIME-Version: 1.0 Received: by 10.204.145.82 with SMTP id c18mr4786871bkv.133.1347374108957; Tue, 11 Sep 2012 07:35:08 -0700 (PDT) Received: by 10.204.10.141 with HTTP; Tue, 11 Sep 2012 07:35:08 -0700 (PDT) Received: by 10.204.10.141 with HTTP; Tue, 11 Sep 2012 07:35:08 -0700 (PDT) In-Reply-To: <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> Date: Tue, 11 Sep 2012 15:35:08 +0100 Message-ID: From: Chris Rees To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: toolchain@freebsd.org, 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 14:35:11 -0000 On 11 Sep 2012 13:22, "Konstantin Belousov" wrote: > > On Tue, Sep 11, 2012 at 02:06:49PM +0200, Roman Divacky wrote: > > > > tl;dr: Clang will become the default compiler for x86 architectures on 2012-11-04 > > > > > > There was a chorus of voices talking about ports already. My POV > > > is that suggesting to 'fix remaining ports to work with clang' is > > > just a nonsense. You are proposing to fork the development of all the > > > programs which do not compile with clang. Often, upstream developers > > > do not care about clang at all since it not being default compiler in > > > Debian/Fedora/Whatever Linux. The project simply do not have resources > > > to maintain the fork of 20K programs. > > > > We currently dont compile 4680 ports (out of 23857). Top 10 ports that prevent > > the most other ports from compiling together prevent 2222 ports from > > compilation. So if we fixed those 10 ports we could be at around 2500 ports > > not compiling. Thats quite far from your claim of forking 20k programs. > Sorry, I cannot buy the argument. How many patches there are already > in the ports tree to cope with clang incompatibility with gcc ? You may > declare that all of them are application bugs, but it completely misses > the point. > > > > > > Looking from less amiable angle, you propose to knowingly break significant > > > and important piece of the project work. My belief is that switch cannot > > > be done before ports switch to the port-provided compiler. > > > > I believe majority of the broken ports is broken because their maintainer > > never saw them being broken with clang just because it's not the default > > compiler. Thus by making it the default majority of the problems would just > > go away. > Can you, please, read what I wrote ? Fixing _ports_ to compile with > clang is plain wrong. Upstream developers use gcc almost always for > development and testing. Establishing another constant cost on the > porting work puts burden on the ports submitters, maintainers and even > ports users. > > I do strongly oppose the attempt to drain the freebsd resources by > forcing porters to port third-party code to other compiler. I definitely see your point, but upstream should also be writing correct/portable code. Whenever a patch to fix a port is made, it is actually mandatory to report it to upstream, and nag them to hell until it's committed! Most are very happy for this to happen; we've been removing GNUisms from build scripts etc for years now (and I could link to a "Thank you" email for all the build fixes I've sent upstream). Sometimes, like the common bashism if [ a == b ] we bite the bullet and add the extensions ourselves; sometimes upstream has an education on writing portable code! If we were all the same, would there be much point in being different? Chris From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 14:42:15 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C50B31065670; Tue, 11 Sep 2012 14:42:15 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id E06098FC0C; Tue, 11 Sep 2012 14:42:14 +0000 (UTC) Received: by lage12 with SMTP id e12so463183lag.13 for ; Tue, 11 Sep 2012 07:42:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=ELF5BAbc6wSThC8KMFgTo0GKfqXRZymsmmQzn3IfMiY=; b=t8TBKFYaVdeUxds4KuVkuCEpnOHkvKMSi70SzUifRrtteLFCzn2B4aLJUMA2g0onJ4 B//e6O9cvZE2m0NEcxLy5KRBTlyP4wh3KVQtLgy97bRLMiWbMIg8ByYg8rp/80TSbtBn OfPMe0h07mjh9AsdThet+5sMBA48EV4ioTwxwp8rtP7smNykBHDYdDNCaRMbrg5Rw1j3 S6NINrs2deP7NjUUDvbWQZrQFRKK4dqdEVEXFItSxpZ2zkflV6PCkkpSGsrPkUmdnURd UUCiMDbVzLlgepoPXbE1/K9p3Q2ykZFyWjfcqmHzVXvHvySdhdAxvqVwXI3guwovV9Gr Dy8w== MIME-Version: 1.0 Received: by 10.152.131.68 with SMTP id ok4mr16080295lab.47.1347374533601; Tue, 11 Sep 2012 07:42:13 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Tue, 11 Sep 2012 07:42:13 -0700 (PDT) In-Reply-To: <20120911140825.GA73518@lor.one-eyed-alien.net> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911140825.GA73518@lor.one-eyed-alien.net> Date: Tue, 11 Sep 2012 15:42:13 +0100 X-Google-Sender-Auth: YKj1fEkth4a17MqvNvyZdm6Iy6E Message-ID: From: Attilio Rao To: Brooks Davis Content-Type: text/plain; charset=UTF-8 Cc: toolchain@freebsd.org, 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 Reply-To: attilio@FreeBSD.org 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 14:42:15 -0000 On 9/11/12, Brooks Davis wrote: > On Tue, Sep 11, 2012 at 01:45:18PM +0300, Konstantin Belousov wrote: >> On Mon, Sep 10, 2012 at 04:12:07PM -0500, Brooks Davis wrote: >> > 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 >> >> There was a chorus of voices talking about ports already. My POV >> is that suggesting to 'fix remaining ports to work with clang' is >> just a nonsense. You are proposing to fork the development of all the >> programs which do not compile with clang. Often, upstream developers >> do not care about clang at all since it not being default compiler in >> Debian/Fedora/Whatever Linux. The project simply do not have resources >> to maintain the fork of 20K programs. > > I may have phrased the above poorly, but in most cases I'd be happy with > using USE_GCC as a solution, but to the extent that port maintainers > can fix their ports to build with clang, that's a good thing. Having a > deadline will help focus efforts towards finding the right fix for the > most important ports in a timely manner. > > If we near the deadline and find that we need a few more weeks, nothing > prevents us from slipping the date a bit. > >> Another issue with the switch, which seems to be not only not addressed, >> but even not talked about, is the performance impact of the change. I >> do not remember any measurements, whatever silly they could be, of the >> performance change by the compiler switch. We often have serious and >> argumented push-back for kernel changes that give as low as 2-3% of >> the speed hit. What are the numbers for clang change, any numbers ? > > Florian Smeets (flo) did one round of benchmarks back in June with > sysbench/mysql. There is a small but measurable slowdown both with > world compiled with clang and with mysql compiled with clang. You can > see the results on the last page of this document: > > http://people.freebsd.org/~flo/perf.pdf > > The total impacts are on the order of 1-2%. That's more than I'd like > and I expect some pushback, but I feel it is in the range of acceptable > code debt to take on to accomplish a multi-year project goal. 1-2% on SMP workload can just be part of the variance due to memory layout changes. What I would like to see is benchmarks in UP configurations, like machine booting with only one process and doing make buildworld (no -j at all). This could give a good measurement if the compiler changed anything or not. Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 14:56:04 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0DDCD10656FD; Tue, 11 Sep 2012 14:56:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id BF4418FC12; Tue, 11 Sep 2012 14:56:02 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:897e:8083:4c98:946f] (unknown [IPv6:2001:7b8:3a7:0:897e:8083:4c98:946f]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 34D1C5C43; Tue, 11 Sep 2012 16:56:00 +0200 (CEST) Message-ID: <504F5101.8090906@FreeBSD.org> Date: Tue, 11 Sep 2012 16:56:01 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: Tijl Coosemans References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> In-Reply-To: <504F4A6B.4010001@coosemans.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: toolchain@FreeBSD.org, current@FreeBSD.org, Steve Kargl 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 14:56:04 -0000 On 2012-09-11 16:27, Tijl Coosemans wrote:> On 11-09-2012 16:10, Dimitry Andric wrote: ... >> Yes, maths support, specifically precision, is admittedly still one of >> clang's (really llvm's) weaker points. It is currently not really a >> high priority item for upstream. >> >> This is obviously something that a certain part of our userbase will >> care a lot about, while most of the time they won't care so much about >> licensing or politics. So those people are probably better off using >> gcc for the time being. > > Does it affect the accuracy of libm functions? It seems to, at least in specific cases; Steve posted about this in an earlier thread on -current: http://docs.freebsd.org/cgi/mid.cgi?20120905221310.GA97847 From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 15:03:16 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AE94B106564A; Tue, 11 Sep 2012 15:03:16 +0000 (UTC) (envelope-from mezz.freebsd@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0F78FC14; Tue, 11 Sep 2012 15:03:15 +0000 (UTC) Received: by oagm1 with SMTP id m1so392230oag.13 for ; Tue, 11 Sep 2012 08:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GG7e1UssJZxrAUpjbZuAez/uBnaGD0W6n33feZ9R3CA=; b=xwuU/f2r4gGuhvzrI1Ha04a+EbV4N8O1sOk7dPMSs7Vux8wpHI97poDC9TLLyS+sCL 9xchkjOxLlNqRSIy/5bqjVk3t+Ntd7eeRUUXabz4pxHeLpkg9zJcqKeU3QrmhovEn3lv LIGKwTK78sNEDaP+Oq4hwrnFVEhaAElRqsZuTAfFBDzXRDbzNmHuil7yx6jShxqRcU8P FViLcNqP3OGPkR3UG14OkHgMxdA79XIbFVn81hz5zolSdO5lo79/MRnqwSF1IsamvSo7 E6ik0viPx+M4UaMmQTUNiRvJSEDEzjCsal/dTG3lGtish3eaQMJ9D8i18/AZhl0FisLf WAvA== MIME-Version: 1.0 Received: by 10.182.52.42 with SMTP id q10mr18567927obo.46.1347375795171; Tue, 11 Sep 2012 08:03:15 -0700 (PDT) Received: by 10.76.97.168 with HTTP; Tue, 11 Sep 2012 08:03:15 -0700 (PDT) In-Reply-To: <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> Date: Tue, 11 Sep 2012 10:03:15 -0500 Message-ID: From: Jeremy Messenger To: Konstantin Belousov Content-Type: text/plain; charset=ISO-8859-1 Cc: toolchain@freebsd.org, 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 15:03:16 -0000 On Tue, Sep 11, 2012 at 7:21 AM, Konstantin Belousov wrote: > Can you, please, read what I wrote ? Fixing _ports_ to compile with > clang is plain wrong. Upstream developers use gcc almost always for > development and testing. Establishing another constant cost on the > porting work puts burden on the ports submitters, maintainers and even > ports users. > > I do strongly oppose the attempt to drain the freebsd resources by > forcing porters to port third-party code to other compiler. I agree with this pretty much. I haven't done fix any of port build with clang as I simply ignore clang (sorry). When user report to me and I tell them to stick with GCC as I don't support it. Cheers, Mezz -- mezz.freebsd@gmail.com - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 15:03:57 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 A29DF1065706; Tue, 11 Sep 2012 15:03:57 +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 7855E8FC1C; Tue, 11 Sep 2012 15:03:57 +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 q8BF3uLN087660; Tue, 11 Sep 2012 08:03:56 -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 q8BF3uRK087659; Tue, 11 Sep 2012 08:03:56 -0700 (PDT) (envelope-from sgk) Date: Tue, 11 Sep 2012 08:03:56 -0700 From: Steve Kargl To: Dimitry Andric Message-ID: <20120911150356.GA87526@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <504F4645.4070900@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: toolchain@FreeBSD.org, Roman Divacky , 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 15:03:57 -0000 On Tue, Sep 11, 2012 at 04:10:13PM +0200, Dimitry Andric wrote: > On 2012-09-11 15:24, Steve Kargl wrote: > ... > >How fast clang builds world in comparison to gcc is irrelevant. > > Not at all irrelevant: this proposal is about changing the default > compiler for the FreeBSD system itself, not for all software out there. If /usr/bin/cc becomes clang, then the proposal is about more than the FreeBSD system. This affects any port that uses cc. > If certain software performs significantly better with gcc, and using > newer versions of the GPL is no problem, then it is obviously the better > choice. > > 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. > >What is important is whether software built with clang functions > >correctly. See for example, > > > >http://math-atlas.sourceforge.net/errata.html#WhatComp > > Yes, maths support, specifically precision, is admittedly still one of > clang's (really llvm's) weaker points. It is currently not really a > high priority item for upstream. > > This is obviously something that a certain part of our userbase will > care a lot about, while most of the time they won't care so much about > licensing or politics. So those people are probably better off using > gcc for the time being. Which gets back to Doug's original point. Until the ports system has worked out its infrastructure for choosing a compiler, a switch to clang as the default compiler would seem to be premature. > >Has anyone run Spec CPU2006 on i386 and amd64 FreeBSD? > > I am not aware of it, but is that test available publicly? I might take > a shot, if I can get my hands on it. Unfortunately, it has a cost associated with it. http://www.spec.org/order.html. Perhaps, the FreeBSD Foundation can make it available. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 15:12:34 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 25BB21065680; Tue, 11 Sep 2012 15:12:34 +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 F3A858FC0A; Tue, 11 Sep 2012 15:12:33 +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 q8BFCUFD087712; Tue, 11 Sep 2012 08:12:30 -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 q8BFCUS7087711; Tue, 11 Sep 2012 08:12:30 -0700 (PDT) (envelope-from sgk) Date: Tue, 11 Sep 2012 08:12:30 -0700 From: Steve Kargl To: Tijl Coosemans Message-ID: <20120911151230.GB87526@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <504F4A6B.4010001@coosemans.org> User-Agent: Mutt/1.4.2.3i Cc: toolchain@FreeBSD.org, Dimitry Andric , 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 15:12:34 -0000 On Tue, Sep 11, 2012 at 04:27:55PM +0200, Tijl Coosemans wrote: > On 11-09-2012 16:10, Dimitry Andric wrote: > > On 2012-09-11 15:24, Steve Kargl wrote: > >> What is important is whether software built with clang functions > >> correctly. See for example, > >> > >> http://math-atlas.sourceforge.net/errata.html#WhatComp > > > > Yes, maths support, specifically precision, is admittedly still one of > > clang's (really llvm's) weaker points. It is currently not really a > > high priority item for upstream. > > > > This is obviously something that a certain part of our userbase will > > care a lot about, while most of the time they won't care so much about > > licensing or politics. So those people are probably better off using > > gcc for the time being. > > Does it affect the accuracy of libm functions? > I'm not sure if anyone has done any extensive testing. I've started to run some of my test codes to compare certain functions in a clang-compiled libm, gcc-compiled libm, and reference solutions generated from math/mpfr. For a locally patched j0f, I found that clang gave much worse accuracy. If I revert the local patch, clang and gcc are to give the same results. Unfortnately, an unpatched j0f gives 500000 ULP errors. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 15:35:04 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52ECD106564A; Tue, 11 Sep 2012 15:35:04 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0773B8FC0C; Tue, 11 Sep 2012 15:35:03 +0000 (UTC) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.5/8.14.5/NETPLEX) with ESMTP id q8BFZ2GE023608; Tue, 11 Sep 2012 11:35:02 -0400 X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.2.7 (mail.netplex.net [204.213.176.10]); Tue, 11 Sep 2012 11:35:02 -0400 (EDT) Date: Tue, 11 Sep 2012 11:35:02 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Konstantin Belousov In-Reply-To: <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> Message-ID: References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: toolchain@freebsd.org, 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 Reply-To: Daniel Eischen 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 15:35:04 -0000 On Tue, 11 Sep 2012, Konstantin Belousov wrote: > On Tue, Sep 11, 2012 at 02:06:49PM +0200, Roman Divacky wrote: >> >> We currently dont compile 4680 ports (out of 23857). Top 10 ports that prevent >> the most other ports from compiling together prevent 2222 ports from >> compilation. So if we fixed those 10 ports we could be at around 2500 ports >> not compiling. Thats quite far from your claim of forking 20k programs. > > Sorry, I cannot buy the argument. How many patches there are already > in the ports tree to cope with clang incompatibility with gcc ? You may > declare that all of them are application bugs, but it completely misses > the point. [ snip ] >> I believe majority of the broken ports is broken because their maintainer >> never saw them being broken with clang just because it's not the default >> compiler. Thus by making it the default majority of the problems would just >> go away. > > Can you, please, read what I wrote ? Fixing _ports_ to compile with > clang is plain wrong. Upstream developers use gcc almost always for > development and testing. Establishing another constant cost on the > porting work puts burden on the ports submitters, maintainers and even > ports users. This is a good point! -- DE From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 15:56:25 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0999106566C; Tue, 11 Sep 2012 15:56:25 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id 35F398FC1C; Tue, 11 Sep 2012 15:56:25 +0000 (UTC) Received: by oagm1 with SMTP id m1so441969oag.13 for ; Tue, 11 Sep 2012 08:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=3aT2z9cqaiVxgP6JrAzjd+ER3HoIU1sysJ9ckO08Eho=; b=SbQBYccBJosp20yJh7zczSuBxV3RWWjMYcYupd7DwgMjN+4egTcCOe1gwedlNnOqGV p9SZfB0BGa3OAlDg4H0e1Kssj/bBpv9UfbHgODssICT4hJ4i0c7LRxMDSLvXS3yRmseC 3zM7ykPpKBerufyxH5x7m9ucaqgIxoZcZIoMib/kzVpOFzWdtTTbtAX7umi5bfFoZxBG n4DoiMKMyjHK82GFe88rnwneNKNLqt9CJcVANbbZx2DNM1nUQyWKELSDJ0V+Jh5qpcuk SThMdRSb9ihERBGdcVqIieJo8UODCQVfWVqOJzQMJD+S2grCB/eTwcZTxkBG+kf3Xi6C 0aeQ== Received: by 10.60.32.33 with SMTP id f1mr19260803oei.71.1347378984742; Tue, 11 Sep 2012 08:56:24 -0700 (PDT) Received: from fuji-wireless.local (c-24-19-191-56.hsd1.wa.comcast.net. [24.19.191.56]) by mx.google.com with ESMTPS id jd10sm16632081obb.13.2012.09.11.08.56.21 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Sep 2012 08:56:24 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: Garrett Cooper In-Reply-To: Date: Tue, 11 Sep 2012 08:56:21 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> To: Daniel Eischen X-Mailer: Apple Mail (2.1278) Cc: toolchain@freebsd.org, 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 15:56:25 -0000 On Sep 11, 2012, at 8:35 AM, Daniel Eischen wrote: > On Tue, 11 Sep 2012, Konstantin Belousov wrote: >=20 >> On Tue, Sep 11, 2012 at 02:06:49PM +0200, Roman Divacky wrote: >>>=20 >>> We currently dont compile 4680 ports (out of 23857). Top 10 ports = that prevent >>> the most other ports from compiling together prevent 2222 ports from >>> compilation. So if we fixed those 10 ports we could be at around = 2500 ports >>> not compiling. Thats quite far from your claim of forking 20k = programs. >>=20 >> Sorry, I cannot buy the argument. How many patches there are already >> in the ports tree to cope with clang incompatibility with gcc ? You = may >> declare that all of them are application bugs, but it completely = misses >> the point. >=20 > [ snip ] >=20 >>> I believe majority of the broken ports is broken because their = maintainer >>> never saw them being broken with clang just because it's not the = default >>> compiler. Thus by making it the default majority of the problems = would just >>> go away. >>=20 >> Can you, please, read what I wrote ? Fixing _ports_ to compile with >> clang is plain wrong. Upstream developers use gcc almost always for >> development and testing. Establishing another constant cost on the >> porting work puts burden on the ports submitters, maintainers and = even >> ports users. >=20 > This is a good point! Alternate compilers are being used on other OS distributions, like Arch = Linux, Gentoo Linux, etc, so encouraging external developers to = correct/simplify their Makefiles and build infrastructures is a good = thing (and plus, it makes switching to other compilers like icc, pcc, = etc easier). You're going to run into almost the same problem when trying to get = stuff to cross-compile for multiple targets, so there's no reason why = FreeBSD/Linux should not strive to get others to hardcode less. I wouldn't consider ports to be a stopgap for the clang switchover as = much as correctness/performance. Broken third-party software can be = fixed, but if the underlying foundation doesn't deliver sane code or = severely regresses performance (runtime is more important than building = IMO because I'd rather have code take a little while longer to compile = if the end-result runs faster, and ultimately runtime performance = affects build performance), then there's no point in trying to switch = over yet. Thanks, -Garrett= From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 16:03:13 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 2FCE01065674; Tue, 11 Sep 2012 16:03:13 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id F41DB8FC1E; Tue, 11 Sep 2012 16:03:11 +0000 (UTC) Received: by lage12 with SMTP id e12so538655lag.13 for ; Tue, 11 Sep 2012 09:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=AKIvHtSqPhaTQ34UK7/nNDrdW9yzMkigpyr33RB4Rcw=; b=K18y/yJ/78kRjGjX3xMdzqINXP4lqoqo/GAks4ErZE95rE9x2ODMjRgE40Zk2L1Y3V d4p8jBHj6rU6BR0YAMz4PeA/S3G/sokhxcP7/duQ5a4tR2ni21cHFFWHVENL9Goe7WrB p82tUVvB+ARH7MyuBt8Hrw8b5EDn1ESlc4vhAgxCAmJmy5bwrihfM+znZmzhrnq9yMw4 vVBupAh/PVzKJApVTWTeFEKjVbNwIi9wgwbBWBqgLFnNN4bm0oQVcGKEu/yuF4ltePTp iOnntxRFEXNzoMiQ7GqPeuhOAPevOHJdsAEDPDSxcLqr7NEPA6KjMDK2IY9ZJ+p/mVA7 TB4w== MIME-Version: 1.0 Received: by 10.112.103.71 with SMTP id fu7mr6060464lbb.21.1347379389678; Tue, 11 Sep 2012 09:03:09 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.112.102.39 with HTTP; Tue, 11 Sep 2012 09:03:09 -0700 (PDT) In-Reply-To: References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> Date: Tue, 11 Sep 2012 17:03:09 +0100 X-Google-Sender-Auth: 2OqgR0w-9ObLjq5f2kOhQ6R-WfU Message-ID: From: Attilio Rao To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Daniel Eischen , current@freebsd.org, toolchain@freebsd.org Subject: Re: Clang as default compiler November 4th X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org 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 16:03:13 -0000 On Tue, Sep 11, 2012 at 4:56 PM, Garrett Cooper wrote: > On Sep 11, 2012, at 8:35 AM, Daniel Eischen wrote: > >> On Tue, 11 Sep 2012, Konstantin Belousov wrote: >> >>> On Tue, Sep 11, 2012 at 02:06:49PM +0200, Roman Divacky wrote: >>>> >>>> We currently dont compile 4680 ports (out of 23857). Top 10 ports that= prevent >>>> the most other ports from compiling together prevent 2222 ports from >>>> compilation. So if we fixed those 10 ports we could be at around 2500 = ports >>>> not compiling. Thats quite far from your claim of forking 20k programs= . >>> >>> Sorry, I cannot buy the argument. How many patches there are already >>> in the ports tree to cope with clang incompatibility with gcc ? You may >>> declare that all of them are application bugs, but it completely misses >>> the point. >> >> [ snip ] >> >>>> I believe majority of the broken ports is broken because their maintai= ner >>>> never saw them being broken with clang just because it's not the defau= lt >>>> compiler. Thus by making it the default majority of the problems would= just >>>> go away. >>> >>> Can you, please, read what I wrote ? Fixing _ports_ to compile with >>> clang is plain wrong. Upstream developers use gcc almost always for >>> development and testing. Establishing another constant cost on the >>> porting work puts burden on the ports submitters, maintainers and even >>> ports users. >> >> This is a good point! > > Alternate compilers are being used on other OS distributions, like Arch L= inux, Gentoo Linux, etc, so encouraging external developers to correct/simp= lify their Makefiles and build infrastructures is a good thing (and plus, i= t makes switching to other compilers like icc, pcc, etc easier). > > You're going to run into almost the same problem when trying to get stuff= to cross-compile for multiple targets, so there's no reason why FreeBSD/Li= nux should not strive to get others to hardcode less. > > I wouldn't consider ports to be a stopgap for the clang switchover as muc= h as correctness/performance. Broken third-party software can be fixed, but= if the underlying foundation doesn't deliver sane code or severely regress= es performance (runtime is more important than building IMO because I'd rat= her have code take a little while longer to compile if the end-result runs = faster, and ultimately runtime performance affects build performance), then= there's no point in trying to switch over yet. While this is generally true I think we need to make a distinction. To me speaking about "not compiling ports" doesn't mean anything. What are the bugs that actually prevents the vast majority of ports from compiling? (speaking of which anyone has testing their actual functionality too?) Because I really don't expect the bugs to be always the same repeated over and over, there will be some bugs depending by brain-o in the ports code and other depending by clang bugs. As kib@ rightly points out fixing indiscriminately ports is not the solution, but fixing ports when *the bug is actually in the port itself* is the right solution, otherwise fix the compiler for the other class of bugs. Did the people pushing for default clang make an assessment on the type of ports bug present? (and I see there is a lot of people aiming for it, so if the ports are splitted among several people we can get a good handle on it). Could such bugs be characterized and classified? Making such a huge change is also a matter of loosing much time on problems which don't seem directly related to it, but which infact prevent the system from working correctly. Switching to default CLANG with the current situation (20% of port not even compiling, ports compiler selection broken, libm loss of precision, performance barely analyzed in simplified scheme, etc.) is not an option in my head and people should really reconsider it, unless all these points gets properly addressed. Attilio --=20 Peace can only be achieved by understanding - A. Einstein From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 16:27:09 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 A6F011065675 for ; Tue, 11 Sep 2012 16:27:09 +0000 (UTC) (envelope-from pfg@freebsd.org) Received: from nm8.bullet.mail.sp2.yahoo.com (nm8.bullet.mail.sp2.yahoo.com [98.139.91.78]) by mx1.freebsd.org (Postfix) with SMTP id 615878FC0A for ; Tue, 11 Sep 2012 16:27:08 +0000 (UTC) Received: from [98.139.91.70] by nm8.bullet.mail.sp2.yahoo.com with NNFMP; 11 Sep 2012 16:27:08 -0000 Received: from [98.139.91.56] by tm10.bullet.mail.sp2.yahoo.com with NNFMP; 11 Sep 2012 16:27:08 -0000 Received: from [127.0.0.1] by omp1056.mail.sp2.yahoo.com with NNFMP; 11 Sep 2012 16:27:08 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 29575.63693.bm@omp1056.mail.sp2.yahoo.com Received: (qmail 35327 invoked by uid 60001); 11 Sep 2012 16:27:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1347380827; bh=moeBshx9aC19G5pfbgDGKkipIRif1maLNusFDiwPYEA=; h=X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=B+G49Idfw2XguKh/unByHuu3VOHwLyM71rvuBvLesj62P/L8R3nIwEMsXfZ8XcUTK/LrY19SmjgEbUAK0hG+SqtU1jmt/ADApY1lbzEkVIhM8x+6kNIKXmeSGrgKDuAm2l8cJiiXwZyz5GAWd4pmPJh9wzq7ajQ0kGrGowYQlVk= X-YMail-OSG: usBEVWkVM1k8Fcw5A8CufeEwBknaw3Svznw74vB0LsYFEkR 2y7AoEsDkNNCAnBMg4pZeuz1XqhQ215v1igDauSZXutUSVVHhHu3OPkgUHTa N4pFOLIxQ.z7b2snSfeqHf24npSOI6NOv95wxL3ethaRqERLHH842.rK4MHm 5Jb5dJAmgDsG.43OyWta41ybeD614R9G15lLIONA0C3dVCSBgntqgM2MnNSm tKtE8qnhiFV_ByCfbfeejLVZmuFVJ5iJRSfDDzMoRk5zuO5hVDp6olSjG5r9 fgwfJD1E9o9oBZVSrNTVB8MF3oq2pB5CL6Y2uOTSHzSOIVegnMduldMHLcLi ebPu1bAtTTwWKGtRk4Fqu76TT3ba6oScJd9FIWbnK4z17VRpomOCBrX5nXim 0.DwdrQfjIP7Gj5bga28CKBRpVQYZZNeUpQbxCuuxH36rDHHHksCTzxmVQVv yUAukQbrrFq_LKL.ZDokF Received: from [200.118.157.7] by web113519.mail.gq1.yahoo.com via HTTP; Tue, 11 Sep 2012 09:27:07 PDT X-RocketYMMF: giffunip X-Mailer: YahooMailWebService/0.8.121.416 References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> Message-ID: <1347380827.22767.YahooMailNeo@web113519.mail.gq1.yahoo.com> Date: Tue, 11 Sep 2012 09:27:07 -0700 (PDT) From: Pedro Giffuni To: Konstantin Belousov , Roman Divacky In-Reply-To: <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "toolchain@freebsd.org" , "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 Reply-To: Pedro Giffuni 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 16:27:09 -0000 Hello;=0A=A0=0AJust my $0.02.=0A=A0=0A----- Original Message -----=0A=A0...= =0A> Can you, please, read what I wrote ? Fixing _ports_ to compile with=0A= > clang is plain wrong. Upstream developers use gcc almost always for=0A> d= evelopment and testing. Establishing another constant cost on the=0A> porti= ng work puts burden on the ports submitters, maintainers and even=0A> ports= users.=0A> =0A> I do strongly oppose the attempt to drain the freebsd reso= urces by=0A> forcing porters to port third-party code to other compiler.=0A= > =0A=0AI can only speak for Apache OpenOffice but since Apple did the swit= ch=0Aalready we are feeling a growing pressure to port OpenOffice to clang.= =0A=0AFor the time being we need gcc but we would really prefer something= =0Amore up to date than gcc 4.2.1 + fixes. In other words, yes making=0Acla= ng the default may sound drastic but I am OK with killing base=0Agcc and if= clang is what is left I can live with it.=0A=0APedro. From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 16:43:18 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 39651106566B; Tue, 11 Sep 2012 16:43:18 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id ECA2A8FC12; Tue, 11 Sep 2012 16:43:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=In-Reply-To:Message-Id:From:Mime-Version:Date:References:Subject:Cc:To:Content-Type; bh=raDu7sGxK5+yDTOB8D29qh7XSXdXNRZHOaIEdqv0IMc=; b=XuiON+Fqzl7rxaLGXeFb/8W8ui4uh0x/9Cs9cWGOT6i7yKXr/5HGOZRDd2lEyyxqn4VGfi3iUcmrmQm0srrNMnXsEjc4icllaMZL0MLuPOKiyPedWk3pSeT7CXUXUiMk; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TBTYF-000Ax3-58; Tue, 11 Sep 2012 11:43:06 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1347381777-70338-70337/5/4; Tue, 11 Sep 2012 16:42:57 +0000 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: Christer Solskogen , Michael Butler References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <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> Date: Tue, 11 Sep 2012 11:42:53 -0500 Mime-Version: 1.0 From: Mark Felder Message-Id: In-Reply-To: <504F4650.9090700@protected-networks.net> User-Agent: Opera Mail/12.02 (Win32) X-SA-Report: ALL_TRUSTED=-1, KHOP_THREADED=-0.5 X-SA-Score: -1.5 Cc: toolchain@freebsd.org, 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 16:43:18 -0000 On Tue, 11 Sep 2012 09:10:24 -0500, Michael Butler wrote: > - From the link (http://math-atlas.sourceforge.net/errata.html#WhatComp) > that Steve Kargl referenced (dated July 2012). I don't know where this guy is getting his info, but CLANG is /more/ standards compliant and doesn't have an issue producing "correct" code. Though it might not be the fastest (yet). And if Apple (probably one of the largest commercial CLANG users) doesn't have an issue with it producing "incorrect" code why should we believe this guy? From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 16:48:54 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B84701065670; Tue, 11 Sep 2012 16:48:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 33CF78FC1D; Tue, 11 Sep 2012 16:48:53 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8BGn2FT073486; Tue, 11 Sep 2012 19:49:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8BGmnYV005342; Tue, 11 Sep 2012 19:48:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8BGmngn005341; Tue, 11 Sep 2012 19:48:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 11 Sep 2012 19:48:49 +0300 From: Konstantin Belousov To: Pedro Giffuni Message-ID: <20120911164849.GL37286@deviant.kiev.zoral.com.ua> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <1347380827.22767.YahooMailNeo@web113519.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hTKW8p8tUZ/8vLMe" Content-Disposition: inline In-Reply-To: <1347380827.22767.YahooMailNeo@web113519.mail.gq1.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: "toolchain@freebsd.org" , "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 16:48:54 -0000 --hTKW8p8tUZ/8vLMe Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 11, 2012 at 09:27:07AM -0700, Pedro Giffuni wrote: > Hello; > =9A > Just my $0.02. > =9A > ----- Original Message ----- > =9A... > > Can you, please, read what I wrote ? Fixing _ports_ to compile with > > clang is plain wrong. Upstream developers use gcc almost always for > > development and testing. Establishing another constant cost on the > > porting work puts burden on the ports submitters, maintainers and even > > ports users. > >=20 > > I do strongly oppose the attempt to drain the freebsd resources by > > forcing porters to port third-party code to other compiler. > >=20 >=20 > I can only speak for Apache OpenOffice but since Apple did the switch > already we are feeling a growing pressure to port OpenOffice to clang. >=20 > For the time being we need gcc but we would really prefer something > more up to date than gcc 4.2.1 + fixes. In other words, yes making > clang the default may sound drastic but I am OK with killing base > gcc and if clang is what is left I can live with it. But allowing ports to select the compiler is the main point of my response, at least in the port part of it. I mean global configuration, and not referenced the existing per-port knobs (USE_GCC/WANT_GCC whatever). I would expect the portmgr to select some gcc (or clang or pcc or anything they find suitable) version and use it for a moment for ports. I do not claim that portmgr would consider 4.2.1 as the base for the switch but this is probably the least intrusive road right now. I do expect that selection shall be based on some measurement of the most supported compiler, and my gut feeling is that it ends as a version of gcc. Definitely, FreeBSD project is not a suitable place to make an efforts to port all existing OSS to clang, despite the opposite claims of the clang proponents. --hTKW8p8tUZ/8vLMe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBPa3EACgkQC3+MBN1Mb4hvlQCcCIj4WKY4lyUzHciIAZC0CY2T tegAoMH/ULxvEiDOlL9x0wecDWCOiUQK =mZPh -----END PGP SIGNATURE----- --hTKW8p8tUZ/8vLMe-- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 17:03:10 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 3B5BE106566C for ; Tue, 11 Sep 2012 17:03:10 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id BC3C98FC0A for ; Tue, 11 Sep 2012 17:03:08 +0000 (UTC) Received: by wibhi8 with SMTP id hi8so3113025wib.13 for ; Tue, 11 Sep 2012 10:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:user-agent:references:in-reply-to:mime-version :content-type:content-transfer-encoding:message-id; bh=B02b6SyyKcmdJV5nawAdA9CoFBUyqjnNPOol4mNYnRw=; b=Hjn3bzZvPPC815tciNK6qSljq4oxp8CMdlPCekdnlNPYwt/BLrqiIeFs7IpySgUtdu Wz+1kRVDaziT/uYsY/8cqUePs0iYv5Es34ijLSXa3vmgp8q3grhol+L+06/OgJZQJLH0 7F42iYr7ufd+dVdJIsYI5px0RX88c6gzOU9HMbLovuxgV/aXWCPCW2QbzkHI5zIkgdAy 7p9qzhguSnWrIZCgUI2oSF4P7isLv7AxZeVG2E2LAIll5DjhWGD8z3IEXJ3SnaeGudfU iEo0LYZbvbaf1vIysZVbXnsHD41hjM966dSVFrax1AAakY0Dy7SY43TOimBhNbIQcEIr 9RPg== Received: by 10.180.109.129 with SMTP id hs1mr26494662wib.0.1347382988093; Tue, 11 Sep 2012 10:03:08 -0700 (PDT) Received: from dragon.dg (41-135-0-219.dsl.mweb.co.za. [41.135.0.219]) by mx.google.com with ESMTPS id t8sm3393875wiy.3.2012.09.11.10.03.04 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Sep 2012 10:03:06 -0700 (PDT) From: David Naylor To: toolchain@freebsd.org Date: Tue, 11 Sep 2012 19:02:58 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <20120910211207.GC64920@lor.one-eyed-alien.net> In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5687862.aMefJreAG0"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201209111903.01516.naylor.b.david@gmail.com> Cc: 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:03:10 -0000 --nextPart5687862.aMefJreAG0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Monday, 10 September 2012 23:12:07 Brooks Davis wrote: > [Please confine your replies to toolchain@freebsd.org to keep the thread > on the most relevant list.] >=20 > What can you do to help? >=20 > * Switch (some of) your systems. Early adoption can help us find bugs. >=20 > * 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. Hi I know of two ports (wine and libreoffice) that did not work for a clang bu= ilt=20 world (something in libc broke), thus even if those ports were built with g= cc=20 they would fail to run. =20 Has this been fixed, is known to be a problem, or is currently unknown? If= =20 the latter I would gladly check, in the case of wine... =20 Regards --nextPart5687862.aMefJreAG0 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEABECAAYFAlBPbsUACgkQUaaFgP9pFrLjjgCfarJhOlAIUmMGSaqOKV4dqmCZ EWkAn3ZwxZzuzZqpcO9usRogwaARJSbd =03Fv -----END PGP SIGNATURE----- --nextPart5687862.aMefJreAG0-- From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 17:04:25 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 F1F2B106566B; Tue, 11 Sep 2012 17:04:24 +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 AA15E8FC17; Tue, 11 Sep 2012 17:04:24 +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 q8BH4CfJ096445; Tue, 11 Sep 2012 10:04:12 -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 q8BH4CXV096444; Tue, 11 Sep 2012 10:04:12 -0700 (PDT) (envelope-from sgk) Date: Tue, 11 Sep 2012 10:04:12 -0700 From: Steve Kargl To: Mark Felder Message-ID: <20120911170412.GA96297@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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:04:25 -0000 On Tue, Sep 11, 2012 at 11:42:53AM -0500, Mark Felder wrote: > On Tue, 11 Sep 2012 09:10:24 -0500, Michael Butler > wrote: > > >- From the link (http://math-atlas.sourceforge.net/errata.html#WhatComp) > >that Steve Kargl referenced (dated July 2012). > > > I don't know where this guy is getting his info, but CLANG is /more/ > standards compliant and doesn't have an issue producing "correct" code. > Though it might not be the fastest (yet). > > And if Apple (probably one of the largest commercial CLANG users) doesn't > have an issue with it producing "incorrect" code why should we believe > this guy? Who does 'this guy' refer to? If it is me, then I get my information from the developer of ATLAS. The issue isn't conformance to a standard. The issue is whether clang generates correct code when floating point is concerned. From the ATLAS installation guide date 10 Jul 2012: In most cases, switching these compilers will get you worse performance and accuracy, even when you are absolutely sure it is a better compiler and flag combination! In particular, our timings indicated that clang was always slower on all platforms that gcc, and that it very often produced incorrect code. If 'this guy' refers to the author of ATLAS, then 'this guy' is R. Clint Whaley. It is fairly easy to find his home page and thus his credentials. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 17:14:35 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 BFAAC1065673; Tue, 11 Sep 2012 17:14:35 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8A22D8FC18; Tue, 11 Sep 2012 17:14:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=Message-Id:Cc:To:Date:From:Subject:Content-Type:Content-Transfer-Encoding:Mime-Version:References:In-Reply-To; bh=E3jFsxZdjqy00Yu6RPrpJBPT8R+156xyT4dSt4Il2Eo=; b=SjOfZOJ4KYruRLC2Shl3ill7Fa0CwiO5sApPubLaw3yNbsRXAicMqLOhuVTR+BNi0PYK2LEN9G4y/QFJKf+Vh0DaP38GAXULPPn9tS2t6+CJ5QxPvejkAG3ZpaehU5HA; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TBU2X-000Baa-Bh; Tue, 11 Sep 2012 12:14:26 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1347383655-70338-70337/5/5; Tue, 11 Sep 2012 17:14:15 +0000 User-Agent: K-9 Mail for Android In-Reply-To: <20120911170412.GA96297@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <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> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 From: Mark Felder Date: Tue, 11 Sep 2012 12:14:09 -0500 To: Steve Kargl Message-Id: <6a7877fa-190e-465e-ba11-e8506faa9ab7@email.android.com> X-SA-Report: ALL_TRUSTED=-1, KHOP_THREADED=-0.5 X-SA-Score: -1.5 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:14:35 -0000 "Clang produces incorrect code" vs "Clang's floating point has issues" = are two different arguments.=20 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 the maintainer can just force it to use the latest = GCC.=20 I'm not sure why Clang being default is somehow a problem for you? From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 17:19:52 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86F9D106566C; Tue, 11 Sep 2012 17:19:52 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 413208FC16; Tue, 11 Sep 2012 17:19:51 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 4539C7F38CB; Tue, 11 Sep 2012 19:19:48 +0200 (CEST) Date: Tue, 11 Sep 2012 19:19:48 +0200 From: Roman Divacky To: Steve Kargl Message-ID: <20120911171948.GA81334@freebsd.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <20120911151230.GB87526@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120911151230.GB87526@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toolchain@FreeBSD.org, Tijl Coosemans , Dimitry Andric , 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:19:52 -0000 On Tue, Sep 11, 2012 at 08:12:30AM -0700, Steve Kargl wrote: > On Tue, Sep 11, 2012 at 04:27:55PM +0200, Tijl Coosemans wrote: > > On 11-09-2012 16:10, Dimitry Andric wrote: > > > On 2012-09-11 15:24, Steve Kargl wrote: > > >> What is important is whether software built with clang functions > > >> correctly. See for example, > > >> > > >> http://math-atlas.sourceforge.net/errata.html#WhatComp > > > > > > Yes, maths support, specifically precision, is admittedly still one of > > > clang's (really llvm's) weaker points. It is currently not really a > > > high priority item for upstream. > > > > > > This is obviously something that a certain part of our userbase will > > > care a lot about, while most of the time they won't care so much about > > > licensing or politics. So those people are probably better off using > > > gcc for the time being. > > > > Does it affect the accuracy of libm functions? > > > > I'm not sure if anyone has done any extensive testing. > I've started to run some of my test codes to compare > certain functions in a clang-compiled libm, gcc-compiled > libm, and reference solutions generated from math/mpfr. > For a locally patched j0f, I found that clang gave > much worse accuracy. If I revert the local patch, > clang and gcc are to give the same results. Unfortnately, > an unpatched j0f gives 500000 ULP errors. Steve, Can you please provide a small self contained test case that shows that clang is doing worse on accuracy than gcc? So that we can analyze it and decide if it's a bug in the code or in the compiler. So far we know absolutely nothing. Thank you, Roman 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 From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 17:50:04 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 839561065673; Tue, 11 Sep 2012 17:50:04 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B45258FC1E; Tue, 11 Sep 2012 17:50:03 +0000 (UTC) Received: by obbun3 with SMTP id un3so1547840obb.13 for ; Tue, 11 Sep 2012 10:50:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IoKRW5GAuiGUyDxBLFlvneRGCPvKYUOjtbz4KVeHpjs=; b=0c4KHHMKhhRFihKStLGoqeR+r5Dy5mKClDQxQmNd3npD5NdpPzLZ3M89IQu6P2mUGv Uscf/NEtyQJd9ruEf3PtTIVA8eQxdXoh7dK5+s4vZSSuKskimMLp7rREkND3gstLmm0u 9vtIi4GAc/LuviKBBJWTNycHKjvfoBTdNDRWasESMmRQiqwp5TltOflU17xDlQKKH8PX bnjf3j+NXTbOgNLLGejQ9fg636U9xtIvVccCem5agUXMyPFKTpde9pF8qKbWPrCjVilp 9pV/W6XRcPT+cKMVWUc0CkQvyDR9qB+c1eKuh0eF2GgKbG69Wc0Wiyer8aZ2DuBhwzYa W5TA== MIME-Version: 1.0 Received: by 10.182.231.6 with SMTP id tc6mr19140692obc.63.1347385803031; Tue, 11 Sep 2012 10:50:03 -0700 (PDT) Received: by 10.76.83.130 with HTTP; Tue, 11 Sep 2012 10:50:02 -0700 (PDT) In-Reply-To: <20120911171948.GA81334@freebsd.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <20120911151230.GB87526@troutmask.apl.washington.edu> <20120911171948.GA81334@freebsd.org> Date: Tue, 11 Sep 2012 12:50:02 -0500 Message-ID: From: Adam Vande More To: Roman Divacky Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: toolchain@freebsd.org, Tijl Coosemans , Dimitry Andric , current@freebsd.org, Steve Kargl 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:50:04 -0000 On Tue, Sep 11, 2012 at 12:19 PM, Roman Divacky wrote: > > Can you please provide a small self contained test case that shows > that clang is doing worse on accuracy than gcc? > > So that we can analyze it and decide if it's a bug in the code or > in the compiler. So far we know absolutely nothing. > Not to speak for Steve, but he provided this information in another thread: http://lists.freebsd.org/pipermail/freebsd-current/2012-September/036410.html -- Adam Vande More From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 18:13:20 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 E5BD1106564A; Tue, 11 Sep 2012 18:13:20 +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 9E51C8FC15; Tue, 11 Sep 2012 18:13:20 +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 q8BIDHfr096877; Tue, 11 Sep 2012 11:13:17 -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 q8BIDHhb096876; Tue, 11 Sep 2012 11:13:17 -0700 (PDT) (envelope-from sgk) Date: Tue, 11 Sep 2012 11:13:17 -0700 From: Steve Kargl To: Roman Divacky Message-ID: <20120911181317.GB96512@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <20120911151230.GB87526@troutmask.apl.washington.edu> <20120911171948.GA81334@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120911171948.GA81334@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: toolchain@freebsd.org, Tijl Coosemans , Dimitry Andric , 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 18:13:21 -0000 On Tue, Sep 11, 2012 at 07:19:48PM +0200, Roman Divacky wrote: > On Tue, Sep 11, 2012 at 08:12:30AM -0700, Steve Kargl wrote: > > > > I'm not sure if anyone has done any extensive testing. > > I've started to run some of my test codes to compare > > certain functions in a clang-compiled libm, gcc-compiled > > libm, and reference solutions generated from math/mpfr. > > For a locally patched j0f, I found that clang gave > > much worse accuracy. If I revert the local patch, > > clang and gcc are to give the same results. Unfortnately, > > an unpatched j0f gives 500000 ULP errors. > > Steve, > > Can you please provide a small self contained test case that shows > that clang is doing worse on accuracy than gcc? > > So that we can analyze it and decide if it's a bug in the code or > in the compiler. So far we know absolutely nothing. > > Thank you, Roman Unfortunately, supplying a test is going to be problematic. I thought I had a diff in one of my development trees, so I reverted the working copy of msun/e_j0f.c to stock source. gcc and clang give consistent results with stock e_j0f.c. When I went to re-apply my local changes, I discovered that I no longer had a diff. I think I can recreate the problematic code, but it will need to wait until the weekend. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 18:23:04 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 01452106566C; Tue, 11 Sep 2012 18:23:04 +0000 (UTC) (envelope-from feld@feld.me) Received: from feld.me (unknown [IPv6:2607:f4e0:100:300::2]) by mx1.freebsd.org (Postfix) with ESMTP id B1B1F8FC12; Tue, 11 Sep 2012 18:23:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=feld.me; s=blargle; h=Message-Id:Cc:To:Date:From:Subject:Content-Type:Content-Transfer-Encoding:Mime-Version:References:In-Reply-To; bh=4PNGAgG2gWVlOC8rj68qqj8lmKXDHTJJk4drk7schgs=; b=eG5xDUJU0fz1USvE3CpM/tilF1o+jpnLPkz4TmmNwAazEd+dTfol4SLh4fnYZJGMCD5uMBD7xhmJCHU9GbxOQvY/+mTmoUz5rtz9l+U+mmEJyKYqiezURogTJ6HXW72c; Received: from localhost ([127.0.0.1] helo=mwi1.coffeenet.org) by feld.me with esmtp (Exim 4.80 (FreeBSD)) (envelope-from ) id 1TBV6m-000D6J-7Q; Tue, 11 Sep 2012 13:22:50 -0500 Received: from feld@feld.me by mwi1.coffeenet.org (Archiveopteryx 3.1.4) with esmtpa id 1347387762-70338-70337/5/6; Tue, 11 Sep 2012 18:22:42 +0000 User-Agent: K-9 Mail for Android In-Reply-To: <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> <20120911174818.GA96512@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 From: Mark Felder Date: Tue, 11 Sep 2012 13:21:20 -0500 To: Steve Kargl Message-Id: <5f99442a-9e17-4039-99b8-27a9e2d20ee2@email.android.com> X-SA-Report: ALL_TRUSTED=-1, KHOP_THREADED=-0.5 X-SA-Score: -1.5 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 18:23:04 -0000 Thank you for taking time to explain the situation. I don't follow as = closely as many on the current list do (and not subbed to toolchain).=20 I'm sure the libm situation is on many people's radar now. Hopefully = this can be resolved.=20 My apologies for being so daft :-) From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 20:44:19 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 796B4106566B; Tue, 11 Sep 2012 20:44:19 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id 546078FC0C; Tue, 11 Sep 2012 20:44:18 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id 1DCED5623C; Tue, 11 Sep 2012 15:44:18 -0500 (CDT) Date: Tue, 11 Sep 2012 15:44:18 -0500 From: Mark Linimon To: David Chisnall Message-ID: <20120911204418.GB15014@lonesome.com> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <004BADDB-E79D-4497-89EE-641F0359E9BE@FreeBSD.org> <504EF3ED.7050502@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: toolchain@freebsd.org, Dimitry Andric , 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 20:44:19 -0000 On Tue, Sep 11, 2012 at 10:07:04AM +0100, David Chisnall wrote: > There is some logic in the clang driver already for knowing when it is > invoked as gcc. I'd be quite tempted to make gcc a symlink to clang > and make clang default to gnu89 when invoked in that way. And how then does a port say "I don't compile with clang no matter how it is invoked"? mcl From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 21:22:55 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D348D1065672; Tue, 11 Sep 2012 21:22:55 +0000 (UTC) (envelope-from patfbsd@davenulle.org) Received: from smtp.lamaiziere.net (net.lamaiziere.net [94.23.254.147]) by mx1.freebsd.org (Postfix) with ESMTP id 97C158FC08; Tue, 11 Sep 2012 21:22:55 +0000 (UTC) Received: from baby-jane.lamaiziere.net (unknown [192.168.1.10]) by smtp.lamaiziere.net (Postfix) with ESMTP id A65F3C4BE; Tue, 11 Sep 2012 23:22:47 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by baby-jane.lamaiziere.net (Postfix) with ESMTP id E2E802CEC18; Tue, 11 Sep 2012 23:22:45 +0200 (CEST) Date: Tue, 11 Sep 2012 23:22:44 +0200 From: Patrick Lamaiziere To: toolchain@freebsd.org Message-ID: <20120911232244.1cadc5b5@davenulle.org> In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> References: <20120910211207.GC64920@lor.one-eyed-alien.net> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.6; i386-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: 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 21:22:55 -0000 Le Mon, 10 Sep 2012 16:12:07 -0500, Brooks Davis a écrit : Hello, > 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. Last time I've checked on 9.X [mid August, FreeBSD clang version 3.1 (branches/release_31 156863) 20120523], Clang still produces invalid code (some nopl (%eax)) for the AMD Geode LX (i586 CPU found on some ALIX board or Soekris NET5501). I don't know if this is also a concern with older CPU (Pentium 2/1) ? http://llvm.org/bugs/show_bug.cgi?id=11212 http://lists.freebsd.org/pipermail/freebsd-current/2011-October/028588.html http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/168253 > What does the mean to you? Well, I will not be able to run FreeBSD from scratch on my soekris :-) Best regards. From owner-freebsd-toolchain@FreeBSD.ORG Tue Sep 11 22:31:41 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2C7AA106566B; Tue, 11 Sep 2012 22:31:41 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9EBE18FC12; Tue, 11 Sep 2012 22:31:40 +0000 (UTC) Received: by obbun3 with SMTP id un3so2061903obb.13 for ; Tue, 11 Sep 2012 15:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=O7jcvSv+BmqZsbXtE7DBoveUrzFjH65sEs5i/CuKIfs=; b=O13WIcA/7ld0Y+J0qKg1niKBssZ8hR2X4N+CEcbAGbXBtjxgnVe01FLlp9o/Oa1QZ1 aDFryxqhkqkhDi/8i4h29W8d8Jr1Owh5ZT7Le9GzsK3VwswDs568cnQJZsSBhLLaz5CL wQP3KGFE7/5h5V6SIoZw4p9j1OAOOFFkOGOB4jQwnzFF3c6V/eTzJHZL6kJJGHW10B56 NXNhCP8uetEMiJnsPJn0X4h7HQFwAySTpRyxkpxL4MEao2+IJAgAASkaFIehWRvEO7bA MklBoZJWlVxDjjnJ1CHYOZg400ViuYunQm/ySQxJgSHX3aYBYyTWdKSG2vjre8utYUSk 3/Ng== MIME-Version: 1.0 Received: by 10.60.29.164 with SMTP id l4mr20687244oeh.4.1347402700116; Tue, 11 Sep 2012 15:31:40 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Tue, 11 Sep 2012 15:31:39 -0700 (PDT) In-Reply-To: <20120911204418.GB15014@lonesome.com> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <004BADDB-E79D-4497-89EE-641F0359E9BE@FreeBSD.org> <504EF3ED.7050502@FreeBSD.org> <20120911204418.GB15014@lonesome.com> Date: Tue, 11 Sep 2012 15:31:39 -0700 Message-ID: From: Garrett Cooper To: Mark Linimon Content-Type: text/plain; charset=ISO-8859-1 Cc: toolchain@freebsd.org, Dimitry Andric , 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 22:31:41 -0000 On Tue, Sep 11, 2012 at 1:44 PM, Mark Linimon wrote: > On Tue, Sep 11, 2012 at 10:07:04AM +0100, David Chisnall wrote: >> There is some logic in the clang driver already for knowing when it is >> invoked as gcc. I'd be quite tempted to make gcc a symlink to clang >> and make clang default to gnu89 when invoked in that way. > > And how then does a port say "I don't compile with clang no matter how > it is invoked"? Here's one way: $ clang -dumpspecs clang: error: unsupported option '-dumpspecs' clang: error: no input files $ gcc -dumpspecs | grep -q gcc && echo "gotcha" gotcha $ Also, $ cat Makefile .if !empty(CC:M*clang*) || !empty(CXX:M*clang*) IGNORE= does not compile with clang .warning ${IGNORE} .endif all: $ make CXX=clang++ "Makefile", line 3: warning: does not compile with clang $ make CXX=g++ $ But I figured that's probably done elsewhere I bit more sanely. Thanks, -Garrett From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 01:29:05 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C21441065672 for ; Wed, 12 Sep 2012 01:29:05 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from rush.bluerosetech.com (rush.bluerosetech.com [199.48.134.58]) by mx1.freebsd.org (Postfix) with ESMTP id 9BC228FC12 for ; Wed, 12 Sep 2012 01:29:05 +0000 (UTC) Received: from vivi.cat.pdx.edu (vivi.cat.pdx.edu [IPv6:2610:10:20:214::6]) by rush.bluerosetech.com (Postfix) with ESMTPSA id 65FD81141D for ; Tue, 11 Sep 2012 18:28:58 -0700 (PDT) Received: from [127.0.0.1] (c-76-27-220-79.hsd1.wa.comcast.net [76.27.220.79]) by vivi.cat.pdx.edu (Postfix) with ESMTPSA id 6E7C124CDF for ; Tue, 11 Sep 2012 18:28:57 -0700 (PDT) Message-ID: <504FE55C.8040308@bluerosetech.com> Date: Tue, 11 Sep 2012 18:29:00 -0700 From: Darren Pilgrim User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.6esrpre) Gecko/20120713 Thunderbird/10.0.6 MIME-Version: 1.0 To: toolchain@freebsd.org References: <20120910211207.GC64920@lor.one-eyed-alien.net> In-Reply-To: <20120910211207.GC64920@lor.one-eyed-alien.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: 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: Wed, 12 Sep 2012 01:29:05 -0000 On 2012-09-10 14:12, Brooks Davis wrote: > [Please confine your replies to toolchain@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. Just to be clear, this change will only apply to 10-current, 10.0-R and higher-numbered releases and branches, correct? That is, it won't apply to RELENG_9 and earlier? From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 08:43:49 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 98B8E106564A for ; Wed, 12 Sep 2012 08:43:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4FCBB8FC15 for ; Wed, 12 Sep 2012 08:43:48 +0000 (UTC) Received: by obbun3 with SMTP id un3so2797530obb.13 for ; Wed, 12 Sep 2012 01:43:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=9HgzWaalUKIwegdIRDf3h+MQjEiZlhECRqyq5s415Gk=; b=dOgGcLCvKLPiCy3Ardpk56/wfcOCFuUihQ3bP2x8iBPJ4qJgwRJ3QSi60rhrVcUH0V QDJSZqThlV+LcJNmrwYzTjuS8wLwjIkQLIeGtMU0OBpoUAmFaw9PomcSKCOoa4Nz2Rmb 8b53a1Noo/ma6QmRRjQY2yFgv2sXc3AnL0SAB2O2mzAr9zK7Mlq84qiF94pMzD0loZyK e8SIxOCWU1STAc00sxMCFFPL4K/akfh1Da8XwV5m5R/7p9odQsclNonotAf8deDvTXA9 gQPhczuSRGvB1C8H41urNoxN1tJDP8uA+bfXT3YaJbliOmm4XSGzkDMAagcnHiL5mjXf X5uQ== Received: by 10.182.64.52 with SMTP id l20mr20921233obs.99.1347439428213; Wed, 12 Sep 2012 01:43:48 -0700 (PDT) Received: from [192.168.1.105] (ppp-70-252-140-146.dsl.ksc2mo.swbell.net. [70.252.140.146]) by mx.google.com with ESMTPS id a3sm15606975oeb.6.2012.09.12.01.43.40 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 01:43:41 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20120910215656.GD64920@lor.one-eyed-alien.net> Date: Wed, 12 Sep 2012 03:43:39 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <5242C5EF-B357-4EBA-8302-2C836ECC01BB@bsdimp.com> References: <20120910215656.GD64920@lor.one-eyed-alien.net> To: Brooks Davis X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQmTL1vRvsRch8sHxr9LO6ERHZpn+WoWo2CHD0c5okCPZokMRWG32QOMjh9tsSuC371L5i7C Cc: toolchain@freebsd.org Subject: Re: improving bootstrapping of WITH_CLANG_IS_CC 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: Wed, 12 Sep 2012 08:43:49 -0000 On Sep 10, 2012, at 4:56 PM, Brooks Davis wrote: > .if ${COMPILER_TYPE} !=3D "clang" >=20 > I'd like to commit this in the next few days unless there are = objections > requiring a major redesign. Due to other $LIFE happening, I just scanned the patch, but I really = like it. I'd also propose a COMPILER_VERSION variable be reserved so that can be = set so that variations in compiler versions can be comprehended in the = tree to allow easier external toolchain support as well. I have no impl = for this yet, but just thought I'd put a bug in people's ear. Warner From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 09:09:20 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 688191065688 for ; Wed, 12 Sep 2012 09:09:20 +0000 (UTC) (envelope-from dougb@dougbarton.us) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id D17C78FC1E for ; Wed, 12 Sep 2012 09:09:19 +0000 (UTC) Received: (qmail 11560 invoked by uid 399); 12 Sep 2012 09:09:09 -0000 Received: from udp290486uds.hawaiiantel.net (HELO ?192.168.1.30?) (dougb@dougbarton.us@72.253.187.69) by mail2.fluidhosting.com with ESMTPAM; 12 Sep 2012 09:09:09 -0000 X-Originating-IP: 72.253.187.69 X-Sender: dougb@dougbarton.us Message-ID: <5050513C.7040100@dougbarton.us> Date: Tue, 11 Sep 2012 23:09:16 -1000 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Steve Kargl References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <20120911150356.GA87526@troutmask.apl.washington.edu> In-Reply-To: <20120911150356.GA87526@troutmask.apl.washington.edu> X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: toolchain@FreeBSD.org, Roman Divacky , Dimitry Andric , 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: Wed, 12 Sep 2012 09:09:20 -0000 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 From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 09:15:21 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF776106564A; Wed, 12 Sep 2012 09:15:21 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id B58078FC15; Wed, 12 Sep 2012 09:15:21 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id DC0E15623C; Wed, 12 Sep 2012 04:15:20 -0500 (CDT) Date: Wed, 12 Sep 2012 04:15:20 -0500 From: Mark Linimon To: Lars Engels Message-ID: <20120912091520.GB22971@lonesome.com> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <504ED1FC.3090608@FreeBSD.org> <20120911092750.GF20762@e-new.0x20.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120911092750.GF20762@e-new.0x20.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: toolchain@FreeBSD.org, Doug Barton , current@FreeBSD.org, Brooks Davis , freebsd-ports@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: Wed, 12 Sep 2012 09:15:22 -0000 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 From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 09:22:42 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 9175A1065677; Wed, 12 Sep 2012 09:22:42 +0000 (UTC) (envelope-from mark@exonetric.com) Received: from relay.exonetric.net (relay0.exonetric.net [178.250.72.161]) by mx1.freebsd.org (Postfix) with ESMTP id 5136A8FC20; Wed, 12 Sep 2012 09:22:41 +0000 (UTC) Received: from markimac.fairfx.local (unknown [62.244.179.74]) by relay.exonetric.net (Postfix) with ESMTPSA id 394102C84A; Wed, 12 Sep 2012 10:22:35 +0100 (BST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: Mark Blackman In-Reply-To: <20120912091520.GB22971@lonesome.com> Date: Wed, 12 Sep 2012 10:22:50 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <4B225530-48DD-4671-AAF4-53BC46BB628B@exonetric.com> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <504ED1FC.3090608@FreeBSD.org> <20120911092750.GF20762@e-new.0x20.net> <20120912091520.GB22971@lonesome.com> To: Mark Linimon X-Mailer: Apple Mail (2.1486) Cc: Doug Barton , Lars Engels , toolchain@FreeBSD.org, Brooks Davis , freebsd-ports@FreeBSD.org, 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: Wed, 12 Sep 2012 09:22:42 -0000 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. >=20 > I think this is a mis-representation. >=20 > 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: >=20 > (FreeBSD 7|8|9|10) * (amd64|arm|i386|powerpc|sparc64) * (base gcc|base = clang) >=20 > 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. >=20 >> Those who don't run CURRENT won't notice, but those who do will have = to >> get their butts up and fix the ports >=20 > 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=20 except maybe macports who try to run clang over some much 3rd party code = and=20 so FreeBSD ports is hitting all the bumps in the road that most people = get to ignore. - Mark From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 09:29:54 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 5FF67106566B; Wed, 12 Sep 2012 09:29:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 8FC1C14E1BA; Wed, 12 Sep 2012 09:29:27 +0000 (UTC) Message-ID: <505055F7.9020809@FreeBSD.org> Date: Tue, 11 Sep 2012 23:29:27 -1000 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Erik Cederstrand References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> In-Reply-To: <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: toolchain@freebsd.org, current@freebsd.org, freebsd-ports 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: Wed, 12 Sep 2012 09:29:54 -0000 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 From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 09:32:56 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 89881106566B; Wed, 12 Sep 2012 09:32:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id AE5AB14EC0B; Wed, 12 Sep 2012 09:32:55 +0000 (UTC) Message-ID: <505056C7.6010209@FreeBSD.org> Date: Tue, 11 Sep 2012 23:32:55 -1000 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120827 Thunderbird/15.0 MIME-Version: 1.0 To: Mark Linimon References: <20120910211207.GC64920@lor.one-eyed-alien.net> <504ED1FC.3090608@FreeBSD.org> <20120911092750.GF20762@e-new.0x20.net> <20120912091520.GB22971@lonesome.com> In-Reply-To: <20120912091520.GB22971@lonesome.com> X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: toolchain@FreeBSD.org, Brooks Davis , Lars Engels , freebsd-ports@FreeBSD.org, 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: Wed, 12 Sep 2012 09:32:56 -0000 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 From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 09:58: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 4C9C6106566C; Wed, 12 Sep 2012 09:58:28 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 09DEA8FC14; Wed, 12 Sep 2012 09:58:27 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id E443E7F38AE; Wed, 12 Sep 2012 11:58:24 +0200 (CEST) Date: Wed, 12 Sep 2012 11:58:24 +0200 From: Roman Divacky To: Patrick Lamaiziere Message-ID: <20120912095824.GA65000@freebsd.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911232244.1cadc5b5@davenulle.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120911232244.1cadc5b5@davenulle.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toolchain@freebsd.org, 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: Wed, 12 Sep 2012 09:58:28 -0000 Fwiw, I plan to fix this issue, but even if I didnt. This isnt a problem in clang rather than in llvm asm. So it can be easily worked around by CFLAGS+=-no-integrated-as. Roman On Tue, Sep 11, 2012 at 11:22:44PM +0200, Patrick Lamaiziere wrote: > Le Mon, 10 Sep 2012 16:12:07 -0500, > Brooks Davis a ?crit : > > Hello, > > > 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. > > Last time I've checked on 9.X [mid August, FreeBSD clang version 3.1 > (branches/release_31 156863) 20120523], Clang still produces invalid > code (some nopl (%eax)) for the AMD Geode LX (i586 CPU found on some > ALIX board or Soekris NET5501). I don't know if this is also a concern > with older CPU (Pentium 2/1) ? > > http://llvm.org/bugs/show_bug.cgi?id=11212 > http://lists.freebsd.org/pipermail/freebsd-current/2011-October/028588.html > http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/168253 > > > What does the mean to you? > > Well, I will not be able to run FreeBSD from scratch on my soekris :-) > > Best regards. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 10:46:30 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0D6D91065670; Wed, 12 Sep 2012 10:46:30 +0000 (UTC) (envelope-from erik@cederstrand.dk) Received: from csmtp2.one.com (csmtp2.one.com [91.198.169.22]) by mx1.freebsd.org (Postfix) with ESMTP id BB8158FC0A; Wed, 12 Sep 2012 10:46:29 +0000 (UTC) Received: from [192.168.1.18] (unknown [217.157.7.221]) by csmtp2.one.com (Postfix) with ESMTPA id 03533308240F; Wed, 12 Sep 2012 10:40:29 +0000 (UTC) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1486\)) From: Erik Cederstrand In-Reply-To: <505055F7.9020809@FreeBSD.org> Date: Wed, 12 Sep 2012 12:40:28 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> <505055F7.9020809@FreeBSD.org> To: Doug Barton X-Mailer: Apple Mail (2.1486) Cc: toolchain@freebsd.org, current@freebsd.org, freebsd-ports 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: Wed, 12 Sep 2012 10:46:30 -0000 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=3D4.2 until they can actually build with clang? >=20 > 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= From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 11:49:50 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA383106564A; Wed, 12 Sep 2012 11:49:50 +0000 (UTC) (envelope-from theraven@theravensnest.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 9034F8FC1A; Wed, 12 Sep 2012 11:49:50 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id q8CBniUt025904 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 12 Sep 2012 11:49:45 GMT (envelope-from theraven@theravensnest.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: <5050513C.7040100@dougbarton.us> Date: Wed, 12 Sep 2012 12:49:44 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <7778270C-218B-4F23-9941-D6DBED8E054D@theravensnest.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <20120911150356.GA87526@troutmask.apl.washington.edu> <5050513C.7040100@dougbarton.us> To: Doug Barton X-Mailer: Apple Mail (2.1278) Cc: toolchain@freebsd.org, Dimitry Andric , current@freebsd.org, Steve Kargl 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: Wed, 12 Sep 2012 11:49:50 -0000 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. David Current hat: LLVM / Clang developer.= From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 12:49:52 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B3B97106564A; Wed, 12 Sep 2012 12:49:52 +0000 (UTC) (envelope-from yamayan@kbh.biglobe.ne.jp) Received: from rcpt-expgw.biglobe.ne.jp (rcpt-expgw.biglobe.ne.jp [IPv6:2001:260:401:16::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2DCC68FC17; Wed, 12 Sep 2012 12:49:51 +0000 (UTC) Received: from vc-gw.biglobe.ne.jp by rcpt-expgw.biglobe.ne.jp (shby/5910021009) with SMTP id q8CCnopS022872; Wed, 12 Sep 2012 21:49:50 +0900 Received: from smtp-gw.biglobe.ne.jp ([172.21.56.79]) by vc-gw.biglobe.ne.jp (kbkr/0716090908) with ESMTP id q8CCnooI017589; Wed, 12 Sep 2012 21:49:50 +0900 X-Biglobe-Sender: Received: from [192.168.0.100] ([27.83.60.20]) by smtp-gw.biglobe.ne.jp id VAFDAC15380F; Wed, 12 Sep 2012 21:49:50 +0900 (JST) Message-ID: <505084EF.2010903@kbh.biglobe.ne.jp> Date: Wed, 12 Sep 2012 21:49:51 +0900 From: Yamaya Takashi User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120911 Thunderbird/15.0 MIME-Version: 1.0 To: freebsd-toolchain@freebsd.org, brooks@freebsd.org Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Cc: Subject: Re: improving bootstrapping of WITH_CLANG_IS_CC 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: Wed, 12 Sep 2012 12:49:52 -0000 In Makefile.inc1, both WMAKECOMPILER_TYPE and WMAKE_COMPILER_TYPE exist. It's maybe bug. From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 13:03:45 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36126106566B; Wed, 12 Sep 2012 13:03:45 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) by mx1.freebsd.org (Postfix) with ESMTP id B81848FC1A; Wed, 12 Sep 2012 13:03:44 +0000 (UTC) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id AD6296A6001; Wed, 12 Sep 2012 15:03:43 +0200 (CEST) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.5/8.14.5) with ESMTP id q8CD3h61075031; Wed, 12 Sep 2012 15:03:43 +0200 (CEST) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.5/8.14.5/Submit) id q8CD3h10074544; Wed, 12 Sep 2012 15:03:43 +0200 (CEST) (envelope-from lars) Date: Wed, 12 Sep 2012 15:03:43 +0200 From: Lars Engels To: Mark Linimon Message-ID: <20120912130343.GL20762@e-new.0x20.net> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <504ED1FC.3090608@FreeBSD.org> <20120911092750.GF20762@e-new.0x20.net> <20120912091520.GB22971@lonesome.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EecmvZxDifkbrwfl" Content-Disposition: inline In-Reply-To: <20120912091520.GB22971@lonesome.com> X-Editor: VIM - Vi IMproved 7.3 X-Operation-System: FreeBSD 8.3-RELEASE-p2 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toolchain@FreeBSD.org, Doug Barton , current@FreeBSD.org, Brooks Davis , freebsd-ports@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: Wed, 12 Sep 2012 13:03:45 -0000 --EecmvZxDifkbrwfl Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > I think this is a mis-representation. >=20 > 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: >=20 > (FreeBSD 7|8|9|10) * (amd64|arm|i386|powerpc|sparc64) * (base gcc|base cl= ang) >=20 > It is completely insane to expect anyone to be able to test in all of tho= se > 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. >=20 > > Those who don't run CURRENT won't notice, but those who do will have to > > get their butts up and fix the ports >=20 > 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 w= ith > 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 --EecmvZxDifkbrwfl Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBQiC8ACgkQKc512sD3afgPvwCfUyxrjhOorLhdD74FRpsjBNWf Vf0AoIJbcpU2aWUOjrCvEmIytFESK1gI =ARp/ -----END PGP SIGNATURE----- --EecmvZxDifkbrwfl-- From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 13:20:31 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 8BA51106566B; Wed, 12 Sep 2012 13:20:31 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.server1.bsdforen.de (bsdforen.de [82.193.243.81]) by mx1.freebsd.org (Postfix) with ESMTP id 444FF8FC14; Wed, 12 Sep 2012 13:20:30 +0000 (UTC) Received: from mobileKamikaze.norad (MN-VPN2.HS-Karlsruhe.DE [193.196.117.63]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.server1.bsdforen.de (Postfix) with ESMTPSA id 86AE67E884; Wed, 12 Sep 2012 15:13:16 +0200 (CEST) Message-ID: <50508A6C.1090009@bsdforen.de> Date: Wed, 12 Sep 2012 15:13:16 +0200 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120807 Thunderbird/14.0 MIME-Version: 1.0 To: Chuck Burns References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120910220119.GE64920@lor.one-eyed-alien.net> In-Reply-To: Content-Type: text/plain; charset=ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , toolchain@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: Wed, 12 Sep 2012 13:20:31 -0000 On 11/09/2012 00:35, Chuck Burns wrote: > On Mon, Sep 10, 2012 at 5:01 PM, Brooks Davis wrote: > ... > > For those worrying about "zomg, my system wont work?!" Remember.. > This is a -current thing. If you're running bleeding edge, you have to > expect to get cut every now and then. This is the perfect summary of what I think about this! -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 14:40:40 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 8E8F91065676 for ; Wed, 12 Sep 2012 14:40:40 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id EC8B98FC12 for ; Wed, 12 Sep 2012 14:40:39 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8CEeVqZ085551; Wed, 12 Sep 2012 09:40:31 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8CEeUiw085550; Wed, 12 Sep 2012 09:40:30 -0500 (CDT) (envelope-from brooks) Date: Wed, 12 Sep 2012 09:40:30 -0500 From: Brooks Davis To: Darren Pilgrim Message-ID: <20120912144030.GA77434@lor.one-eyed-alien.net> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <504FE55C.8040308@bluerosetech.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: <504FE55C.8040308@bluerosetech.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toolchain@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: Wed, 12 Sep 2012 14:40:40 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 11, 2012 at 06:29:00PM -0700, Darren Pilgrim wrote: > On 2012-09-10 14:12, Brooks Davis wrote: > > [Please confine your replies to toolchain@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. >=20 > Just to be clear, this change will only apply to 10-current, 10.0-R and= =20 > higher-numbered releases and branches, correct? That is, it won't apply= =20 > to RELENG_9 and earlier? Yes. We have no current plans to change the default on older branches. I do plan to merge changes that make it easier for users to choose clang as their base system compiler on 9-STABLE, but changing the compiler would be a terrible idea. -- Brooks --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQUJ7eXY6L6fI4GtQRAjXNAKC9cCgLEgSLJYDzpo4W+wUXMjB01QCfeBrH HldAB8J+iQOROcMAFyPNlv0= =Vxk9 -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q-- From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 14:48:24 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 05ABA106566B for ; Wed, 12 Sep 2012 14:48:24 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 508928FC19 for ; Wed, 12 Sep 2012 14:48:23 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8CEmL9Z085604; Wed, 12 Sep 2012 09:48:21 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8CEmLJr085603; Wed, 12 Sep 2012 09:48:21 -0500 (CDT) (envelope-from brooks) Date: Wed, 12 Sep 2012 09:48:21 -0500 From: Brooks Davis To: Warner Losh Message-ID: <20120912144821.GB77434@lor.one-eyed-alien.net> References: <20120910215656.GD64920@lor.one-eyed-alien.net> <5242C5EF-B357-4EBA-8302-2C836ECC01BB@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="l76fUT7nc3MelDdI" Content-Disposition: inline In-Reply-To: <5242C5EF-B357-4EBA-8302-2C836ECC01BB@bsdimp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: toolchain@freebsd.org Subject: Re: improving bootstrapping of WITH_CLANG_IS_CC 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: Wed, 12 Sep 2012 14:48:24 -0000 --l76fUT7nc3MelDdI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 12, 2012 at 03:43:39AM -0500, Warner Losh wrote: >=20 > On Sep 10, 2012, at 4:56 PM, Brooks Davis wrote: > > .if ${COMPILER_TYPE} !=3D "clang" > >=20 > > I'd like to commit this in the next few days unless there are objections > > requiring a major redesign. >=20 > Due to other $LIFE happening, I just scanned the patch, but I really like= it. >=20 > I'd also propose a COMPILER_VERSION variable be reserved so that can be s= et so that variations in compiler versions can be comprehended in the tree = to allow easier external toolchain support as well. I have no impl for thi= s yet, but just thought I'd put a bug in people's ear. I think we'll likely want something like or a COMPILER_FEATURES variable eventually. For the moment I'm avoiding implementing it to avoid the problems associated with generalizing from no examples. One of the ideas we talked about at the devsummit was allowing external toolchains to provide a makefile to drive things like CFLAGS for WARNS. I think this would be a very good approach since it could allow a much broader range of compilers without necessarily requiring FreeBSD developers to know about all the possible variants. -- Brooks --l76fUT7nc3MelDdI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQUKC0XY6L6fI4GtQRAjO6AJ9adtn82F505Y9X/eErpc3wH5SLWgCg4p1C LlQHV5a2MpuaW0GjD7boBlw= =KQHx -----END PGP SIGNATURE----- --l76fUT7nc3MelDdI-- From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 14:56:27 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DCDD4106564A; Wed, 12 Sep 2012 14:56:27 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id B670A8FC08; Wed, 12 Sep 2012 14:56:27 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id A7CAF5623C; Wed, 12 Sep 2012 09:56:26 -0500 (CDT) Date: Wed, 12 Sep 2012 09:56:26 -0500 From: Mark Linimon To: Lars Engels Message-ID: <20120912145626.GA15977@lonesome.com> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <504ED1FC.3090608@FreeBSD.org> <20120911092750.GF20762@e-new.0x20.net> <20120912091520.GB22971@lonesome.com> <20120912130343.GL20762@e-new.0x20.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120912130343.GL20762@e-new.0x20.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: toolchain@FreeBSD.org, Doug Barton , current@FreeBSD.org, Brooks Davis , freebsd-ports@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: Wed, 12 Sep 2012 14:56:28 -0000 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 From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 15:01:16 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31DDB1065687 for ; Wed, 12 Sep 2012 15:01:16 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 8226C8FC17 for ; Wed, 12 Sep 2012 15:01:15 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8CF1FoF085719; Wed, 12 Sep 2012 10:01:15 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8CF1Ef4085718; Wed, 12 Sep 2012 10:01:14 -0500 (CDT) (envelope-from brooks) Date: Wed, 12 Sep 2012 10:01:14 -0500 From: Brooks Davis To: Yamaya Takashi Message-ID: <20120912150114.GC77434@lor.one-eyed-alien.net> References: <505084EF.2010903@kbh.biglobe.ne.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="da4uJneut+ArUgXk" Content-Disposition: inline In-Reply-To: <505084EF.2010903@kbh.biglobe.ne.jp> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-toolchain@freebsd.org Subject: Re: improving bootstrapping of WITH_CLANG_IS_CC 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: Wed, 12 Sep 2012 15:01:16 -0000 --da4uJneut+ArUgXk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 12, 2012 at 09:49:51PM +0900, Yamaya Takashi wrote: > In Makefile.inc1, > both WMAKECOMPILER_TYPE and WMAKE_COMPILER_TYPE exist. > It's maybe bug. It is. I'm not actually sure why it didn't result in more invocations of gcc in my test. I'm testing a fix now. -- Brooks --da4uJneut+ArUgXk Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQUKO6XY6L6fI4GtQRAl+nAJoDbmfpqGHzPrSXvs45Q3sHbFCnwwCgr/pX dfZl9zxdR8XZcvXrrMYadhg= =gn+C -----END PGP SIGNATURE----- --da4uJneut+ArUgXk-- From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 15:19:19 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 49F7D1065670; Wed, 12 Sep 2012 15:19:19 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 05E3A8FC0A; Wed, 12 Sep 2012 15:19:18 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:31e6:f1e:dd72:edd6]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id EEE684AC2D; Wed, 12 Sep 2012 19:19:11 +0400 (MSK) Date: Wed, 12 Sep 2012 19:19:07 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <192201737.20120912191907@serebryakov.spb.ru> To: Patrick Lamaiziere In-Reply-To: <20120911232244.1cadc5b5@davenulle.org> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911232244.1cadc5b5@davenulle.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: toolchain@freebsd.org, 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 Reply-To: lev@FreeBSD.org List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2012 15:19:19 -0000 Hello, Patrick. You wrote 12 =F1=E5=ED=F2=FF=E1=F0=FF 2012 =E3., 1:22:44: PL> Well, I will not be able to run FreeBSD from scratch on my soekris :-) Thank you for warning, I've missed this. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 20:50:22 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 386751065676 for ; Wed, 12 Sep 2012 20:50:22 +0000 (UTC) (envelope-from dougb@dougbarton.us) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 9E9778FC21 for ; Wed, 12 Sep 2012 20:50:21 +0000 (UTC) Received: (qmail 8203 invoked by uid 399); 12 Sep 2012 20:50:08 -0000 Received: from pluto.wwt.com (HELO ?172.29.3.77?) (dougb@dougbarton.us@198.200.139.3) by mail2.fluidhosting.com with ESMTPAM; 12 Sep 2012 20:50:08 -0000 X-Originating-IP: 198.200.139.3 X-Sender: dougb@dougbarton.us Message-ID: <5050F587.6010105@dougbarton.us> Date: Wed, 12 Sep 2012 10:50:15 -1000 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: David Chisnall References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <20120911150356.GA87526@troutmask.apl.washington.edu> <5050513C.7040100@dougbarton.us> <7778270C-218B-4F23-9941-D6DBED8E054D@theravensnest.org> In-Reply-To: <7778270C-218B-4F23-9941-D6DBED8E054D@theravensnest.org> X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: toolchain@freebsd.org, Dimitry Andric , current@freebsd.org, Steve Kargl 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: Wed, 12 Sep 2012 20:50:22 -0000 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 From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 20:55:17 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by hub.freebsd.org (Postfix) with ESMTP id 297601065670; Wed, 12 Sep 2012 20:55:17 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 86EDF1523B6; Wed, 12 Sep 2012 20:53:51 +0000 (UTC) Message-ID: <5050F65E.1040901@FreeBSD.org> Date: Wed, 12 Sep 2012 10:53:50 -1000 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Erik Cederstrand References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> <505055F7.9020809@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.4.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: toolchain@freebsd.org, current@freebsd.org, freebsd-ports 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: Wed, 12 Sep 2012 20:55:17 -0000 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 From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 22:42:34 2012 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1AFE106564A; Wed, 12 Sep 2012 22:42:34 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id AD0AD8FC08; Wed, 12 Sep 2012 22:42:34 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0MA900D02AYSJQ00@smtpauth2.wiscmail.wisc.edu>; Wed, 12 Sep 2012 16:42:28 -0500 (CDT) Received: from wanderer.tachypleus.net ([unknown] [128.104.255.7]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0MA9000BSAYRAQ20@smtpauth2.wiscmail.wisc.edu>; Wed, 12 Sep 2012 16:42:28 -0500 (CDT) Date: Wed, 12 Sep 2012 16:42:27 -0500 From: Nathan Whitehorn In-reply-to: <504F5101.8090906@FreeBSD.org> To: Dimitry Andric Message-id: <505101C3.70203@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=128.104.255.7 X-Spam-PmxInfo: Server=avs-14, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.9.12.213030, SenderIP=128.104.255.7 References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120502 Thunderbird/12.0 Cc: toolchain@FreeBSD.org, Tijl Coosemans , current@FreeBSD.org, Steve Kargl 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: Wed, 12 Sep 2012 22:42:35 -0000 On 09/11/12 09:56, Dimitry Andric wrote: > On 2012-09-11 16:27, Tijl Coosemans wrote:> On 11-09-2012 16:10, > Dimitry Andric wrote: > ... >>> Yes, maths support, specifically precision, is admittedly still one of >>> clang's (really llvm's) weaker points. It is currently not really a >>> high priority item for upstream. >>> >>> This is obviously something that a certain part of our userbase will >>> care a lot about, while most of the time they won't care so much about >>> licensing or politics. So those people are probably better off using >>> gcc for the time being. >> >> Does it affect the accuracy of libm functions? > > It seems to, at least in specific cases; Steve posted about this in an > earlier thread on -current: > > http://docs.freebsd.org/cgi/mid.cgi?20120905221310.GA97847 > _______________________________________________ If true, this is a serious problem, especially for those of us who use FreeBSD in a scientific computing environment. -Nathan From owner-freebsd-toolchain@FreeBSD.ORG Wed Sep 12 23:22:56 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 D9BD4106566B; Wed, 12 Sep 2012 23:22:56 +0000 (UTC) (envelope-from gerald@pfeifer.com) Received: from ainaz.pair.com (ainaz.pair.com [209.68.2.66]) by mx1.freebsd.org (Postfix) with ESMTP id B38438FC08; Wed, 12 Sep 2012 23:22:56 +0000 (UTC) Received: from k17.suse.de (charybdis-ext.suse.de [195.135.221.2]) by ainaz.pair.com (Postfix) with ESMTPSA id 561033F40F; Wed, 12 Sep 2012 19:22:49 -0400 (EDT) Date: Thu, 13 Sep 2012 01:22:46 +0200 (CEST) From: Gerald Pfeifer To: toolchain@freebsd.org In-Reply-To: <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> Message-ID: References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: 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: Wed, 12 Sep 2012 23:22:57 -0000 On Tue, 11 Sep 2012, 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? This could allow > the clang switch to proceed. Hopefully, waiting for GCC to compile just > to install some tiny port will be enough of a nuisance for people to > eventually fix the remaining ports. To make it less painful, I just adjusted lang/gcc42 to not boostrap any more, rather just build. This allows for a full build in ten or less minutes on an old quad core I used for testing. Gerald From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 13 02:08:44 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 63EE4106564A; Thu, 13 Sep 2012 02:08:44 +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 338AC8FC08; Thu, 13 Sep 2012 02:08:44 +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 q8D28Ywa008402; Wed, 12 Sep 2012 19:08:34 -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 q8D28XT8008401; Wed, 12 Sep 2012 19:08:33 -0700 (PDT) (envelope-from sgk) Date: Wed, 12 Sep 2012 19:08:33 -0700 From: Steve Kargl To: Nathan Whitehorn Message-ID: <20120913020833.GA8255@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <505101C3.70203@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: toolchain@freebsd.org, Tijl Coosemans , Dimitry Andric , 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: Thu, 13 Sep 2012 02:08:44 -0000 On Wed, Sep 12, 2012 at 04:42:27PM -0500, Nathan Whitehorn wrote: > On 09/11/12 09:56, Dimitry Andric wrote: > >On 2012-09-11 16:27, Tijl Coosemans wrote:> On 11-09-2012 16:10, > >Dimitry Andric wrote: > >... > >>>Yes, maths support, specifically precision, is admittedly still one of > >>>clang's (really llvm's) weaker points. It is currently not really a > >>>high priority item for upstream. > >>> > >>>This is obviously something that a certain part of our userbase will > >>>care a lot about, while most of the time they won't care so much about > >>>licensing or politics. So those people are probably better off using > >>>gcc for the time being. > >> > >>Does it affect the accuracy of libm functions? > > > >It seems to, at least in specific cases; Steve posted about this in an > >earlier thread on -current: > > > > http://docs.freebsd.org/cgi/mid.cgi?20120905221310.GA97847 > >_______________________________________________ > > If true, this is a serious problem, especially for those of us who use > FreeBSD in a scientific computing environment. Just to clarify. I do not oppose switching the default compiler to clang as long as the proponents for the switch have shown adequate testing. Neither clang successfully building world nor clang building a working kernel are adequate testing (IMHO). Neither of those "benchmarks" use floating point, and AFAIK the libm built by clang during a buildworld is not (extensively?) exercised. As far as the URL above, I've been fixing accuracy issues in the j0f() function, and so, I have a program that allows me to exhaustively test all possible input values in the range reported. For my locally patched j0f(), I saw the issue as reported in the URL, but in doing additional development on j0f() I accidentally deletely/lost that specific version of the code. I hope to regenerate the code from my notes this weekend, and redo the tests. In regards to my initial post in this thread, I was just trying to assess whether any benchmarks have been performed on FreeBSD for floating point generated by clang. Other than the limited testing that I've done, it appears that the answer is 'no'. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 13 04:06:11 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 A97E81065680; Thu, 13 Sep 2012 04:06:11 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from cpanel.centralhosts.net (cpanel.centralhosts.net [66.55.76.125]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC468FC17; Thu, 13 Sep 2012 04:06:11 +0000 (UTC) Received: from tor20.anonymizer.ccc.de ([31.172.30.3]:44187 helo=internal.tormail.org) by cpanel.centralhosts.net with esmtpsa (TLSv1:RC4-SHA:128) (Exim 4.77) (envelope-from ) id 1TC0f1-0004zi-NC; Thu, 13 Sep 2012 00:04:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:Subject:Cc:To:From; bh=ktm/Q3bdghuCfK2qPNSkIR+qksEg8GID3pqW7J3+raw=; b=hF7X8kvg+M09WAsw3yOZXnrybreCgmWQQT1OPCV2kgqri+eV354RHJqvByxmaq7YXry/c+UKczMeFQbjXxkqL/XvQpB2UEqisVehnCFdqLSmUPafpD4fQeSf5jnOpCYMrULi2ayrRSRVNLUjxCSGDE40KYCSjncAuqE4gYNWPc8=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1TC0ey-0009o8-NU; Thu, 13 Sep 2012 04:04:15 +0000 From: Jan Beich To: Doug Barton Date: Wed, 12 Sep 2012 17:03:09 -1100 References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> <505055F7.9020809@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1TC0ey-0009o8-NU@internal.tormail.org> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel.centralhosts.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tormail.org Cc: toolchain@freebsd.org, current@freebsd.org, freebsd-ports 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: Thu, 13 Sep 2012 04:06:11 -0000 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. From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 13 06:21:35 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D2E51065672; Thu, 13 Sep 2012 06:21:35 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel09.rubas.ch (cpanel09.rubas.ch [195.182.222.79]) by mx1.freebsd.org (Postfix) with ESMTP id 36A718FC0A; Thu, 13 Sep 2012 06:21:34 +0000 (UTC) Received: from 175-3.192-178.cust.bluewin.ch ([178.192.3.175]:49728 helo=gahrfit.gahr.ch) by cpanel09.rubas.ch with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77) (envelope-from ) id 1TC2nt-0015Ks-C8; Thu, 13 Sep 2012 08:21:33 +0200 Date: Thu, 13 Sep 2012 08:21:31 +0200 From: Pietro Cerutti To: Doug Barton Message-ID: <20120913062131.GA29644@gahrfit.gahr.ch> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> <505055F7.9020809@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <505055F7.9020809@FreeBSD.org> X-PGP-Key: 0x9571F78E X-PGP-Fingerprint: 1203 92B5 3919 AF84 9B97 28D6 C0C2 6A98 9571 F78E User-Agent: Mutt/1.5.21 (2010-09-15) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel09.rubas.ch X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org Cc: toolchain@freebsd.org, current@freebsd.org, freebsd-ports Subject: Re: Clang as default compiler November 4th X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gahr@FreeBSD.org List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2012 06:21:35 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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.. --=20 Pietro Cerutti The FreeBSD Project gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBRe2oACgkQwMJqmJVx947XVgCgpVWFBNsskNGqiJyBD8T6G4uj xSQAoOPrdJDPUKrOac2HZW0RASzE4brL =dAVr -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm-- From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 13 06:46:26 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20ACF106564A; Thu, 13 Sep 2012 06:46:26 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id EBA538FC12; Thu, 13 Sep 2012 06:46:25 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id 70CA65623C; Thu, 13 Sep 2012 01:46:25 -0500 (CDT) Date: Thu, 13 Sep 2012 01:46:25 -0500 From: Mark Linimon To: Pietro Cerutti Message-ID: <20120913064625.GB2452@lonesome.com> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911122122.GJ37286@deviant.kiev.zoral.com.ua> <20120911123833.GA54483@freebsd.org> <848C813E-E6EC-4FAF-9374-B5583A077404@cederstrand.dk> <505055F7.9020809@FreeBSD.org> <20120913062131.GA29644@gahrfit.gahr.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120913062131.GA29644@gahrfit.gahr.ch> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Doug Barton , current@freebsd.org, toolchain@freebsd.org, freebsd-ports 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: Thu, 13 Sep 2012 06:46:26 -0000 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 From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 13 15:06:49 2012 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25130106566B; Thu, 13 Sep 2012 15:06:49 +0000 (UTC) (envelope-from yamayan@kbh.biglobe.ne.jp) Received: from rcpt-expgw.biglobe.ne.jp (rcpt-expgw.biglobe.ne.jp [IPv6:2001:260:401:16::3]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5058FC12; Thu, 13 Sep 2012 15:06:47 +0000 (UTC) Received: from vc-gw.biglobe.ne.jp by rcpt-expgw.biglobe.ne.jp (shby/5910021009) with SMTP id q8DF6j7o025903; Fri, 14 Sep 2012 00:06:45 +0900 Received: from smtp-gw.biglobe.ne.jp ([172.21.175.156]) by vc-gw.biglobe.ne.jp (kbkr/0716090908) with ESMTP id q8DF6jho005456; Fri, 14 Sep 2012 00:06:45 +0900 X-Biglobe-Sender: Received: from [192.168.0.100] (KD027083060020.ppp-bb.dion.ne.jp [27.83.60.20]) by smtp-gw.biglobe.ne.jp id AAJQAC15AFDC; Fri, 14 Sep 2012 00:06:45 +0900 (JST) Message-ID: <5051F68F.4000807@kbh.biglobe.ne.jp> Date: Fri, 14 Sep 2012 00:06:55 +0900 From: Yamaya Takashi User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120911 Thunderbird/15.0 MIME-Version: 1.0 To: Brooks Davis , freebsd-toolchain@freebsd.org References: <20120912163822.GA86491@lor.one-eyed-alien.net> In-Reply-To: <20120912163822.GA86491@lor.one-eyed-alien.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: improving bootstrapping of WITH_CLANG_IS_CC 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: Thu, 13 Sep 2012 15:06:49 -0000 you send to wrong address, "\"freebsd-toolchain@freebsd.orgo\":" On 2012/09/13 01:38, Brooks Davis wrote: > On Wed, Sep 12, 2012 at 10:01:14AM -0500, Brooks Davis wrote: >> On Wed, Sep 12, 2012 at 09:49:51PM +0900, Yamaya Takashi wrote: >>> In Makefile.inc1, >>> both WMAKECOMPILER_TYPE and WMAKE_COMPILER_TYPE exist. >>> It's maybe bug. >> It is. I'm not actually sure why it didn't result in more invocations >> of gcc in my test. I'm testing a fix now. > Here's a fixed version. Thank you for the review! > > -- Brooks > > Index: share/mk/Makefile > =================================================================== > --- share/mk/Makefile (revision 240210) > +++ share/mk/Makefile (working copy) > @@ -3,7 +3,8 @@ > > FILES= bsd.README > FILES+= bsd.arch.inc.mk > -FILES+= bsd.compat.mk bsd.cpu.mk bsd.dep.mk bsd.doc.mk bsd.dtrace.mk > +FILES+= bsd.compat.mk bsd.compiler.mk bsd.cpu.mk > +FILES+= bsd.dep.mk bsd.doc.mk bsd.dtrace.mk > FILES+= bsd.endian.mk > FILES+= bsd.files.mk bsd.crunchgen.mk bsd.incs.mk bsd.info.mk bsd.init.mk > FILES+= bsd.kmod.mk > Index: share/mk/bsd.compiler.mk > =================================================================== > --- share/mk/bsd.compiler.mk (revision 0) > +++ share/mk/bsd.compiler.mk (working copy) > @@ -0,0 +1,20 @@ > +# $FreeBSD$ > + > +.if !defined(COMPILER_TYPE) > +. if ${CC:T:Mgcc} == "gcc" > +COMPILER_TYPE:= gcc > +. elif ${CC:T:Mclang} == "clang" > +COMPILER_TYPE:= clang > +. else > +_COMPILER_VERSION != ${CC} --version > +. if ${_COMPILER_VERSION:Mgcc} == "gcc" > +COMPILER_TYPE:= gcc > +. elif ${_COMPILER_VERSION:M\(GCC\)} == "(GCC)" > +COMPILER_TYPE:= gcc > +. elif ${_COMPILER_VERSION:Mclang} == "clang" > +COMPILER_TYPE:= clang > +. else > +.error Unable to determing compiler type for ${CC} > +. endif > +. endif > +.endif > Index: share/mk/bsd.sys.mk > =================================================================== > --- share/mk/bsd.sys.mk (revision 240210) > +++ share/mk/bsd.sys.mk (working copy) > @@ -8,6 +8,8 @@ > > # for GCC: http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Warning-Options.html > > +.include > + > # the default is gnu99 for now > CSTD?= gnu99 > > @@ -28,8 +30,8 @@ > .if defined(WARNS) > .if ${WARNS} >= 1 > CWARNFLAGS+= -Wsystem-headers > -.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && \ > - ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) > +.if !defined(NO_WERROR) && (${COMPILER_TYPE} != "clang" \ > + || !defined(NO_WERROR.clang)) > CWARNFLAGS+= -Werror > .endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang) > .endif # WARNS >= 1 > @@ -43,8 +45,8 @@ > .if ${WARNS} >= 4 > CWARNFLAGS+= -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow\ > -Wunused-parameter > -.if !defined(NO_WCAST_ALIGN) && ((${MK_CLANG_IS_CC} == "no" && \ > - ${CC:T:Mclang} != "clang") || !defined(NO_WCAST_ALIGN.clang)) > +.if !defined(NO_WCAST_ALIGN) && (${COMPILER_TYPE} != "clang" \ > + || !defined(NO_WCAST_ALIGN.clang)) > CWARNFLAGS+= -Wcast-align > .endif # !NO_WCAST_ALIGN && (!CLANG || !NO_WCAST_ALIGN.clang) > .endif # WARNS >= 4 > @@ -61,8 +63,7 @@ > CWARNFLAGS+= -Wno-pointer-sign > # Clang has more warnings enabled by default, and when using -Wall, so if WARNS > # is set to low values, these have to be disabled explicitly. > -.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && \ > - !defined(EARLY_BUILD) > +.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD) > .if ${WARNS} <= 6 > CWARNFLAGS+= -Wno-empty-body -Wno-string-plus-int > .endif # WARNS <= 6 > @@ -89,20 +90,18 @@ > .if ${WFORMAT} > 0 > #CWARNFLAGS+= -Wformat-nonliteral -Wformat-security -Wno-format-extra-args > CWARNFLAGS+= -Wformat=2 -Wno-format-extra-args > -.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && \ > - !defined(EARLY_BUILD) > +.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD) > .if ${WARNS} <= 3 > CWARNFLAGS+= -Wno-format-nonliteral > .endif # WARNS <= 3 > .endif # CLANG > -.if !defined(NO_WERROR) && ((${MK_CLANG_IS_CC} == "no" && \ > - ${CC:T:Mclang} != "clang") || !defined(NO_WERROR.clang)) > +.if !defined(NO_WERROR) && (${COMPILER_TYPE} != "clang" \ > + || !defined(NO_WERROR.clang)) > CWARNFLAGS+= -Werror > .endif # !NO_WERROR && (!CLANG || !NO_WERROR.clang) > .endif # WFORMAT > 0 > .endif # WFORMAT > -.if defined(NO_WFORMAT) || ((${MK_CLANG_IS_CC} != "no" || \ > - ${CC:T:Mclang} == "clang") && defined(NO_WFORMAT.clang)) > +.if defined(NO_WFORMAT) || (${COMPILER_TYPE} == "clang" && defined(NO_WFORMAT.clang)) > CWARNFLAGS+= -Wno-format > .endif # NO_WFORMAT || (CLANG && NO_WFORMAT.clang) > .endif # !NO_WARNS > @@ -111,8 +110,7 @@ > CWARNFLAGS+= -Wno-unknown-pragmas > .endif # IGNORE_PRAGMA > > -.if (${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang") && \ > - !defined(EARLY_BUILD) > +.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD) > CLANG_NO_IAS= -no-integrated-as > CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ > -mllvm -enable-load-pre=false -mllvm -simplifycfg-dup-ret > Index: Makefile.inc1 > =================================================================== > --- Makefile.inc1 (revision 240210) > +++ Makefile.inc1 (working copy) > @@ -46,6 +46,7 @@ > > .include > .include > +.include > > # We must do share/info early so that installation of info `dir' > # entries works correctly. Do it first since it is less likely to > @@ -235,7 +236,8 @@ > PATH=${BPATH}:${PATH} \ > WORLDTMP=${WORLDTMP} \ > VERSION="${VERSION}" \ > - MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" > + MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}" \ > + COMPILER_TYPE=${COMPILER_TYPE} > BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ > ${BMAKEENV} ${MAKE} -f Makefile.inc1 \ > DESTDIR= \ > @@ -270,6 +272,16 @@ > .if ${MK_CDDL} == "no" > WMAKEENV+= NO_CTF=1 > .endif > +.if ${CC:T:Mgcc} == "gcc" > +WMAKE_COMPILER_TYPE= gcc > +.elif ${CC:T:Mclang} == "clang" > +WMAKE_COMPILER_TYPE= clang > +.elif ${MK_CLANG_IS_CC} == "no" > +WMAKE_COMPILER_TYPE= gcc > +.else > +WMAKE_COMPILER_TYPE= clang > +.endif > +WMAKEENV+= COMPILER_TYPE=${WMAKE_COMPILER_TYPE} > WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} > > .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" > @@ -313,7 +325,8 @@ > CC="${CC} ${LIB32FLAGS}" \ > CXX="${CXX} ${LIB32FLAGS}" \ > LIBDIR=/usr/lib32 \ > - SHLIBDIR=/usr/lib32 > + SHLIBDIR=/usr/lib32 \ > + COMPILER_TYPE=${WMAKE_COMPILER_TYPE} > > LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ > -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ > Index: sys/conf/kmod.mk > =================================================================== > --- sys/conf/kmod.mk (revision 240210) > +++ sys/conf/kmod.mk (working copy) > @@ -73,6 +73,7 @@ > .endif > > .include > +.include > > .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S > > @@ -108,7 +109,7 @@ > # for example. > CFLAGS+= -I@/contrib/altq > > -.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" > +.if ${COMPILER_TYPE} != "clang" > CFLAGS+= -finline-limit=${INLINE_LIMIT} > CFLAGS+= --param inline-unit-growth=100 > CFLAGS+= --param large-function-growth=1000 > Index: sys/conf/kern.pre.mk > =================================================================== > --- sys/conf/kern.pre.mk (revision 240210) > +++ sys/conf/kern.pre.mk (working copy) > @@ -4,6 +4,7 @@ > # of the definitions that need to be before %BEFORE_DEPEND. > > .include > +.include > > # backwards compat option for older systems. > MACHINE_CPUARCH?=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} > @@ -34,7 +35,7 @@ > .endif > .endif > .if ${MACHINE_CPUARCH} == "amd64" > -.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" > +.if ${COMPILER_TYPE} != "clang" > COPTFLAGS?=-O2 -frename-registers -pipe > .else > COPTFLAGS?=-O2 -pipe > @@ -84,7 +85,7 @@ > > CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS} > CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h > -.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" > +.if ${COMPILER_TYPE} != "clang" > CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} > .if ${MACHINE_CPUARCH} != "mips" > CFLAGS+= --param inline-unit-growth=100 > @@ -101,7 +102,7 @@ > # XXX LOCORE means "don't declare C stuff" not "for locore.s". > ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} > > -.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" > +.if ${COMPILER_TYPE} == "clang" > CLANG_NO_IAS= -no-integrated-as > .endif > > Index: sys/conf/kern.mk > =================================================================== > --- sys/conf/kern.mk (revision 240210) > +++ sys/conf/kern.mk (working copy) > @@ -15,7 +15,7 @@ > # Disable a few warnings for clang, since there are several places in the > # kernel where fixing them is more trouble than it is worth, or where there is > # a false positive. > -.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" > +.if ${COMPILER_TYPE} == "clang" > NO_WCONSTANT_CONVERSION= -Wno-constant-conversion > NO_WARRAY_BOUNDS= -Wno-array-bounds > NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative > @@ -52,7 +52,7 @@ > # Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 > # > .if ${MACHINE_CPUARCH} == "i386" > -.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" > +.if ${COMPILER_TYPE} != "clang" > CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 > .else > CFLAGS+= -mno-aes -mno-avx > @@ -100,7 +100,7 @@ > # (-mfpmath= is not supported) > # > .if ${MACHINE_CPUARCH} == "amd64" > -.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" > +.if ${COMPILER_TYPE} == "clang" > CFLAGS+= -mno-aes -mno-avx > .endif > CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float \ From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 13 15:32:30 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BCFD6106566C; Thu, 13 Sep 2012 15:32:30 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 2AF4F8FC0A; Thu, 13 Sep 2012 15:32:23 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id q8DFWGhZ045467; Thu, 13 Sep 2012 09:32:16 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id q8DFWCGW051984; Thu, 13 Sep 2012 09:32:12 -0600 (MDT) (envelope-from freebsd@damnhippie.dyndns.org) From: Ian Lepore To: Steve Kargl In-Reply-To: <20120913020833.GA8255@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> Content-Type: text/plain; charset="us-ascii" Date: Thu, 13 Sep 2012 09:32:12 -0600 Message-ID: <1347550332.1110.108.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Coosemans , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Tijl 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: Thu, 13 Sep 2012 15:32:30 -0000 On Wed, 2012-09-12 at 19:08 -0700, Steve Kargl wrote: > In regards to my initial post in this thread, I was just trying > to assess whether any benchmarks have been performed on FreeBSD > for floating point generated by clang. Other than the limited > testing that I've done, it appears that the answer is 'no'. > We have src/tools/tests/testfloat and src/tools/regression/lib/msun. I know nothing about the former (just noticed it for the first time). The latter I think is a set of correctness tests rather than performance tests. -- Ian From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 13 16:10:30 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13E8F106566C; Thu, 13 Sep 2012 16:10:30 +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 D9F7B8FC0C; Thu, 13 Sep 2012 16:10:29 +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 q8DGAOP1015561; Thu, 13 Sep 2012 09:10:24 -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 q8DGAOjr015560; Thu, 13 Sep 2012 09:10:24 -0700 (PDT) (envelope-from sgk) Date: Thu, 13 Sep 2012 09:10:24 -0700 From: Steve Kargl To: Ian Lepore Message-ID: <20120913161024.GA13846@troutmask.apl.washington.edu> References: <20120910211207.GC64920@lor.one-eyed-alien.net> <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1347550332.1110.108.camel@revolution.hippie.lan> User-Agent: Mutt/1.4.2.3i Cc: toolchain@freebsd.org, Tijl Coosemans , Dimitry Andric , 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: Thu, 13 Sep 2012 16:10:30 -0000 On Thu, Sep 13, 2012 at 09:32:12AM -0600, Ian Lepore wrote: > On Wed, 2012-09-12 at 19:08 -0700, Steve Kargl wrote: > > In regards to my initial post in this thread, I was just trying > > to assess whether any benchmarks have been performed on FreeBSD > > for floating point generated by clang. Other than the limited > > testing that I've done, it appears that the answer is 'no'. > > > > We have src/tools/tests/testfloat and src/tools/regression/lib/msun. I > know nothing about the former (just noticed it for the first time). The > latter I think is a set of correctness tests rather than performance > tests. It's quite clear that the clang proponent have not tried to run src/tools/regression/lib/msun. % setenv CC clang % make |& grep warning | wc -l 1354 % make clean % make |& tee make.log % head -20 make.log clang -O2 -pipe -march=opteron -O0 -lm test-cexp.c -o test-cexp test-cexp.c:49:14: warning: pragma STDC FENV_ACCESS ON is not supported, ignoring pragma [-Wunknown-pragmas] #pragma STDC FENV_ACCESS ON ^ test-cexp.c:183:2: warning: expression result unused [-Wunused-value] testall(0.0, 1.0, ALL_STD_EXCEPT, 0, 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test-cexp.c:98:7: note: expanded from macro 'testall' test(cexp, x, result, exceptmask, excepts, checksign); \ ^ test-cexp.c:87:11: note: expanded from macro 'test' assert(((func), fetestexcept(exceptmask) == (excepts))); \ ^ /usr/include/assert.h:54:21: note: expanded from macro 'assert' #define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ ^ test-cexp.c:183:2: warning: expression result unused [-Wunused-value] testall(0.0, 1.0, ALL_STD_EXCEPT, 0, 1); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test-cexp.c:99:7: note: expanded from macro 'testall' % tail -20 make.log test-trig.c:69:11: note: expanded from macro 'test' assert(((func), fetestexcept(exceptmask) == (excepts))); \ ^ /usr/include/assert.h:54:21: note: expanded from macro 'assert' #define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ ^ 74 warnings generated. clang -O2 -pipe -march=opteron -O0 -lm test-fenv.c -o test-fenv test-fenv.c:82:14: warning: pragma STDC FENV_ACCESS ON is not supported, ignoring pragma [-Wunknown-pragmas] #pragma STDC FENV_ACCESS ON ^ 1 warning generated. for p in test-cexp test-conj test-csqrt test-ctrig test-exponential test-fma test-fmaxmin test-ilogb test-invtrig test-logarithm test-lrint test-lround test-nan test-nearbyint test-next test-rem test-trig test-fenv; do /usr/src/tools/regression/lib/msun/$p; done Assertion failed: (((cexp), fetestexcept((0x04 | 0x20 | 0x01 | 0x08 | 0x10)) == (0))), function test_nan, file test-cexp.c, line 211. 1..7 ok 1 - cexp zero Abort trap (core dumped) *** [tests] Error code 134 Stop in /usr/src/tools/regression/lib/msun. So, clang does not support "#pragma STDC FENV_ACCESS ON". That (IMHO) is a show stopper for clang as the default compiler, because at least msun/src/e_sqrtl.c uses this pragma. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 13 16:25:42 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 BBCF4106566C; Thu, 13 Sep 2012 16:25:42 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep14.mx.upcmail.net (fep14.mx.upcmail.net [62.179.121.34]) by mx1.freebsd.org (Postfix) with ESMTP id 8FAB38FC0A; Thu, 13 Sep 2012 16:25:41 +0000 (UTC) Received: from edge04.upcmail.net ([192.168.13.239]) by viefep14-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20120913162539.ELCJ11100.viefep14-int.chello.at@edge04.upcmail.net>; Thu, 13 Sep 2012 18:25:39 +0200 Received: from mole.fafoe.narf.at ([80.109.55.137]) by edge04.upcmail.net with edge id ygRe1j00G2xdvHc04gRebb; Thu, 13 Sep 2012 18:25:39 +0200 X-SourceIP: 80.109.55.137 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id D62EE6D44C; Thu, 13 Sep 2012 18:25:37 +0200 (CEST) Date: Thu, 13 Sep 2012 18:25:37 +0200 From: Stefan Farfeleder To: Steve Kargl Message-ID: <20120913162537.GE1368@mole.fafoe.narf.at> References: <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120913161024.GA13846@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Ian Lepore , Tijl Coosemans , current@freebsd.org, Dimitry Andric , toolchain@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: Thu, 13 Sep 2012 16:25:42 -0000 On Thu, Sep 13, 2012 at 09:10:24AM -0700, Steve Kargl wrote: > clang -O2 -pipe -march=opteron -O0 -lm test-cexp.c -o test-cexp > test-cexp.c:49:14: warning: pragma STDC FENV_ACCESS ON is not supported, ignoring pragma [-Wunknown-pragmas] > #pragma STDC FENV_ACCESS ON [...] > So, clang does not support "#pragma STDC FENV_ACCESS ON". > That (IMHO) is a show stopper for clang as the default compiler, > because at least msun/src/e_sqrtl.c uses this pragma. Neither does gcc, AFAIK (http://gcc.gnu.org/c99status.html). It just silently ignores the pragma. Stefan From owner-freebsd-toolchain@FreeBSD.ORG Thu Sep 13 16:42:58 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 D7EEA106564A; Thu, 13 Sep 2012 16:42:58 +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 AB81C8FC08; Thu, 13 Sep 2012 16:42:58 +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 q8DGgrWG018054; Thu, 13 Sep 2012 09:42:53 -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 q8DGgqJu018053; Thu, 13 Sep 2012 09:42:52 -0700 (PDT) (envelope-from sgk) Date: Thu, 13 Sep 2012 09:42:52 -0700 From: Steve Kargl To: Stefan Farfeleder Message-ID: <20120913164252.GA18024@troutmask.apl.washington.edu> References: <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120913162537.GE1368@mole.fafoe.narf.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120913162537.GE1368@mole.fafoe.narf.at> User-Agent: Mutt/1.4.2.3i Cc: Ian Lepore , Tijl Coosemans , current@FreeBSD.org, Dimitry Andric , toolchain@FreeBSD.org, Nathan Whitehorn 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: Thu, 13 Sep 2012 16:42:58 -0000 On Thu, Sep 13, 2012 at 06:25:37PM +0200, Stefan Farfeleder wrote: > On Thu, Sep 13, 2012 at 09:10:24AM -0700, Steve Kargl wrote: > > clang -O2 -pipe -march=opteron -O0 -lm test-cexp.c -o test-cexp > > test-cexp.c:49:14: warning: pragma STDC FENV_ACCESS ON is not supported, ignoring pragma [-Wunknown-pragmas] > > #pragma STDC FENV_ACCESS ON > > [...] > > > So, clang does not support "#pragma STDC FENV_ACCESS ON". > > That (IMHO) is a show stopper for clang as the default compiler, > > because at least msun/src/e_sqrtl.c uses this pragma. > > Neither does gcc, AFAIK (http://gcc.gnu.org/c99status.html). It just > silently ignores the pragma. > Hmmm, indeed, you are correct. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34678 I seems to have mis-remembered a patch that went into newer gcc. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Fri Sep 14 20:23:39 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C22D0106566C; Fri, 14 Sep 2012 20:23:39 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 9A3D88FC08; Fri, 14 Sep 2012 20:23:37 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id q8EKNK2q006292; Fri, 14 Sep 2012 15:23:20 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id q8EKNJKW006291; Fri, 14 Sep 2012 15:23:19 -0500 (CDT) (envelope-from brooks) Date: Fri, 14 Sep 2012 15:23:19 -0500 From: Brooks Davis To: Steve Kargl Message-ID: <20120914202319.GB5244@lor.one-eyed-alien.net> References: <20120911104518.GF37286@deviant.kiev.zoral.com.ua> <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QTprm0S8XgL7H0Dt" Content-Disposition: inline In-Reply-To: <20120913161024.GA13846@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Ian Lepore , Tijl Coosemans , current@freebsd.org, Dimitry Andric , toolchain@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: Fri, 14 Sep 2012 20:23:39 -0000 --QTprm0S8XgL7H0Dt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 13, 2012 at 09:10:24AM -0700, Steve Kargl wrote: > On Thu, Sep 13, 2012 at 09:32:12AM -0600, Ian Lepore wrote: > > On Wed, 2012-09-12 at 19:08 -0700, Steve Kargl wrote: > > > In regards to my initial post in this thread, I was just trying > > > to assess whether any benchmarks have been performed on FreeBSD > > > for floating point generated by clang. Other than the limited > > > testing that I've done, it appears that the answer is 'no'. > > >=20 > >=20 > > We have src/tools/tests/testfloat and src/tools/regression/lib/msun. I > > know nothing about the former (just noticed it for the first time). The > > latter I think is a set of correctness tests rather than performance > > tests. >=20 > It's quite clear that the clang proponent have not tried > to run src/tools/regression/lib/msun. >=20 > % setenv CC clang > % make |& grep warning | wc -l > 1354 > % make clean > % make |& tee make.log > % head -20 make.log > clang -O2 -pipe -march=3Dopteron -O0 -lm test-cexp.c -o test-cexp > test-cexp.c:49:14: warning: pragma STDC FENV_ACCESS ON is not supported, = ignoring pragma [-Wunknown-pragmas] > #pragma STDC FENV_ACCESS ON > ^ > test-cexp.c:183:2: warning: expression result unused [-Wunused-value] > testall(0.0, 1.0, ALL_STD_EXCEPT, 0, 1); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > test-cexp.c:98:7: note: expanded from macro 'testall' > test(cexp, x, result, exceptmask, excepts, checksign); \ > ^ > test-cexp.c:87:11: note: expanded from macro 'test' > assert(((func), fetestexcept(exceptmask) =3D=3D (excepts))); = \ > ^ > /usr/include/assert.h:54:21: note: expanded from macro 'assert' > #define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ > ^ > test-cexp.c:183:2: warning: expression result unused [-Wunused-value] > testall(0.0, 1.0, ALL_STD_EXCEPT, 0, 1); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > test-cexp.c:99:7: note: expanded from macro 'testall' >=20 > % tail -20 make.log > test-trig.c:69:11: note: expanded from macro 'test' > assert(((func), fetestexcept(exceptmask) =3D=3D (excepts))); = \ > ^ > /usr/include/assert.h:54:21: note: expanded from macro 'assert' > #define assert(e) ((e) ? (void)0 : __assert(__func__, __FILE__, \ > ^ > 74 warnings generated. > clang -O2 -pipe -march=3Dopteron -O0 -lm test-fenv.c -o test-fenv > test-fenv.c:82:14: warning: pragma STDC FENV_ACCESS ON is not supported, = ignoring pragma [-Wunknown-pragmas] > #pragma STDC FENV_ACCESS ON > ^ > 1 warning generated. > for p in test-cexp test-conj test-csqrt test-ctrig test-exponential test= -fma test-fmaxmin test-ilogb test-invtrig test-logarithm test-lrint test-= lround test-nan test-nearbyint test-next test-rem test-trig test-fenv; do = /usr/src/tools/regression/lib/msun/$p; done > Assertion failed: (((cexp), fetestexcept((0x04 | 0x20 | 0x01 | 0x08 | 0x1= 0)) =3D=3D (0))), function test_nan, file test-cexp.c, line 211. > 1..7 > ok 1 - cexp zero > Abort trap (core dumped) > *** [tests] Error code 134 >=20 > Stop in /usr/src/tools/regression/lib/msun. Prompted by this post, I did a bit of testing and it looks like we have two classes of failures that need to be investigated. First, some tests are failing with a gcc compiled world and clang compiled test code. They seem to mostly be unexpected fp exception state when testing with NaNs. I suspect that someone more knowledgeable in this area could come up with a reduced test case and explication of what clang is doing wrong pretty quickly. The second class is tests that fail when libm is compiled using clang. I've not investigate those at all. I'd tend to guess that we have a wider range of issues there. This is clearly an area we need more focus on before a switch to clang. To a point I would be OK with it delaying the switch to work these issues, but as with C99 long double support we can't let the quest for perfection delay us indefinitely. -- Brooks --QTprm0S8XgL7H0Dt Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFQU5I3XY6L6fI4GtQRAoqhAJ0YgSkxpWQyvtvszq36Jmt2PpAkpgCg3Irt wUFCV/+dlbrSlAI2qqqUPpY= =K3cL -----END PGP SIGNATURE----- --QTprm0S8XgL7H0Dt-- From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 00:18:21 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 CAB5C106564A; Sat, 15 Sep 2012 00:18:21 +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 81F618FC0A; Sat, 15 Sep 2012 00:18:21 +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 q8F0I9in070225; Fri, 14 Sep 2012 17:18:09 -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 q8F0I8cm070224; Fri, 14 Sep 2012 17:18:08 -0700 (PDT) (envelope-from sgk) Date: Fri, 14 Sep 2012 17:18:08 -0700 From: Steve Kargl To: Brooks Davis Message-ID: <20120915001808.GA70215@troutmask.apl.washington.edu> References: <20120911120649.GA52235@freebsd.org> <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120914202319.GB5244@lor.one-eyed-alien.net> User-Agent: Mutt/1.4.2.3i Cc: Ian Lepore , Tijl Coosemans , current@freebsd.org, Dimitry Andric , toolchain@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: Sat, 15 Sep 2012 00:18:22 -0000 On Fri, Sep 14, 2012 at 03:23:19PM -0500, Brooks Davis wrote: > On Thu, Sep 13, 2012 at 09:10:24AM -0700, Steve Kargl wrote: > > ok 1 - cexp zero > > Abort trap (core dumped) > > *** [tests] Error code 134 > > > > Stop in /usr/src/tools/regression/lib/msun. > > Prompted by this post, I did a bit of testing and it looks like we have > two classes of failures that need to be investigated. First, some tests > are failing with a gcc compiled world and clang compiled test code. > They seem to mostly be unexpected fp exception state when testing with > NaNs. I suspect that someone more knowledgeable in this area could come > up with a reduced test case and explication of what clang is doing wrong > pretty quickly. > > The second class is tests that fail when libm is compiled using clang. > I've not investigate those at all. I'd tend to guess that we have a > wider range of issues there. > A third class of failure appears to be that clang emits i387 fpu instructions for at least sinf and cosf instead of calls to the library routines. AFAIK, the library routines are faster and more accurate. % cat a.c #include float foo(float x) { float a; a = sinf(x) * cosf(x); return (a); } % clang -S -O a.c foo: # @foo # BB#0: # %entry flds 4(%esp) fld %st(0) fcos fxch fsin fmulp ret % cc -S -O a.c foo: pushl %ebp movl %esp, %ebp pushl %ebx subl $20, %esp movl 8(%ebp), %ebx movl %ebx, (%esp) call sinf fstps -8(%ebp) movl %ebx, (%esp) call cosf fmuls -8(%ebp) addl $20, %esp popl %ebx popl %ebp ret % clang -S -O -fno-builtin a.c foo: # @foo # BB#0: # %entry pushl %ebp movl %esp, %ebp subl $24, %esp flds 8(%ebp) fsts -16(%ebp) # 4-byte Folded Spill fstps (%esp) calll sinf fstpt -12(%ebp) # 10-byte Folded Spill flds -16(%ebp) # 4-byte Folded Reload fstps (%esp) calll cosf fldt -12(%ebp) # 10-byte Folded Reload fmulp addl $24, %esp popl %ebp ret Using -fno-builtin would seem to be a non-starter in that it disables all builtin functions. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 01:06:01 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 82CE0106566B for ; Sat, 15 Sep 2012 01:06:01 +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 51AAB8FC12 for ; Sat, 15 Sep 2012 01:06:01 +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 q8F160vS070443; Fri, 14 Sep 2012 18:06:00 -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 q8F160b5070442; Fri, 14 Sep 2012 18:06:00 -0700 (PDT) (envelope-from sgk) Date: Fri, 14 Sep 2012 18:06:00 -0700 From: Steve Kargl To: Brooks Davis Message-ID: <20120915010600.GA70426@troutmask.apl.washington.edu> References: <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120915001808.GA70215@troutmask.apl.washington.edu> User-Agent: Mutt/1.4.2.3i Cc: Ian Lepore , Tijl Coosemans , current@freebsd.org, Dimitry Andric , toolchain@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: Sat, 15 Sep 2012 01:06:01 -0000 On Fri, Sep 14, 2012 at 05:18:08PM -0700, Steve Kargl wrote: > > A third class of failure appears to be that clang emits > i387 fpu instructions for at least sinf and cosf instead > of calls to the library routines. AFAIK, the library > routines are faster and more accurate. > Yep. Clang has problems with at least sinf on i386 FreeBSD. % pwd /usr/home/kargl/trunk/math/sine % make clean && make CC=cc testf cc -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm % ./testf -m 0 -M 1e20 -r ULP Range | -----------+------------------------- [0.0:0.6] | 1006424 (100.00%) (0.6:0.7] | 0 ( 0.00%) (0.7:0.8] | 0 ( 0.00%) (0.8:0.9] | 0 ( 0.00%) (0.9:1.0] | 0 ( 0.00%) (1.0:2.0] | 0 ( 0.00%) (2.0:3.0] | 0 ( 0.00%) 3.0 < ULP | 0 ( 0.00%) -----------+------------------------- Count | 1006424 Max ULP | 0.50084 Max ULP x | 53462490661259313152.000000 0x1.72f876p+65 % make clean && make CC=clang testf clang -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm % ./testf -m 0 -M 1e20 -r ULP Range | -----------+------------------------- [0.0:0.6] | 1 ( 0.00%) (0.6:0.7] | 0 ( 0.00%) (0.7:0.8] | 0 ( 0.00%) (0.8:0.9] | 0 ( 0.00%) (0.9:1.0] | 0 ( 0.00%) (1.0:2.0] | 0 ( 0.00%) (2.0:3.0] | 0 ( 0.00%) 3.0 < ULP | 999998 (100.00%) -----------+------------------------- Count | 999999 Max ULP | 1328505256679420125050194353979392.00000 Max ULP x | 75516780764213542912.000000 0x1.06006p+66 -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 09:15:06 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3AC41065670; Sat, 15 Sep 2012 09:15:06 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 206C68FC0A; Sat, 15 Sep 2012 09:15:05 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 09BE07F3847; Sat, 15 Sep 2012 11:14:56 +0200 (CEST) Date: Sat, 15 Sep 2012 11:14:56 +0200 From: Roman Divacky To: Steve Kargl Message-ID: <20120915091455.GA93876@freebsd.org> References: <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120915010600.GA70426@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Ian Lepore , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Tijl Coosemans 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: Sat, 15 Sep 2012 09:15:07 -0000 LLVM by default turns these: case LibFunc::copysign: case LibFunc::copysignf: case LibFunc::copysignl: case LibFunc::fabs: case LibFunc::fabsf: case LibFunc::fabsl: case LibFunc::sin: case LibFunc::sinf: case LibFunc::sinl: case LibFunc::cos: case LibFunc::cosf: case LibFunc::cosl: case LibFunc::sqrt: case LibFunc::sqrtf: case LibFunc::sqrtl: case LibFunc::floor: case LibFunc::floorf: case LibFunc::floorl: case LibFunc::nearbyint: case LibFunc::nearbyintf: case LibFunc::nearbyintl: case LibFunc::ceil: case LibFunc::ceilf: case LibFunc::ceill: case LibFunc::rint: case LibFunc::rintf: case LibFunc::rintl: case LibFunc::trunc: case LibFunc::truncf: case LibFunc::truncl: case LibFunc::log2: case LibFunc::log2f: case LibFunc::log2l: case LibFunc::exp2: case LibFunc::exp2f: case LibFunc::exp2l: from lib calls to direct code (ie. instruction or sequence of). This is not a "bug" but feature ;) I am not sure what the rules for the transformation should be. Allow it only with -ffast-math ? Disallow it on i386? Really, no idea. Steve, you tested on i386? Can you test on amd64? Do you guys have any opinion what to do here? On Fri, Sep 14, 2012 at 06:06:00PM -0700, Steve Kargl wrote: > On Fri, Sep 14, 2012 at 05:18:08PM -0700, Steve Kargl wrote: > > > > A third class of failure appears to be that clang emits > > i387 fpu instructions for at least sinf and cosf instead > > of calls to the library routines. AFAIK, the library > > routines are faster and more accurate. > > > > Yep. Clang has problems with at least sinf on i386 FreeBSD. > > % pwd > /usr/home/kargl/trunk/math/sine > > % make clean && make CC=cc testf > cc -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ > -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm > > % ./testf -m 0 -M 1e20 -r > ULP Range | > -----------+------------------------- > [0.0:0.6] | 1006424 (100.00%) > (0.6:0.7] | 0 ( 0.00%) > (0.7:0.8] | 0 ( 0.00%) > (0.8:0.9] | 0 ( 0.00%) > (0.9:1.0] | 0 ( 0.00%) > (1.0:2.0] | 0 ( 0.00%) > (2.0:3.0] | 0 ( 0.00%) > 3.0 < ULP | 0 ( 0.00%) > -----------+------------------------- > Count | 1006424 > Max ULP | 0.50084 > Max ULP x | 53462490661259313152.000000 0x1.72f876p+65 > > % make clean && make CC=clang testf > clang -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ > -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm > > % ./testf -m 0 -M 1e20 -r > ULP Range | > -----------+------------------------- > [0.0:0.6] | 1 ( 0.00%) > (0.6:0.7] | 0 ( 0.00%) > (0.7:0.8] | 0 ( 0.00%) > (0.8:0.9] | 0 ( 0.00%) > (0.9:1.0] | 0 ( 0.00%) > (1.0:2.0] | 0 ( 0.00%) > (2.0:3.0] | 0 ( 0.00%) > 3.0 < ULP | 999998 (100.00%) > -----------+------------------------- > Count | 999999 > Max ULP | 1328505256679420125050194353979392.00000 > Max ULP x | 75516780764213542912.000000 0x1.06006p+66 > > -- > Steve > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 10:36:12 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7DC11106566C; Sat, 15 Sep 2012 10:36:12 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay020.isp.belgacom.be (Mailrelay020.isp.belgacom.be [195.238.6.95]) by mx1.freebsd.org (Postfix) with ESMTP id 4EB478FC0A; Sat, 15 Sep 2012 10:36:11 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EAHBZVFBbsSJD/2dsb2JhbABFDrhBgzuBCIIgAQEFViIBEAsOCgkWDwkDAgECASceBg0BBwEBiA26d4shFIZUA45pgSCVeYIsPIFY Received: from 67.34-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.34.67]) by relay.skynet.be with ESMTP; 15 Sep 2012 12:35:00 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q8FAYxgd001311; Sat, 15 Sep 2012 12:35:00 +0200 (CEST) (envelope-from tijl@coosemans.org) Message-ID: <505459CD.2090308@coosemans.org> Date: Sat, 15 Sep 2012 12:34:53 +0200 From: Tijl Coosemans User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120804 Thunderbird/14.0 MIME-Version: 1.0 To: Steve Kargl References: <20120911132410.GA87126@troutmask.apl.washington.edu> <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> In-Reply-To: <20120915010600.GA70426@troutmask.apl.washington.edu> X-Enigmail-Version: 1.4.2 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigE4BDDEC79567F38A12DCF386" Cc: Ian Lepore , current@freebsd.org, Dimitry Andric , toolchain@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: Sat, 15 Sep 2012 10:36:12 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE4BDDEC79567F38A12DCF386 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 15-09-2012 03:06, Steve Kargl wrote: > On Fri, Sep 14, 2012 at 05:18:08PM -0700, Steve Kargl wrote: >> >> A third class of failure appears to be that clang emits >> i387 fpu instructions for at least sinf and cosf instead=20 >> of calls to the library routines. AFAIK, the library >> routines are faster and more accurate. >> >=20 > Yep. Clang has problems with at least sinf on i386 FreeBSD. >=20 > % pwd > /usr/home/kargl/trunk/math/sine >=20 > % make clean && make CC=3Dcc testf > cc -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ > -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm >=20 > % ./testf -m 0 -M 1e20 -r > ULP Range | > -----------+------------------------- > [0.0:0.6] | 1006424 (100.00%) > (0.6:0.7] | 0 ( 0.00%) > (0.7:0.8] | 0 ( 0.00%) > (0.8:0.9] | 0 ( 0.00%) > (0.9:1.0] | 0 ( 0.00%) > (1.0:2.0] | 0 ( 0.00%) > (2.0:3.0] | 0 ( 0.00%) > 3.0 < ULP | 0 ( 0.00%) > -----------+------------------------- > Count | 1006424 > Max ULP | 0.50084 > Max ULP x | 53462490661259313152.000000 0x1.72f876p+65 >=20 > % make clean && make CC=3Dclang testf > clang -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \= > -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm >=20 > % ./testf -m 0 -M 1e20 -r > ULP Range | > -----------+------------------------- > [0.0:0.6] | 1 ( 0.00%) > (0.6:0.7] | 0 ( 0.00%) > (0.7:0.8] | 0 ( 0.00%) > (0.8:0.9] | 0 ( 0.00%) > (0.9:1.0] | 0 ( 0.00%) > (1.0:2.0] | 0 ( 0.00%) > (2.0:3.0] | 0 ( 0.00%) > 3.0 < ULP | 999998 (100.00%) > -----------+------------------------- > Count | 999999 > Max ULP | 1328505256679420125050194353979392.00000 > Max ULP x | 75516780764213542912.000000 0x1.06006p+66 A ULP this big can't be because of using a built-in instead of a library call, right? Something must be wrong with clang's implementation of the built-in. The fcos/fsin instructions have a limited domain and return a value unchanged if it's outside that domain. Maybe clang doesn't check this. This error probably also explains the precision loss in j0, because it calls cos/sin. --------------enigE4BDDEC79567F38A12DCF386 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlBUWdMACgkQfoCS2CCgtitafwD/WLfHJvjHlGOSb6KI/3sotFXq aTwA3tCJrjNJw5ERZq0A/iQCvvE1YAysrqd04GnCIBqy8jwCbdXkzgenJtJQPN5+ =Vyd7 -----END PGP SIGNATURE----- --------------enigE4BDDEC79567F38A12DCF386-- From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 12:48:13 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9343106564A; Sat, 15 Sep 2012 12:48:13 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 917208FC16; Sat, 15 Sep 2012 12:48:13 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 26D667F3847; Sat, 15 Sep 2012 14:48:09 +0200 (CEST) Date: Sat, 15 Sep 2012 14:48:09 +0200 From: Roman Divacky To: Steve Kargl Message-ID: <20120915124809.GA10939@freebsd.org> References: <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120915010600.GA70426@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Ian Lepore , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Tijl Coosemans 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: Sat, 15 Sep 2012 12:48:14 -0000 Fwiw, this seems to have been fixed as of a few minutes ago. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120910/150720.html Steve, can you please test llvm/clang from (their) svn and report back? We can import a newer snapshot if all is ok. Thank you. On Fri, Sep 14, 2012 at 06:06:00PM -0700, Steve Kargl wrote: > On Fri, Sep 14, 2012 at 05:18:08PM -0700, Steve Kargl wrote: > > > > A third class of failure appears to be that clang emits > > i387 fpu instructions for at least sinf and cosf instead > > of calls to the library routines. AFAIK, the library > > routines are faster and more accurate. > > > > Yep. Clang has problems with at least sinf on i386 FreeBSD. > > % pwd > /usr/home/kargl/trunk/math/sine > > % make clean && make CC=cc testf > cc -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ > -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm > > % ./testf -m 0 -M 1e20 -r > ULP Range | > -----------+------------------------- > [0.0:0.6] | 1006424 (100.00%) > (0.6:0.7] | 0 ( 0.00%) > (0.7:0.8] | 0 ( 0.00%) > (0.8:0.9] | 0 ( 0.00%) > (0.9:1.0] | 0 ( 0.00%) > (1.0:2.0] | 0 ( 0.00%) > (2.0:3.0] | 0 ( 0.00%) > 3.0 < ULP | 0 ( 0.00%) > -----------+------------------------- > Count | 1006424 > Max ULP | 0.50084 > Max ULP x | 53462490661259313152.000000 0x1.72f876p+65 > > % make clean && make CC=clang testf > clang -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ > -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm > > % ./testf -m 0 -M 1e20 -r > ULP Range | > -----------+------------------------- > [0.0:0.6] | 1 ( 0.00%) > (0.6:0.7] | 0 ( 0.00%) > (0.7:0.8] | 0 ( 0.00%) > (0.8:0.9] | 0 ( 0.00%) > (0.9:1.0] | 0 ( 0.00%) > (1.0:2.0] | 0 ( 0.00%) > (2.0:3.0] | 0 ( 0.00%) > 3.0 < ULP | 999998 (100.00%) > -----------+------------------------- > Count | 999999 > Max ULP | 1328505256679420125050194353979392.00000 > Max ULP x | 75516780764213542912.000000 0x1.06006p+66 > > -- > Steve > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 13:49:56 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B6B8D106566B; Sat, 15 Sep 2012 13:49:56 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay008.isp.belgacom.be (mailrelay008.isp.belgacom.be [195.238.6.174]) by mx1.freebsd.org (Postfix) with ESMTP id 508D68FC0C; Sat, 15 Sep 2012 13:49:54 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkkFAJuGVFBbsSJD/2dsb2JhbABFhUC2SoEIgiABAQEEAQJTIgEQCw4KCRYPCQMCAQIBFhEeBg0BBwEBiA0Hun6LIYZoA45pgSCDK4NBjw2CaA Received: from 67.34-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.34.67]) by relay.skynet.be with ESMTP; 15 Sep 2012 15:48:44 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q8FDmhFI002605; Sat, 15 Sep 2012 15:48:43 +0200 (CEST) (envelope-from tijl@coosemans.org) Message-ID: <50548736.9030203@coosemans.org> Date: Sat, 15 Sep 2012 15:48:38 +0200 From: Tijl Coosemans User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120804 Thunderbird/14.0 MIME-Version: 1.0 To: Roman Divacky References: <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> <20120915124809.GA10939@freebsd.org> In-Reply-To: <20120915124809.GA10939@freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig7358AAEF3499B2D91F7D4E3F" Cc: Ian Lepore , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Steve Kargl 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: Sat, 15 Sep 2012 13:49:56 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7358AAEF3499B2D91F7D4E3F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 15-09-2012 14:48, Roman Divacky wrote: > Fwiw, this seems to have been fixed as of a few minutes ago. >=20 > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120910/15= 0720.html >=20 > Steve, can you please test llvm/clang from (their) svn and report > back? We can import a newer snapshot if all is ok. Here's a small test program. You're probably better equipped to test clang svn. -------- #include #include #include int main( int argc, char **argv ) { double d =3D strtod( argv[ 1 ], NULL ); printf( "%e\n", ( double ) cos( d )); printf( "%e\n", ( double ) cosf( d )); printf( "%e\n", ( double ) cosl( d )); return( 0 ); } -------- This is the current output of clang: % clang -o cos cos.c -lm % ./cos 1.23456789e20 6.031937e-01 1.234568e+20 2.814722e-01 The second number (cosf) is wrong. It should be a value between -1 and 1.= --------------enig7358AAEF3499B2D91F7D4E3F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlBUhzsACgkQfoCS2CCgtivziAD+NWYBAPtGISfvBeetsdttpHSn Vx3/+VhU8x4d3Oc+NwYA/2Vr1H6IqZYc0rvSb38RwWw1luuHAv2xxuwSCO433hnN =rTcS -----END PGP SIGNATURE----- --------------enig7358AAEF3499B2D91F7D4E3F-- From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 14:09:37 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 420481065670; Sat, 15 Sep 2012 14:09:37 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id EFE458FC0A; Sat, 15 Sep 2012 14:09:36 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 6A7017F3847; Sat, 15 Sep 2012 16:09:33 +0200 (CEST) Date: Sat, 15 Sep 2012 16:09:33 +0200 From: Roman Divacky To: Tijl Coosemans Message-ID: <20120915140933.GA17801@freebsd.org> References: <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> <20120915124809.GA10939@freebsd.org> <50548736.9030203@coosemans.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50548736.9030203@coosemans.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Ian Lepore , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Steve Kargl 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: Sat, 15 Sep 2012 14:09:37 -0000 Is this correct? lev ~$ ./cos 1.23456789e20 6.031937e-01 -9.629173e-02 2.814722e-01 If so I believe the issue is fixed. On Sat, Sep 15, 2012 at 03:48:38PM +0200, Tijl Coosemans wrote: > On 15-09-2012 14:48, Roman Divacky wrote: > > Fwiw, this seems to have been fixed as of a few minutes ago. > > > > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120910/150720.html > > > > Steve, can you please test llvm/clang from (their) svn and report > > back? We can import a newer snapshot if all is ok. > > Here's a small test program. You're probably better equipped to test > clang svn. > > -------- > #include > #include > #include > > int > main( int argc, char **argv ) { > double d = strtod( argv[ 1 ], NULL ); > > printf( "%e\n", ( double ) cos( d )); > printf( "%e\n", ( double ) cosf( d )); > printf( "%e\n", ( double ) cosl( d )); > return( 0 ); > } > -------- > > This is the current output of clang: > > % clang -o cos cos.c -lm > % ./cos 1.23456789e20 > 6.031937e-01 > 1.234568e+20 > 2.814722e-01 > > The second number (cosf) is wrong. It should be a value between -1 and 1. > From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 14:30:28 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA890106564A; Sat, 15 Sep 2012 14:30:28 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay020.isp.belgacom.be (Mailrelay020.isp.belgacom.be [195.238.6.95]) by mx1.freebsd.org (Postfix) with ESMTP id 4DEEB8FC0A; Sat, 15 Sep 2012 14:30:27 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmMHAPePVFBbsSJD/2dsb2JhbABFjgWqSYM8gQiCIAEBBVYiARALDgoJFg8JAwIBAgEnHgYNAQcBAYgNunuLIYZoA45pgSCVeYJo Received: from 67.34-177-91.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([91.177.34.67]) by relay.skynet.be with ESMTP; 15 Sep 2012 16:30:25 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.5/8.14.5) with ESMTP id q8FEUOcQ002815; Sat, 15 Sep 2012 16:30:24 +0200 (CEST) (envelope-from tijl@coosemans.org) Message-ID: <505490FB.2000807@coosemans.org> Date: Sat, 15 Sep 2012 16:30:19 +0200 From: Tijl Coosemans User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120804 Thunderbird/14.0 MIME-Version: 1.0 To: Roman Divacky References: <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> <20120915124809.GA10939@freebsd.org> <50548736.9030203@coosemans.org> <20120915140933.GA17801@freebsd.org> In-Reply-To: <20120915140933.GA17801@freebsd.org> X-Enigmail-Version: 1.4.2 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigD9C266672136E6A48819681A" Cc: Ian Lepore , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Steve Kargl 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: Sat, 15 Sep 2012 14:30:28 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD9C266672136E6A48819681A Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 15-09-2012 16:09, Roman Divacky wrote: > Is this correct? >=20 > lev ~$ ./cos 1.23456789e20 > 6.031937e-01 > -9.629173e-02 > 2.814722e-01 Yes, that's what the libm call returns. --------------enigD9C266672136E6A48819681A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iF4EAREIAAYFAlBUkQAACgkQfoCS2CCgtiu03wD/StCLS1tOjOp3UkkD+fRztyo8 z8e/Pm7WnoD2QMytLNEA/jgDPK2zdM36tpGKICksSqLFnxpAeGaXYNYooSfDDX/4 =lFCh -----END PGP SIGNATURE----- --------------enigD9C266672136E6A48819681A-- From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 14:51: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 358671065672; Sat, 15 Sep 2012 14:51:28 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id A95B18FC16; Sat, 15 Sep 2012 14:51:27 +0000 (UTC) Received: by oagm1 with SMTP id m1so4522111oag.13 for ; Sat, 15 Sep 2012 07:51:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=XI2rZnqtnpZG90oJcZ2IWpbieOy3bIq7cJvK34SOcKs=; b=oAM8yQMQuPteBTt+VjcznO7j4G0z55UgqoZyCeBRqzH+GZUnR6Odb7TsQrYTO6D+62 RoeIK97WEl3b0JOe8DfRJSjbLfInSybLW9WmqTsrYTRlRM9KGiHChASwkKx7HJdrPQxm CwO3M+Fd5aVekPHwmMW5kd00WXoqGuEs2tDroxt/Fo/mrnjOJ0Gk9yNTbYKTcy4QeFHt W/RXw1VfyUB/lFvr9aL3m29USXn9W6xVnIb2qv/WJSLDzNZMHAtBnS9bXCWRnZqH0+yE kaxU7wnlzxDSDQvko/qgMlel5pi30O8Wq1bnrOh4xmrCncmf7RDgQn5AnlFEXA8ql7wR STDg== MIME-Version: 1.0 Received: by 10.182.76.194 with SMTP id m2mr7304525obw.27.1347720686884; Sat, 15 Sep 2012 07:51:26 -0700 (PDT) Received: by 10.182.141.66 with HTTP; Sat, 15 Sep 2012 07:51:26 -0700 (PDT) In-Reply-To: <505490FB.2000807@coosemans.org> References: <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> <20120915124809.GA10939@freebsd.org> <50548736.9030203@coosemans.org> <20120915140933.GA17801@freebsd.org> <505490FB.2000807@coosemans.org> Date: Sat, 15 Sep 2012 07:51:26 -0700 Message-ID: From: Mehmet Erol Sanliturk To: Tijl Coosemans Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Ian Lepore , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Steve Kargl 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: Sat, 15 Sep 2012 14:51:28 -0000 On Sat, Sep 15, 2012 at 7:30 AM, Tijl Coosemans wrote: > On 15-09-2012 16:09, Roman Divacky wrote: > > Is this correct? > > > > lev ~$ ./cos 1.23456789e20 > > 6.031937e-01 > > -9.629173e-02 > > 2.814722e-01 > > Yes, that's what the libm call returns. > > The following is a result in Fedora 17 x86_64 : Linux z 3.5.3-1.fc17.x86_64 #1 SMP Wed Aug 29 18:46:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux clang version 3.0 (tags/RELEASE_30/final) Target: x86_64-redhat-linux-gnu Thread model: posix cos : 2.814722e-01 cosf : -9.629173e-02 cosl : 7.738403e-01 Thank you very much . Mehmet Erol Sanliurk From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 15:39:24 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 24C94106568E; Sat, 15 Sep 2012 15:39:24 +0000 (UTC) (envelope-from m.e.sanliturk@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 89D468FC12; Sat, 15 Sep 2012 15:39:23 +0000 (UTC) Received: by obbun3 with SMTP id un3so9380070obb.13 for ; Sat, 15 Sep 2012 08:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=1tsqKuiyLYsZ3EZ1f3p88GXeFAsnhKJyJ5i1mJOOkBw=; b=y7O+TKxGTRgsH/uVX+JwdNG7NML4tiuisE5NKGSfxpBvSXSnTtnlwlJgBEUE6FWe3D RxPUTywo1NnQeTKngppXEcP862gyQe6+nPabUAyCvCqEY4kyXsNYyUQtR9qmbLpTWWye 0pss5V4QPkTXRkrWinrpoZ8ZpK5ciQPQ1SVQSAVguJhyOMewUscLQfi044rnUf6vIf0/ XKIOkckEyEcteTG4f17Y5NUvkkdsRso9RnhWzitYs4crxjSRsKiITB5t4Gpa/Qt4Cna3 uoyVAV5X6OoPsJuybs4dN26PjweLy9mVhBR+0qCZVUaM1ubr65FeiBy039LRFClqU08Y aH5w== MIME-Version: 1.0 Received: by 10.182.76.194 with SMTP id m2mr7438676obw.27.1347723562837; Sat, 15 Sep 2012 08:39:22 -0700 (PDT) Received: by 10.182.141.66 with HTTP; Sat, 15 Sep 2012 08:39:22 -0700 (PDT) In-Reply-To: <505490FB.2000807@coosemans.org> References: <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> <20120915124809.GA10939@freebsd.org> <50548736.9030203@coosemans.org> <20120915140933.GA17801@freebsd.org> <505490FB.2000807@coosemans.org> Date: Sat, 15 Sep 2012 08:39:22 -0700 Message-ID: From: Mehmet Erol Sanliturk To: Tijl Coosemans Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Ian Lepore , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Steve Kargl 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: Sat, 15 Sep 2012 15:39:24 -0000 On Sat, Sep 15, 2012 at 7:30 AM, Tijl Coosemans wrote: > On 15-09-2012 16:09, Roman Divacky wrote: > > Is this correct? > > > > lev ~$ ./cos 1.23456789e20 > > 6.031937e-01 > > -9.629173e-02 > > 2.814722e-01 > > Yes, that's what the libm call returns. > > Linux z 3.5.3-1.fc17.x86_64 #1 SMP Wed Aug 29 18:46:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux clang version 3.0 (tags/RELEASE_30/final) Target: x86_64-redhat-linux-gnu Thread model: posix Output of the initial program is the following : #include #include #include int main( int argc, char **argv ) { double d = strtod( argv[ 1 ], NULL ); printf( " cos : %e\n", ( double ) cos( d )); printf( "cosf : %e\n", ( double ) cosf( d )); printf( "cosl : %e\n", ( double ) cosl( d )); return( 0 ); } cos : 2.814722e-01 cosf : -9.629173e-02 cosl : 7.738403e-01 ....................................................... Output of the following program is different : #include #include #include int main( int argc, char **argv ) { double d ; double two_pi ; double f ; double v ; two_pi = 2 * 3.14159265358979323846 ; d = strtod( argv[ 1 ], NULL ); f = floor ( d / two_pi ) ; v = d - f * two_pi ; printf( " given : %e\n", ( double ) d ); printf( " multiplier : %e\n", ( double ) f ); printf( "reduced : %e\n", ( double ) v ); printf( " cos ( %e ) : %e\n", d , ( double ) cos( d )); printf( "cosf ( %e ) : %e\n", d , ( double ) cosf( d )); printf( "cosl ( %e ) : %e\n", d , ( double ) cosl( d )); printf( " cos ( %e ) : %e\n", v , ( double ) cos( v )); printf( "cosf ( %e ) : %e\n", v , ( double ) cosf( v )); printf( "cosl ( %e ) : %e\n", v , ( double ) cosl( v )); return( 0 ); } given : 1.234568e+20 multiplier : 1.964876e+19 reduced : 1.638400e+04 cos ( 1.234568e+20 ) : 2.814722e-01 cosf ( 1.234568e+20 ) : -9.629173e-02 cosl ( 1.234568e+20 ) : 7.738403e-01 cos ( 1.638400e+04 ) : -8.285342e-01 cosf ( 1.638400e+04 ) : -8.285342e-01 cosl ( 1.638400e+04 ) : -8.285342e-01 ....................................................... Reduction of argument once more did NOT change results : #include #include #include int main( int argc, char **argv ) { double d ; double two_pi ; double f ; double v ; double g ; double w ; two_pi = 2 * 3.14159265358979323846 ; d = strtod( argv[ 1 ], NULL ); printf( " given : %e\n", ( double ) d ); printf( " cos ( %e ) : %e\n", d , ( double ) cos( d )); printf( "cosf ( %e ) : %e\n", d , ( double ) cosf( d )); printf( "cosl ( %e ) : %e\n", d , ( double ) cosl( d )); f = floor ( d / two_pi ) ; v = d - f * two_pi ; printf( "multiplier : %e\n", ( double ) f ); printf( " reduced : %e\n", ( double ) v ); printf( " cos ( %e ) : %e\n", v , ( double ) cos( v )); printf( "cosf ( %e ) : %e\n", v , ( double ) cosf( v )); printf( "cosl ( %e ) : %e\n", v , ( double ) cosl( v )); g = floor ( v / two_pi ) ; w = v - g * two_pi ; printf( "multiplier : %e\n", ( double ) g ); printf( " reduced : %e\n", ( double ) w ); printf( " cos ( %e ) : %e\n", w , ( double ) cos( w )); printf( "cosf ( %e ) : %e\n", w , ( double ) cosf( w )); printf( "cosl ( %e ) : %e\n", w , ( double ) cosl( w )); return( 0 ); } given : 1.234568e+20 cos ( 1.234568e+20 ) : 2.814722e-01 cosf ( 1.234568e+20 ) : -9.629173e-02 cosl ( 1.234568e+20 ) : 7.738403e-01 multiplier : 1.964876e+19 reduced : 1.638400e+04 cos ( 1.638400e+04 ) : -8.285342e-01 cosf ( 1.638400e+04 ) : -8.285342e-01 cosl ( 1.638400e+04 ) : -8.285342e-01 multiplier : 2.607000e+03 reduced : 3.735904e+00 cos ( 3.735904e+00 ) : -8.285342e-01 cosf ( 3.735904e+00 ) : -8.285342e-01 cosl ( 3.735904e+00 ) : -8.285342e-01 ....................................................... Thank you very much . Mehmet Erol Sanliturk From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 16:03:26 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 A0F0A106564A for ; Sat, 15 Sep 2012 16:03:26 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 51E238FC0A for ; Sat, 15 Sep 2012 16:03:26 +0000 (UTC) Received: by iea17 with SMTP id 17so4700342iea.13 for ; Sat, 15 Sep 2012 09:03:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=hB43GeEg7m72IIQL0vJ/kfsud7K7kKRQD1qHltBw8K4=; b=LbpDmk3pljRjmMw5yQC+nbpbyd2rlYPVxvLBbNT18J82bvZ2/5BdrTWBRdqTdAb5zl 6JmHNZdXx4v9YYZ9obU1NTlARge154ZtV6OAgFT2jImKRpY4KlaA95i894gkYyxkjFmA zEPubs1mqTYPjbwAm/x496yXvlx3fN5FaztNpnDAVLjplOzi5rf9CuSz+Qe9YNPUEvv3 /7I5XXL+aTBET6r8mypENGTts56X7aTg6ZSpfqhCeAgOJ4Cy61Tov0ngZOpepQC3gmAB G3juqDlFcQRJfoSKPHSt5FTamGIlkX8VLIzOcBEsSG5Bpg5GqWVLrmKQ03uICPiiZQws V2Mg== Received: by 10.42.43.1 with SMTP id v1mr5189013ice.23.1347725005662; Sat, 15 Sep 2012 09:03:25 -0700 (PDT) Received: from 63.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id ce10sm3764831igb.1.2012.09.15.09.03.23 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 15 Sep 2012 09:03:25 -0700 (PDT) Sender: Warner Losh Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <20120915091455.GA93876@freebsd.org> Date: Sat, 15 Sep 2012 10:03:22 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <504F4645.4070900@FreeBSD.org> <504F4A6B.4010001@coosemans.org> <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> <20120915091455.GA93876@freebsd.org> To: Roman Divacky X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQnA6tCfLeEauIdVcOHoYCf4S7UjCaUSjNVZDjDqTmJkitU513zJGaRhfp9bQu3ULdTrEhEU Cc: Ian Lepore , Tijl Coosemans , current@freebsd.org, Dimitry Andric , toolchain@freebsd.org, Steve Kargl 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: Sat, 15 Sep 2012 16:03:26 -0000 On Sep 15, 2012, at 3:14 AM, Roman Divacky wrote: > LLVM by default turns these: >=20 > case LibFunc::copysign: case LibFunc::copysignf: case = LibFunc::copysignl: > case LibFunc::fabs: case LibFunc::fabsf: case = LibFunc::fabsl: > case LibFunc::sin: case LibFunc::sinf: case = LibFunc::sinl: > case LibFunc::cos: case LibFunc::cosf: case = LibFunc::cosl: > case LibFunc::sqrt: case LibFunc::sqrtf: case = LibFunc::sqrtl: > case LibFunc::floor: case LibFunc::floorf: case = LibFunc::floorl: > case LibFunc::nearbyint: case LibFunc::nearbyintf: case = LibFunc::nearbyintl: > case LibFunc::ceil: case LibFunc::ceilf: case = LibFunc::ceill: > case LibFunc::rint: case LibFunc::rintf: case = LibFunc::rintl: > case LibFunc::trunc: case LibFunc::truncf: case = LibFunc::truncl: > case LibFunc::log2: case LibFunc::log2f: case = LibFunc::log2l: > case LibFunc::exp2: case LibFunc::exp2f: case = LibFunc::exp2l: >=20 > from lib calls to direct code (ie. instruction or sequence of). This = is not a "bug" > but feature ;) >=20 > I am not sure what the rules for the transformation should be. Allow = it only with > -ffast-math ? Disallow it on i386? Really, no idea. In the past, gcc has only done this with -ffast-math, but my 'in the = past' is a long time ago... > Steve, you tested on i386? Can you test on amd64? >=20 > Do you guys have any opinion what to do here? >=20 > On Fri, Sep 14, 2012 at 06:06:00PM -0700, Steve Kargl wrote: >> On Fri, Sep 14, 2012 at 05:18:08PM -0700, Steve Kargl wrote: >>>=20 >>> A third class of failure appears to be that clang emits >>> i387 fpu instructions for at least sinf and cosf instead=20 >>> of calls to the library routines. AFAIK, the library >>> routines are faster and more accurate. >>>=20 >>=20 >> Yep. Clang has problems with at least sinf on i386 FreeBSD. >>=20 >> % pwd >> /usr/home/kargl/trunk/math/sine >>=20 >> % make clean && make CC=3Dcc testf >> cc -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c \ >> -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm >>=20 >> % ./testf -m 0 -M 1e20 -r >> ULP Range | >> -----------+------------------------- >> [0.0:0.6] | 1006424 (100.00%) >> (0.6:0.7] | 0 ( 0.00%) >> (0.7:0.8] | 0 ( 0.00%) >> (0.8:0.9] | 0 ( 0.00%) >> (0.9:1.0] | 0 ( 0.00%) >> (1.0:2.0] | 0 ( 0.00%) >> (2.0:3.0] | 0 ( 0.00%) >> 3.0 < ULP | 0 ( 0.00%) >> -----------+------------------------- >> Count | 1006424 >> Max ULP | 0.50084 >> Max ULP x | 53462490661259313152.000000 0x1.72f876p+65 >>=20 >> % make clean && make CC=3Dclang testf >> clang -o testf -O2 -pipe -static -I/usr/local/include -I../mp testf.c = \ >> -L/usr/local/lib -L../mp -lsgk -lmpfr -lgmp -lm >>=20 >> % ./testf -m 0 -M 1e20 -r >> ULP Range | >> -----------+------------------------- >> [0.0:0.6] | 1 ( 0.00%) >> (0.6:0.7] | 0 ( 0.00%) >> (0.7:0.8] | 0 ( 0.00%) >> (0.8:0.9] | 0 ( 0.00%) >> (0.9:1.0] | 0 ( 0.00%) >> (1.0:2.0] | 0 ( 0.00%) >> (2.0:3.0] | 0 ( 0.00%) >> 3.0 < ULP | 999998 (100.00%) >> -----------+------------------------- >> Count | 999999 >> Max ULP | 1328505256679420125050194353979392.00000 >> Max ULP x | 75516780764213542912.000000 0x1.06006p+66 >>=20 >> --=20 >> Steve >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to = "freebsd-current-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-toolchain@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > To unsubscribe, send any mail to = "freebsd-toolchain-unsubscribe@freebsd.org" From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 17:18:29 2012 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7A7DC1065670; Sat, 15 Sep 2012 17:18:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 290EF8FC0C; Sat, 15 Sep 2012 17:18:28 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:244e:b47c:3b46:43d5] (unknown [IPv6:2001:7b8:3a7:0:244e:b47c:3b46:43d5]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id CD5525C37; Sat, 15 Sep 2012 19:18:21 +0200 (CEST) Message-ID: <5054B864.8000308@FreeBSD.org> Date: Sat, 15 Sep 2012 19:18:28 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: Tijl Coosemans References: <504F5101.8090906@FreeBSD.org> <505101C3.70203@freebsd.org> <20120913020833.GA8255@troutmask.apl.washington.edu> <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> <20120915124809.GA10939@freebsd.org> <50548736.9030203@coosemans.org> <20120915140933.GA17801@freebsd.org> <505490FB.2000807@coosemans.org> In-Reply-To: <505490FB.2000807@coosemans.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ian Lepore , current@freebsd.org, toolchain@freebsd.org, Steve Kargl 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: Sat, 15 Sep 2012 17:18:29 -0000 On 2012-09-15 16:30, Tijl Coosemans wrote: > On 15-09-2012 16:09, Roman Divacky wrote: >> Is this correct? >> >> lev ~$ ./cos 1.23456789e20 >> 6.031937e-01 >> -9.629173e-02 >> 2.814722e-01 > > Yes, that's what the libm call returns. Fix committed in . From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 18:21:55 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 B3D9E106564A; Sat, 15 Sep 2012 18:21:55 +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 87DBE8FC0A; Sat, 15 Sep 2012 18:21:55 +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 q8FILqPZ073944; Sat, 15 Sep 2012 11:21:52 -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 q8FILqb4073943; Sat, 15 Sep 2012 11:21:52 -0700 (PDT) (envelope-from sgk) Date: Sat, 15 Sep 2012 11:21:52 -0700 From: Steve Kargl To: Dimitry Andric Message-ID: <20120915182152.GA73903@troutmask.apl.washington.edu> References: <1347550332.1110.108.camel@revolution.hippie.lan> <20120913161024.GA13846@troutmask.apl.washington.edu> <20120914202319.GB5244@lor.one-eyed-alien.net> <20120915001808.GA70215@troutmask.apl.washington.edu> <20120915010600.GA70426@troutmask.apl.washington.edu> <20120915124809.GA10939@freebsd.org> <50548736.9030203@coosemans.org> <20120915140933.GA17801@freebsd.org> <505490FB.2000807@coosemans.org> <5054B864.8000308@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5054B864.8000308@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: Ian Lepore , Tijl Coosemans , current@FreeBSD.org, Roman Divacky , toolchain@FreeBSD.org, Brooks Davis , Nathan Whitehorn 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: Sat, 15 Sep 2012 18:21:55 -0000 On Sat, Sep 15, 2012 at 07:18:28PM +0200, Dimitry Andric wrote: > On 2012-09-15 16:30, Tijl Coosemans wrote: > >On 15-09-2012 16:09, Roman Divacky wrote: > >>Is this correct? > >> > >>lev ~$ ./cos 1.23456789e20 > >>6.031937e-01 > >>-9.629173e-02 > >>2.814722e-01 > > > >Yes, that's what the libm call returns. > > Fix committed in . Thanks. -- Steve From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 22:34:49 2012 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B30E106564A; Sat, 15 Sep 2012 22:34:48 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 207C28FC08; Sat, 15 Sep 2012 22:34:45 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:244e:b47c:3b46:43d5] (unknown [IPv6:2001:7b8:3a7:0:244e:b47c:3b46:43d5]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 441D75C37; Sun, 16 Sep 2012 00:34:43 +0200 (CEST) Message-ID: <50550285.4040203@andric.com> Date: Sun, 16 Sep 2012 00:34:45 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: freebsd-current@FreeBSD.org, freebsd-toolchain@FreeBSD.org Content-Type: multipart/mixed; boundary="------------090906020004070601070605" Cc: Subject: Compiler performance tests on FreeBSD 10.0-CURRENT 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: Sat, 15 Sep 2012 22:34:49 -0000 This is a multi-part message in MIME format. --------------090906020004070601070605 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi all, By request, I performed a series of kernel performance tests on FreeBSD 10.0-CURRENT, particularly comparing the runtime performance of GENERIC kernels compiled by gcc 4.2.1 and by clang 3.2. The attached text file[1] contains more information about the tests, some semi-cooked performance data, and my conclusions. Any errors and omissions are also my fault, so if you notice them, please let me know. The executive summary: GENERIC kernels compiled with clang 3.2 are slightly faster than those compiled by gcc 4.2.1, though the difference will not very noticeable in practice. Last but not least, thanks to Gavin Atkinson for providing the required hardware. -Dimitry [1]: Also available at: --------------090906020004070601070605 Content-Type: text/plain; charset=windows-1252; name="perftest-kernel-2012-09-14a.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="perftest-kernel-2012-09-14a.txt" KERNEL PERFORMANCE TESTS ON FREEBSD 10.0-CURRENT, SEPTEMBER 2012 ================================================================ INTRODUCTION ------------ These tests aim to give an indication of the runtime performance of FreeBSD kernels compiled with different compilers. The compilers tested were: - gcc 4.2.1, the system compiler in FreeBSD. - clang 3.2 (trunk 162107), which is the default version of clang in FreeBSD 10.0-CURRENT, after r239462. All tests were run on a machine gracefully provided by Gavin Atkinson, which is a Dell PowerEdge 2850, with two 2.80 GHz Xeon-class CPUs (id=0xf41), and 4 GB RAM. It runs FreeBSD/amd64 10.0-CURRENT as of Tue Sep 11 19:11:00 UTC 2012. With each compiler, a stock GENERIC kernel for amd64 was built from head as of r240384, with the default optimization flags for this architecture, which are for gcc: -O2 -frename-registers -pipe -fno-strict-aliasing and for clang: -O2 -pipe -fno-strict-aliasing Each kernel was installed into /boot/kernel.${compilername}. The system was then booted with each of these kernels, without modifying anything else, and multiple runs of "make buildworld" were done; first in single-threaded mode, next in multi-threaded mode, using the -j8 flag. Between each run, the /usr/obj directory was fully cleaned out, and filesystems were synced. The timing results are below. Building world, single-threaded, on a GENERIC kernel compiled by clang 3.2 -------------------------------------------------------------------------- N Min Max Median Avg Stddev real 3 26589.27 26680.48 26653.58 26641.11 46.866211 user 3 20449.52 20472.88 20463.4 20461.933 11.748861 sys 3 7809.87 7837.94 7830.35 7826.0533 14.519891 maxrss 3 759420 759420 759420 759420 0 ixrss 3 4923 4926 4924 4924.3333 1.5275252 idrss 3 584 584 584 584 0 isrss 3 131 131 131 131 0 minflt 3 6.5828088e+08 6.5855089e+08 6.5828258e+08 6.5837145e+08 155402.8 majflt 3 0 2573 2568 1713.6667 1484.081 nswap 3 0 0 0 0 0 inblock 3 2176 30252 30170 20866 16186.067 oublock 3 28370 28377 28375 28374 3.6055513 msgsnd 3 0 5 2 2.3333333 2.5166115 msgrcv 3 0 3 2 1.6666667 1.5275252 nsignals 3 74107 74107 74107 74107 0 nvcsw 3 1086164 1107104 1106650 1099972.7 11960.81 nivcsw 3 604641 658906 616307 626618 28564.14 Building world, single-threaded, on a GENERIC kernel compiled by gcc 4.2.1 -------------------------------------------------------------------------- N Min Max Median Avg Stddev real 3 26986.71 27080.38 26992.54 27019.877 52.478445 user 3 20506.89 20516.1 20511.66 20511.55 4.6059852 sys 3 8245.69 8285.79 8253.04 8261.5067 21.348673 maxrss 3 759420 759420 759420 759420 0 ixrss 3 4894 4900 4898 4897.3333 3.0550505 idrss 3 581 581 581 581 0 isrss 3 131 131 131 131 0 minflt 3 6.5855245e+08 6.5855409e+08 6.5855253e+08 6.5855302e+08 922.2581 majflt 3 0 2566 0 855.33333 1481.4808 nswap 3 0 0 0 0 0 inblock 3 1619 29805 2008 11144 16162.07 oublock 3 28652 28747 28662 28687 52.201533 msgsnd 3 0 2 0 0.66666667 1.1547005 msgrcv 3 0 2 0 0.66666667 1.1547005 nsignals 3 74107 74107 74107 74107 0 nvcsw 3 1088827 1110096 1089758 1096227 12019.924 nivcsw 3 631463 668779 638421 646221 19843.159 Summary: -------- On a kernel compiled with gcc 4.2.1, building world in single-threaded mode is ~1.4% slower in real time than on a kernel compiled with clang 3.2, equally fast in user time, and ~5.6% slower in system time. Conclusion: ----------- The difference in real time is rather minimal, and even negligible in user time, but in system time it is much more pronounced. Since system time can be attributed to the kernel proper, a kernel compiled with clang 3.2 is clearly faster than a kernel compiled with gcc 4.2.1, by a margin of just over 5 percent. Building world, multi-threaded, on a GENERIC kernel compiled by clang 3.2 ------------------------------------------------------------------------- N Min Max Median Avg Stddev real 3 13832.75 13875.24 13871.47 13859.82 23.518969 user 3 33658.54 33743.43 33730.26 33710.743 45.686467 sys 3 14704.76 14775.59 14744.45 14741.6 35.500903 maxrss 3 758256 758256 758256 758256 0 ixrss 3 4829 4831 4830 4830 1 idrss 3 573 574 574 573.66667 0.57735027 isrss 3 130 130 130 130 0 minflt 3 6.6259374e+08 6.6304066e+08 6.6288552e+08 6.6283997e+08 226911.43 majflt 3 3160 4003 3801 3654.6667 440.13899 nswap 3 40 40 40 40 0 inblock 3 27763 28008 27853 27874.667 123.92874 oublock 3 55003 58725 57061 56929.667 1864.4724 msgsnd 3 0 0 0 0 0 msgrcv 3 0 0 0 0 0 nsignals 3 60496 60506 60499 60500.333 5.1316014 nvcsw 3 1891074 1894870 1893148 1893030.7 1900.7181 nivcsw 3 3095468 3126475 3116877 3112940 15873.988 Building world, multi-threaded, on a GENERIC kernel compiled by gcc 4.2.1 ------------------------------------------------------------------------- N Min Max Median Avg Stddev real 3 14017.65 14046.35 14042.26 14035.42 15.524552 user 3 33596.19 33687.03 33661.9 33648.373 46.906337 sys 3 15347.75 15438.63 15436.98 15407.787 51.999823 maxrss 3 758228 758248 758244 758240 10.583005 ixrss 3 4808 4809 4809 4808.6667 0.57735027 idrss 3 571 571 571 571 0 isrss 3 130 130 130 130 0 minflt 3 6.6301232e+08 6.6339175e+08 6.6312437e+08 6.6317615e+08 194941.64 majflt 3 3715 5509 3812 4345.3333 1008.9313 nswap 3 40 40 40 40 0 inblock 3 28327 43672 28374 33457.667 8845.9034 oublock 3 50661 57892 56870 55141 3913.3005 msgsnd 3 0 0 0 0 0 msgrcv 3 0 0 0 0 0 nsignals 3 60501 60506 60504 60503.667 2.5166114 nvcsw 3 1882397 1910610 1895448 1896151.7 14119.657 nivcsw 3 2747620 2856552 2788778 2797650 55005.267 Summary: -------- On a kernel compiled with gcc 4.2.1, building world in multi-threaded mode is ~1.3% slower in real time than on a kernel compiled with clang 3.2, equally fast in user time, and ~4.5% slower in system time. Conclusion: ----------- As with single-threaded mode, the difference in real time is rather minimal, and even negligible in user time, but in system time it is much more pronounced. Since system time can be attributed to the kernel proper, a kernel compiled with clang 3.2 is clearly faster than a kernel compiled with gcc 4.2.1, by a margin of just over 4 percent. ================================================================================ Copyright (c) 2012 Dimitry Andric Verbatim copying and redistribution of this entire text are permitted, provided this notice is preserved. ================================================================================ --------------090906020004070601070605-- From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 23:02:44 2012 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 623AF106566C; Sat, 15 Sep 2012 23:02:44 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.59.238]) by mx1.freebsd.org (Postfix) with ESMTP id 1EB508FC1A; Sat, 15 Sep 2012 23:02:44 +0000 (UTC) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 986427300A; Sun, 16 Sep 2012 01:22:20 +0200 (CEST) Date: Sun, 16 Sep 2012 01:22:20 +0200 From: Luigi Rizzo To: Dimitry Andric Message-ID: <20120915232220.GA50519@onelab2.iet.unipi.it> References: <50550285.4040203@andric.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50550285.4040203@andric.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@FreeBSD.org, freebsd-toolchain@FreeBSD.org Subject: Re: Compiler performance tests on FreeBSD 10.0-CURRENT 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: Sat, 15 Sep 2012 23:02:44 -0000 On Sun, Sep 16, 2012 at 12:34:45AM +0200, Dimitry Andric wrote: > Hi all, > > By request, I performed a series of kernel performance tests on FreeBSD > 10.0-CURRENT, particularly comparing the runtime performance of GENERIC > kernels compiled by gcc 4.2.1 and by clang 3.2. the fact that the difference is so small is interesting, and it might almost suggests that the test is dominated by other factors than the compiler. By chance do you have a way to produce other data points with different optimization levels in the compiler ? cheers luigi From owner-freebsd-toolchain@FreeBSD.ORG Sat Sep 15 23:42:34 2012 Return-Path: Delivered-To: freebsd-toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87153106566C; Sat, 15 Sep 2012 23:42:34 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 423778FC08; Sat, 15 Sep 2012 23:42:34 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:244e:b47c:3b46:43d5] (unknown [IPv6:2001:7b8:3a7:0:244e:b47c:3b46:43d5]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 981045C37; Sun, 16 Sep 2012 01:42:32 +0200 (CEST) Message-ID: <50551266.3000704@andric.com> Date: Sun, 16 Sep 2012 01:42:30 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20120905 Thunderbird/16.0 MIME-Version: 1.0 To: Luigi Rizzo References: <50550285.4040203@andric.com> <20120915232220.GA50519@onelab2.iet.unipi.it> In-Reply-To: <20120915232220.GA50519@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, freebsd-toolchain@FreeBSD.org Subject: Re: Compiler performance tests on FreeBSD 10.0-CURRENT 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: Sat, 15 Sep 2012 23:42:34 -0000 On 2012-09-16 01:22, Luigi Rizzo wrote: ... > the fact that the difference is so small is interesting, > and it might almost suggests that the test is dominated by > other factors than the compiler. Yes, this result was more or less what I expected: runtime performance is probably related more to hardware speed, and the efficiency of the chosen algorithms in the kernel, than to the optimizations any current compiler can produce. Apparently our kernel hackers already produce quite efficient code. :) > By chance do you have a > way to produce other data points with different optimization > levels in the compiler ? I could re-run the tests with e.g. -O1 instead of -O2, or maybe even -O0, though I am not sure if the kernel will compile correctly without any optimization. This will take a while though, and I am not sure if I can borrow Gavin's machine long enough. :) -Dimitry