From owner-freebsd-toolchain@FreeBSD.ORG Wed Jan 1 22:33:04 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 493F117F for ; Wed, 1 Jan 2014 22:33:04 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 068D51AD3 for ; Wed, 1 Jan 2014 22:33:03 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::8965:e429:7812:5bf6] (unknown [IPv6:2001:7b8:3a7:0:8965:e429:7812:5bf6]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9B2F65C43 for ; Wed, 1 Jan 2014 23:33:01 +0100 (CET) From: Dimitry Andric Content-Type: multipart/signed; boundary="Apple-Mail=_7DFEBF2B-9B36-4041-858D-B50D70ABC315"; protocol="application/pgp-signature"; micalg=pgp-sha1 Subject: [CFT] Update to clang 3.4 Message-Id: <541C998A-071A-4917-9D91-DD00CB0E2689@FreeBSD.org> Date: Wed, 1 Jan 2014 23:32:35 +0100 To: freebsd-toolchain@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) X-Mailer: Apple Mail (2.1827) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 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, 01 Jan 2014 22:33:04 -0000 --Apple-Mail=_7DFEBF2B-9B36-4041-858D-B50D70ABC315 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, I have almost completed the preliminary work to import clang 3.4 into FreeBSD 11-CURRENT. The official clang 3.4 release has not yet been announced, but I do not expect any more changes from upstream for now. However, since this version introduces a bunch of new warnings, and a more strict options parser, I would like to call for some additional testing by anyone who is interested. Specifically, the following: * Building and installing world with non-standard settings in make.conf and/or src.conf. * Compiling your favorite set of ports. (I will request a ports exp-run too). * Fixing any kernel source with LINT that has not yet been fixed. (I am still working on some of the things that are not in GENERIC.) * Any other problems you may encounter with optimization, incompatibilities, and so on. One thing to look out for, in particular with ports, is the more strict option parsing introduced with clang 3.4. In earlier releases, unknown or unsupported command line options were ignored, with just a "argument unused during compilation" warning. =46rom 3.4 onwards, such options = will result in a "unknown argument" error. Another important new issue is that clang 3.4 now outputs DWARF4 as default format when using -g. Our ancient version of gdb in base does not support this, so you must either install the gdb port, or build lldb and use it (very experimental at this time!). Moreover, our CTF tools such as ctfconvert use a quite old version of libdwarf in our base system, which also does not support DWARF4. So ctfconvert processing of kernel objects doe not work at the moment. Any assistance with solving this (for example, by importing the most recent libdwarf from upstream) is greatly appreciated. The current patch, which can be applied to head r260112 or later, is located here: http://www.andric.com/freebsd/clang/head-r260112-clang34-1.diff.xz SHA256 (head-r260112-clang34-1.diff.xz) =3D = 1b5735946526fe97f0cea1822ecbcc3ec86f15282277aef7e3d7b2835a777b11 To apply, unxz the file into a fresh head checkout, and run: svn patch head-r260112-clang34-1.diff Please check carefully if Subversion reports no problems during patching, as it is rather fragile. Afterwards, you can do a normal world and kernel build, and installation. -Dimitry --Apple-Mail=_7DFEBF2B-9B36-4041-858D-B50D70ABC315 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlLEl4wACgkQsF6jCi4glqPrPgCg8wsXI1fAYEbtcoEYkr1SluUJ mPEAoNK28Fljff116kYkxCuWHTYDt/0R =5WwH -----END PGP SIGNATURE----- --Apple-Mail=_7DFEBF2B-9B36-4041-858D-B50D70ABC315-- From owner-freebsd-toolchain@FreeBSD.ORG Wed Jan 1 22:37:54 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 114A8324 for ; Wed, 1 Jan 2014 22:37:54 +0000 (UTC) Received: from mail-ig0-f173.google.com (mail-ig0-f173.google.com [209.85.213.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CDF1F1AF7 for ; Wed, 1 Jan 2014 22:37:53 +0000 (UTC) Received: by mail-ig0-f173.google.com with SMTP id ut6so1370125igb.0 for ; Wed, 01 Jan 2014 14:37:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=zvc4/IiLA6GxkLybbSB0lm4ahzcfHIbv+uCR28HDRTA=; b=ilAaeyAU1gPrkAmQ/bBT+KJ2p6ve8ujo/eT7nKb/+emymzBTwoenxgAJBrVnFuURH2 jV2++IcMq8bo1VdIXfCP4pLZq+9iRuIYnd9VSeVf+Oygm8XnJ2/p7gRXYZCc9MmJTvXA +FWa+LPhP11ZwBSk4TNdHwRVq/+ibo5sBju7EHnn5VHmo7k1B7SP3qhuZ/O4vxwTWYSL zMqi2Cg4hr62kSH9/eYCUE736NFSWyHAc5Luta5WGi+XZqikpXcN0OGgnH8MQhThCJug rnLyjJiCVo50Y/pFvXO1lOHeuX685wfkFoWSvz5q/bGVrsr1xMgjgldSdfLoSo9FCyAD b/+A== X-Gm-Message-State: ALoCoQk3QqosZX1beOKbyzYPVgYHMQILwEvljuq0Yscow/ciwO2+LkEjoEY1//Zfl0TrIHvyf1qk X-Received: by 10.43.71.200 with SMTP id yl8mr2975870icb.74.1388615867177; Wed, 01 Jan 2014 14:37:47 -0800 (PST) Received: from fusion-mac.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id da14sm69198053igc.1.2014.01.01.14.37.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 01 Jan 2014 14:37:46 -0800 (PST) Sender: Warner Losh Subject: Re: [CFT] Update to clang 3.4 Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <541C998A-071A-4917-9D91-DD00CB0E2689@FreeBSD.org> Date: Wed, 1 Jan 2014 15:37:45 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <63BD3165-A62E-4FE7-9817-4A2692584916@bsdimp.com> References: <541C998A-071A-4917-9D91-DD00CB0E2689@FreeBSD.org> To: Dimitry Andric X-Mailer: Apple Mail (2.1085) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 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, 01 Jan 2014 22:37:54 -0000 I'd add to the list the upgrade path (from 9.x, 10.x and current) as = well, just to make sure they all still work... If there are problems = with the 9.x upgrade path, we'll need to call them out since 10.0 hasn't = been released yet and there's still a lot of 9.x boxes in the wild... Warner On Jan 1, 2014, at 3:32 PM, Dimitry Andric wrote: > Hi, >=20 > I have almost completed the preliminary work to import clang 3.4 into > FreeBSD 11-CURRENT. The official clang 3.4 release has not yet been > announced, but I do not expect any more changes from upstream for now. >=20 > However, since this version introduces a bunch of new warnings, and a > more strict options parser, I would like to call for some additional > testing by anyone who is interested. >=20 > Specifically, the following: > * Building and installing world with non-standard settings in = make.conf > and/or src.conf. > * Compiling your favorite set of ports. (I will request a ports > exp-run too). > * Fixing any kernel source with LINT that has not yet been fixed. (I > am still working on some of the things that are not in GENERIC.) > * Any other problems you may encounter with optimization, > incompatibilities, and so on. >=20 > One thing to look out for, in particular with ports, is the more = strict > option parsing introduced with clang 3.4. In earlier releases, = unknown > or unsupported command line options were ignored, with just a = "argument > unused during compilation" warning. =46rom 3.4 onwards, such options = will > result in a "unknown argument" error. >=20 > Another important new issue is that clang 3.4 now outputs DWARF4 as > default format when using -g. Our ancient version of gdb in base does > not support this, so you must either install the gdb port, or build = lldb > and use it (very experimental at this time!). >=20 > Moreover, our CTF tools such as ctfconvert use a quite old version of > libdwarf in our base system, which also does not support DWARF4. So > ctfconvert processing of kernel objects doe not work at the moment. = Any > assistance with solving this (for example, by importing the most = recent > libdwarf from upstream) is greatly appreciated. >=20 > The current patch, which can be applied to head r260112 or later, is > located here: >=20 > http://www.andric.com/freebsd/clang/head-r260112-clang34-1.diff.xz >=20 > SHA256 (head-r260112-clang34-1.diff.xz) =3D = 1b5735946526fe97f0cea1822ecbcc3ec86f15282277aef7e3d7b2835a777b11 >=20 > To apply, unxz the file into a fresh head checkout, and run: >=20 > svn patch head-r260112-clang34-1.diff >=20 > Please check carefully if Subversion reports no problems during > patching, as it is rather fragile. Afterwards, you can do a normal > world and kernel build, and installation. >=20 > -Dimitry >=20 From owner-freebsd-toolchain@FreeBSD.ORG Thu Jan 2 00:11:45 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C92D1E7A for ; Thu, 2 Jan 2014 00:11:45 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 84FC411BF for ; Thu, 2 Jan 2014 00:11:45 +0000 (UTC) Received: from coleburn.home.andric.com (coleburn.home.andric.com [192.168.0.15]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8ABC95C43; Thu, 2 Jan 2014 01:11:41 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_4087D795-B0AA-4DC9-AC88-F7941C5B067A"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: [CFT] Update to clang 3.4 From: Dimitry Andric In-Reply-To: <63BD3165-A62E-4FE7-9817-4A2692584916@bsdimp.com> Date: Thu, 2 Jan 2014 01:11:18 +0100 Message-Id: <264FAA6E-871A-48AF-A8D9-EC431A537195@FreeBSD.org> References: <541C998A-071A-4917-9D91-DD00CB0E2689@FreeBSD.org> <63BD3165-A62E-4FE7-9817-4A2692584916@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1827) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 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, 02 Jan 2014 00:11:45 -0000 --Apple-Mail=_4087D795-B0AA-4DC9-AC88-F7941C5B067A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 01 Jan 2014, at 23:37, Warner Losh wrote: > I'd add to the list the upgrade path (from 9.x, 10.x and current) as = well, just to make sure they all still work... If there are problems = with the 9.x upgrade path, we'll need to call them out since 10.0 hasn't = been released yet and there's still a lot of 9.x boxes in the wild... Ah yes, I already found one issue when building head on 9-STABLE: In file included from contrib/llvm/lib/Support/Signals.cpp:30: contrib/llvm/lib/Support/Unix/Signals.inc:22:11: fatal error: = 'execinfo.h' file not found # include // For backtrace(). ^ This is of course a detection from autoconf which finds execinfo.h on -current. So I will need to make that __FreeBSD_version dependent. -Dimitry --Apple-Mail=_4087D795-B0AA-4DC9-AC88-F7941C5B067A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlLErqoACgkQsF6jCi4glqO/OwCgk7CUoPFq+1VRWz6xR9n0J99K euAAn0zolGfbeLXWugeM5N2yktcH9LlO =fpW1 -----END PGP SIGNATURE----- --Apple-Mail=_4087D795-B0AA-4DC9-AC88-F7941C5B067A-- From owner-freebsd-toolchain@FreeBSD.ORG Thu Jan 2 20:27:53 2014 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CD04762 for ; Thu, 2 Jan 2014 20:27:53 +0000 (UTC) Received: from nm35-vm5.bullet.mail.bf1.yahoo.com (nm35-vm5.bullet.mail.bf1.yahoo.com [72.30.238.77]) by mx1.freebsd.org (Postfix) with SMTP id 1285C1F92 for ; Thu, 2 Jan 2014 20:27:52 +0000 (UTC) Received: from [66.196.81.173] by nm35.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jan 2014 20:22:19 -0000 Received: from [98.139.211.161] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jan 2014 20:22:19 -0000 Received: from [127.0.0.1] by smtp218.mail.bf1.yahoo.com with NNFMP; 02 Jan 2014 20:22:19 -0000 X-Yahoo-Newman-Id: 49682.48637.bm@smtp218.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: R9RzEoIVM1lQbiDwnTu4MqGLXCyYoDwss8pacTq65H0V6YS WuOn.cOswenDSNtk4qtq6JLeDLf9RnnIdATJFwdDPH29IFu38OBgs8i5Ft3q f9WOGmUP1tS7CzsBo5y9fzlje.77Wos1_diLsgh6E3lRHZbIAWSq1NwvyHxe hc90cH2lhHZ2AuhkDk4HEUUQZF7QqgUp7e8jlpjtlashoWUa6adFTl1.aLqa WcT78g9EOORUOg3kDQdz8eCCcWd1n7Pb0hBN1RjiEtcXQJQXUhnVcgcDrMMp MipioF9BjtdHQhIMhJxG3mcy5aqNDAo4949r435ipkhBfJ32UcGEJ8d9ID7Z p8bXe6MxdxINM_fIBoUQdyamRasaAKIZS3iI0BuPNy9bd0_SP4r3nnVuh_Dk yiF8fYfa2K_CE.YpZ5nZCb9YZUeSDNQkZcMJHDO_x00DGXiqsnrGjyrDzxDt YDXxir0QUIZcXKqqOi9Nm6Wm4pEO_DCbuk8lmYy9yTEugrpUdg_1vFxjkQm. qEr_HSG1.VuFj6i7lZpOOYxY.a5VNYRfZ1e_hHSK48oFOUYNPqKnqG7aKWuw 4r1tezWCgCFBBs0vzM6p1ZNayL6Gqdg1.e0spGUulITwICULlVo.Zn7gb0Kl 4zbUHQolZ5C.znypixF4btxSI73GycWqfvVEy8yaJu9VWYN4kXy5X.7Xg77d YUJ2wvQ24yJv5L9aatfwNQxzolyNk2IwUWnlHGEz4IoCzhGF0Mhn9Bvk6csM xpO7lvZg7Z0bufY5HNGPPrN1pbitxebap X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with ) by smtp218.mail.bf1.yahoo.com with SMTP; 02 Jan 2014 12:22:18 -0800 PST Message-ID: <52C5CA79.90706@FreeBSD.org> Date: Thu, 02 Jan 2014 15:22:17 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: David Chisnall Subject: Re: Apple's GCC 42 enhancements (was Re: [CFT] Experimental gcc update). References: <528A924A.8050904@FreeBSD.org> <529127F8.5080606@FreeBSD.org> <3826345B-E783-43C7-B4AB-A05C95C1A8A2@FreeBSD.org> In-Reply-To: <3826345B-E783-43C7-B4AB-A05C95C1A8A2@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 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, 02 Jan 2014 20:27:53 -0000 Heloo and Happy New Year! On 24.11.2013 07:54, David Chisnall wrote: > On 23 Nov 2013, at 22:11, Pedro Giffuni wrote: > >> I have particular interest in -fwritable-strings >> and the block support, mostly with the idea of making our gcc >> somewhat more compatible to clang. > I would absolutely love to see our GCC have blocks support. It would be very nice to be able to use blocks in libc. It took me a while and I still have to do more review, but I finally have a patch for blocks support in gcc http://people.freebsd.org/~pfg/patches/gcc/gcc-blocks.patch (this only applies against -current for now) I have been able to build an example test from wikipedia and devel/libdispatch, with a small caveat: You have to #define __block or else you get this message: error: '__block' undeclared (first use in this function) The behaviour is consistent with llvm-gcc though, as explained here: https://bugs.launchpad.net/ubuntu/+source/llvm-gcc-4.2/+bug/483679 " looking at the LLVM/Clang documentation (http://clang.llvm.org/doxygen/InitPreprocessor_8cpp-source.html ) shows that __block is not actually a keyword, but a macro that is defined to be __attribute__((__blocks__(byref)))." Not sure what to do about it, I had added a #define for it in Block.h since you have to link with -lBlocksRuntime anyways, but not everything includes Block.h (surely not the libdispatch tests). Anyways, I will be revising the patch some more and will commit it somewhen next week. Enjoy, Pedro. From owner-freebsd-toolchain@FreeBSD.ORG Thu Jan 2 20:34:53 2014 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3D899D13 for ; Thu, 2 Jan 2014 20:34:53 +0000 (UTC) Received: from nm10-vm0.bullet.mail.bf1.yahoo.com (nm10-vm0.bullet.mail.bf1.yahoo.com [98.139.213.147]) by mx1.freebsd.org (Postfix) with SMTP id D9030107C for ; Thu, 2 Jan 2014 20:34:52 +0000 (UTC) Received: from [98.139.212.152] by nm10.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jan 2014 20:32:59 -0000 Received: from [98.139.211.194] by tm9.bullet.mail.bf1.yahoo.com with NNFMP; 02 Jan 2014 20:32:59 -0000 Received: from [127.0.0.1] by smtp203.mail.bf1.yahoo.com with NNFMP; 02 Jan 2014 20:32:59 -0000 X-Yahoo-Newman-Id: 711944.19766.bm@smtp203.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _5Rj9EMVM1l5apaWtkNuqkPpYAw9HyRNoefEfa46AqUn2YU DczTVbiPppbMW3GMPUAxDONZDI45QhErbtDgMaV2XzGfBHJTF94UGmBfhZLE EWRKNOwJBQf.i8PA.6kc0bXEMtwR.ZMkPJCz1X75c13VpC69tJJ3HBceXqnP VbEb4yPCEo7JSfvMeKAd40Z_XNWHd74XDQsjgGj_6lCaaoSqZ1nyt5QSv.Qx zv88EwSP6t6G6kVDdKFIgM30P8IFADYzd3O42Wnrl_dRDV7344dlsqV3O9Nu j0bQO9S8lUvhiMp_hKP5mu1rTuf3UtIN7oC094zTwO6w4AYpKj9rS5MGMyF4 QMfKvQboHCzgMe2mkUsSn4fVs.0QwK4X3VkRjtb0YHymo6xtxpvybu3VQnvm aWRERuoZiGTZZF.fLDn4g_JhvfkN2baDfmiIsv5tG.Re4xkncDlbsb.PvY7U dcukEDjcBWmcjiz2kX9KUVCVGP88HsFucZWkOshvWOOUywd65l9XE2zVztSY 0185_Js8J.chWGfNc93euyiMdjcdDDW5m0ZlTMWU38CCFnxVg6zGgkqs- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.139.211.125]) by smtp203.mail.bf1.yahoo.com with SMTP; 02 Jan 2014 12:32:59 -0800 PST Message-ID: <52C5CCF9.7040604@FreeBSD.org> Date: Thu, 02 Jan 2014 15:32:57 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: toolchain@FreeBSD.org Subject: Re: Apple's GCC 42 enhancements (was Re: [CFT] Experimental gcc update). References: <528A924A.8050904@FreeBSD.org> <529127F8.5080606@FreeBSD.org> <3826345B-E783-43C7-B4AB-A05C95C1A8A2@FreeBSD.org> <52C5CA79.90706@FreeBSD.org> In-Reply-To: <52C5CA79.90706@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 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, 02 Jan 2014 20:34:53 -0000 On 02.01.2014 15:22, Pedro Giffuni wrote: > Heloo and Happy New Year! > > On 24.11.2013 07:54, David Chisnall wrote: >> On 23 Nov 2013, at 22:11, Pedro Giffuni wrote: >> >>> I have particular interest in -fwritable-strings >>> and the block support, mostly with the idea of making our gcc >>> somewhat more compatible to clang. >> I would absolutely love to see our GCC have blocks support. It would be very nice to be able to use blocks in libc. > > It took me a while and I still have to do more review, but I finally > have a patch for blocks support in gcc > > http://people.freebsd.org/~pfg/patches/gcc/gcc-blocks.patch > > (this only applies against -current for now) > Forgot to mention ... I also have a patch to add support for "private extern" and while libdispatch can use them, it looks like that it is deprecated in favor of the visibility attributes so I don't have plans to commit it. I started patches for pascal strings and writable strings but they cause segfaults and are also officially deprecated so I won't be doing those either. Other than those, Apple has some bug fixes and support for more warnings that are also available in clang. Not sure if I want to spend more time in gcc though :-P. Regards, Pedro. From owner-freebsd-toolchain@FreeBSD.ORG Thu Jan 2 21:37:02 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44FCC19D for ; Thu, 2 Jan 2014 21:37:02 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00F9B15C8 for ; Thu, 2 Jan 2014 21:37:02 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::e450:5d44:cd3b:5179] (unknown [IPv6:2001:7b8:3a7:0:e450:5d44:cd3b:5179]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 8103B5C43; Thu, 2 Jan 2014 22:36:56 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_1ED05C19-E732-4A91-B612-E5ED3ED8B997"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: [CFT] Update to clang 3.4 From: Dimitry Andric In-Reply-To: <264FAA6E-871A-48AF-A8D9-EC431A537195@FreeBSD.org> Date: Thu, 2 Jan 2014 22:36:33 +0100 Message-Id: References: <541C998A-071A-4917-9D91-DD00CB0E2689@FreeBSD.org> <63BD3165-A62E-4FE7-9817-4A2692584916@bsdimp.com> <264FAA6E-871A-48AF-A8D9-EC431A537195@FreeBSD.org> To: Warner Losh X-Mailer: Apple Mail (2.1827) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 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, 02 Jan 2014 21:37:02 -0000 --Apple-Mail=_1ED05C19-E732-4A91-B612-E5ED3ED8B997 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 02 Jan 2014, at 01:11, Dimitry Andric wrote: > On 01 Jan 2014, at 23:37, Warner Losh wrote: >> I'd add to the list the upgrade path (from 9.x, 10.x and current) as = well, just to make sure they all still work... If there are problems = with the 9.x upgrade path, we'll need to call them out since 10.0 hasn't = been released yet and there's still a lot of 9.x boxes in the wild... >=20 > Ah yes, I already found one issue when building head on 9-STABLE: >=20 > In file included from contrib/llvm/lib/Support/Signals.cpp:30: > contrib/llvm/lib/Support/Unix/Signals.inc:22:11: fatal error: = 'execinfo.h' file not found > # include // For backtrace(). > ^ >=20 > This is of course a detection from autoconf which finds execinfo.h on > -current. So I will need to make that __FreeBSD_version dependent. I have fixed this particular problem, new patch is here: http://www.andric.com/freebsd/clang/head-r260112-clang34-2.diff.xz SHA256 (head-r260112-clang34-2.diff.xz) =3D = 4c602b42e890f82cbf5f7ee4aecb91a77ce3dcaacc01c210953e1cdd29d1ac21 This will only use execinfo.h and backtrace() for the world stage of the build, when the libraries that supply them have already been built. With this diff, I have successfully built head on 9.2-STABLE with gcc as the base compiler. I will also test it on 10.0-RC4, but I foresee no problems there. -Dimitry --Apple-Mail=_1ED05C19-E732-4A91-B612-E5ED3ED8B997 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlLF2+sACgkQsF6jCi4glqNyEwCaA6HqGXAwrZgDldkVGsYSgLdv JC8AnjhVkAdsNJ4rUFf6b5Z3wOdIu4L/ =RDyI -----END PGP SIGNATURE----- --Apple-Mail=_1ED05C19-E732-4A91-B612-E5ED3ED8B997-- From owner-freebsd-toolchain@FreeBSD.ORG Thu Jan 2 22:11:07 2014 Return-Path: Delivered-To: toolchain@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70692D01; Thu, 2 Jan 2014 22:11:07 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1E13218B5; Thu, 2 Jan 2014 22:11:03 +0000 (UTC) Received: from [192.168.0.7] (cpc28-cmbg15-2-0-cust64.5-4.cable.virginm.net [86.27.189.65]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id s02Ln2ea014273 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 2 Jan 2014 21:49:04 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\)) Subject: Re: Apple's GCC 42 enhancements (was Re: [CFT] Experimental gcc update). From: David Chisnall In-Reply-To: <52C5CA79.90706@FreeBSD.org> Date: Thu, 2 Jan 2014 21:48:57 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <528A924A.8050904@FreeBSD.org> <529127F8.5080606@FreeBSD.org> <3826345B-E783-43C7-B4AB-A05C95C1A8A2@FreeBSD.org> <52C5CA79.90706@FreeBSD.org> To: Pedro Giffuni X-Mailer: Apple Mail (2.1822) Cc: toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 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, 02 Jan 2014 22:11:07 -0000 On 2 Jan 2014, at 20:22, Pedro Giffuni wrote: > The behaviour is consistent with llvm-gcc though, as explained here: >=20 > https://bugs.launchpad.net/ubuntu/+source/llvm-gcc-4.2/+bug/483679 >=20 > " looking at the LLVM/Clang documentation = (http://clang.llvm.org/doxygen/InitPreprocessor_8cpp-source.html) shows = that __block is not actually a keyword, but a macro that is defined to = be __attribute__((__blocks__(byref)))." >=20 > Not sure what to do about it, I had added a #define for it in Block.h = since you have to link with -lBlocksRuntime anyways, but not everything = includes Block.h (surely not the libdispatch tests). Probably the best solution is to put this in cdefs.h: #if defined(__BLOCKS__) && !defined(__block) # define __block __attribute__((__blocks__(byref))) #endif (With the indentation changed to make it harder to read, as per = style(9)). I believe __BLOCKS__ is supported by clang, although testing = for it is discouraged in favour of the __has_{feature,extension} = mechanism. =20 David From owner-freebsd-toolchain@FreeBSD.ORG Thu Jan 2 23:59:19 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F28D59F3 for ; Thu, 2 Jan 2014 23:59:19 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADD0410D0 for ; Thu, 2 Jan 2014 23:59:19 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::e450:5d44:cd3b:5179] (unknown [IPv6:2001:7b8:3a7:0:e450:5d44:cd3b:5179]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id ABF735C43 for ; Fri, 3 Jan 2014 00:59:16 +0100 (CET) From: Dimitry Andric Content-Type: multipart/signed; boundary="Apple-Mail=_901DEC11-4045-4740-BF3D-2C4BC962B647"; protocol="application/pgp-signature"; micalg=pgp-sha1 Message-Id: <6766B735-98CB-4F1D-B3B5-A43D81BB558A@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: [CFT] Update to clang 3.4 Date: Fri, 3 Jan 2014 00:58:51 +0100 References: <541C998A-071A-4917-9D91-DD00CB0E2689@FreeBSD.org> <63BD3165-A62E-4FE7-9817-4A2692584916@bsdimp.com> <264FAA6E-871A-48AF-A8D9-EC431A537195@FreeBSD.org> To: freebsd-toolchain@freebsd.org In-Reply-To: X-Mailer: Apple Mail (2.1827) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 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, 02 Jan 2014 23:59:20 -0000 --Apple-Mail=_901DEC11-4045-4740-BF3D-2C4BC962B647 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 02 Jan 2014, at 22:36, Dimitry Andric wrote: > On 02 Jan 2014, at 01:11, Dimitry Andric wrote: >> On 01 Jan 2014, at 23:37, Warner Losh wrote: >>> I'd add to the list the upgrade path (from 9.x, 10.x and current) as = well, just to make sure they all still work... If there are problems = with the 9.x upgrade path, we'll need to call them out since 10.0 hasn't = been released yet and there's still a lot of 9.x boxes in the wild... ... > With this diff, I have successfully built head on 9.2-STABLE with gcc = as > the base compiler. I will also test it on 10.0-RC4, but I foresee no > problems there. Rebased against head r260207, since sys/amd64/vmm/intel/vmx.c did not need patching anymore: http://www.andric.com/freebsd/clang/head-r260207-clang34-1.diff.xz SHA256 (head-r260207-clang34-1.diff.xz) =3D = 02ddf89b5173bb1dac1e18e529b146ba5882f5ae6cb9c3527ef4eb514e17dd3c -Dimitry --Apple-Mail=_901DEC11-4045-4740-BF3D-2C4BC962B647 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlLF/UQACgkQsF6jCi4glqP8lwCg2PZ84XuXBsoNRhxSAuXaMU+7 b/wAoLbI11dT9wewsqcluEDcIaMEICkq =CzPG -----END PGP SIGNATURE----- --Apple-Mail=_901DEC11-4045-4740-BF3D-2C4BC962B647-- From owner-freebsd-toolchain@FreeBSD.ORG Sat Jan 4 22:54:55 2014 Return-Path: Delivered-To: toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E686E237 for ; Sat, 4 Jan 2014 22:54:54 +0000 (UTC) Received: from nm23-vm1.bullet.mail.bf1.yahoo.com (nm23-vm1.bullet.mail.bf1.yahoo.com [98.139.213.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 973451880 for ; Sat, 4 Jan 2014 22:54:54 +0000 (UTC) Received: from [66.196.81.174] by nm23.bullet.mail.bf1.yahoo.com with NNFMP; 04 Jan 2014 22:49:07 -0000 Received: from [98.139.211.202] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 04 Jan 2014 22:49:07 -0000 Received: from [127.0.0.1] by smtp211.mail.bf1.yahoo.com with NNFMP; 04 Jan 2014 22:49:07 -0000 X-Yahoo-Newman-Id: 5562.99021.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: J3jKZtEVM1mPfN_R1zfesSXgH5T4cDMyxxorHbnikzCTUm5 ezimVdfonpCp1VBXrne0KSX8Yqb4YJA85PHClTlw46S5GMf7ZLtc2KHilOu0 gHp2U2NFnEM3jJjTrESn89IErfdW4GfadyE6S2fDCjwIfJoSTtmTOs8D89vT 8hBEmKKsUpeuwNE3CqZaTby9Cq1mxc2LwQKCMQZcrhOj7qdCGwO0Rd_gwzr5 xG2IkMGE9YN6hh8yGv3dgl95Lls5BJcYXh8h6tvb.NNXSH1CENOTsDaJrZ.b 3PqpiSSr8xdtgARvSxxp8hiLVMCUxXhxU5EStijqxVj4QWdgxboCvvnTaL3j zgZzSJZaRg6Gr.Yo6XEWTSqAl7j8o5gJyptVo_FDhWMh03FPuozbgxEyqpp_ vjN1Bav80hzmZOH962E8HT7H2Z3eUr.7.spfd.lF6B3R8eXEkeGp3NJ2LkqZ _ihBpa5gdCvwudIIMaUXuoefBuMqoeYYMAhxxXLuvy25K1DAyFkBpN6m587q o41qFMgkT.GFBv6zBqqwrooOzjBMax.hoSv8Ep87OFr9R.S6M_oxSG1746Fe TNDz2xJLlIGT7liWvjDT3rLNjM0Hebz_VsaI9ke3xTBiNNWmBW_XqpOFU_8N 95eeD0HnUhLT6qGiMNsaxOj2BGBv50GONZ9WleydRrsHmsbPY1JYe1SEzwCG Gs3eVjVuQrK_Bkm6tj.dzhzifsJMiMacC9mGigIXiSf241CYzLX0ATWqunqi qQykTINOliUID61MnaQRj8xDaobse26t4kp4- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with plain [98.138.105.21]) by smtp211.mail.bf1.yahoo.com with SMTP; 04 Jan 2014 14:49:06 -0800 PST Message-ID: <52C88FDD.7090701@FreeBSD.org> Date: Sat, 04 Jan 2014 17:49:01 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: David Chisnall Subject: Re: Apple's GCC 42 enhancements (was Re: [CFT] Experimental gcc update). References: <528A924A.8050904@FreeBSD.org> <529127F8.5080606@FreeBSD.org> <3826345B-E783-43C7-B4AB-A05C95C1A8A2@FreeBSD.org> <52C5CA79.90706@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 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, 04 Jan 2014 22:54:55 -0000 On 02.01.2014 16:48, David Chisnall wrote: > On 2 Jan 2014, at 20:22, Pedro Giffuni wrote: > >> The behaviour is consistent with llvm-gcc though, as explained here: >> >> https://bugs.launchpad.net/ubuntu/+source/llvm-gcc-4.2/+bug/483679 >> >> " looking at the LLVM/Clang documentation (http://clang.llvm.org/doxygen/InitPreprocessor_8cpp-source.html) shows that __block is not actually a keyword, but a macro that is defined to be __attribute__((__blocks__(byref)))." >> >> Not sure what to do about it, I had added a #define for it in Block.h since you have to link with -lBlocksRuntime anyways, but not everything includes Block.h (surely not the libdispatch tests). > Probably the best solution is to put this in cdefs.h: > > #if defined(__BLOCKS__) && !defined(__block) > # define __block __attribute__((__blocks__(byref))) > #endif > > (With the indentation changed to make it harder to read, as per style(9)). I believe __BLOCKS__ is supported by clang, although testing for it is discouraged in favour of the __has_{feature,extension} mechanism. Thank you for the hint. Is there some way to have this happen only for our GCC-4.2.1 but not for clang or newer gcc? I am getting ready to commit the blocks support [1] but we can leave the macro magic for later, while there is some consensus on the dark arts involved ;). Pedro. [1] I ran buildworld and rebuilt boost and some ports with the modified compiler ... so far, so good. I don't think an exp-run is necessary since the blocks stuff is not yet being used for any port.