From owner-freebsd-toolchain@FreeBSD.ORG Sun Nov 24 12:54:28 2013 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 186AFF3B; Sun, 24 Nov 2013 12:54:28 +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 DE7982FBC; Sun, 24 Nov 2013 12:54:24 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginm.net [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id rAOCsF6e080067 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 24 Nov 2013 12:54:16 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Apple's GCC 42 enhancements (was Re: [CFT] Experimental gcc update). From: David Chisnall In-Reply-To: <529127F8.5080606@FreeBSD.org> Date: Sun, 24 Nov 2013 12:54:10 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <3826345B-E783-43C7-B4AB-A05C95C1A8A2@FreeBSD.org> References: <528A924A.8050904@FreeBSD.org> <529127F8.5080606@FreeBSD.org> To: Pedro Giffuni X-Mailer: Apple Mail (2.1508) Cc: toolchain@FreeBSD.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 12:54:28 -0000 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. =20 I have some macros that allow code to call blocks even when compiled = with a compiler that doesn't support them, but having native blocks = support would be fantastic. It's worth noting that Apple's libc = includes a few _b variants of standard library functions: scandir_b err_set_exit_b fts_open_b glob_b atexit_b bsearch_b heapsort_b mergesort_b psort_b qsort_b These all do the same as their non-_b-suffixed equivalents, but take a = block as an argument instead of a function pointer. Adding them has = been on my todo list for a while, and this would give me a strong = incentive to do so... David From owner-freebsd-toolchain@FreeBSD.ORG Sun Nov 24 15:11:21 2013 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 C43036A2 for ; Sun, 24 Nov 2013 15:11:21 +0000 (UTC) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9489C252C for ; Sun, 24 Nov 2013 15:11:21 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id x13so5101313ief.6 for ; Sun, 24 Nov 2013 07:11:15 -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=Oa96LtO80e3ERYywsEd3eFTST//k2Nb/rRlFJVGhgKU=; b=BaNZ2586GkC64gtL6Od1Ji5bLSduQ4ZlFfhIA0YeIta7p14jBvVlrVCIZiJ2ZkR4pJ TwL1Bq3tsxsQmvUtTprAyyg+xjNyRFZSbDPr494OZzn+391OomWN8ozssOUnSTKFLnu9 ZwcK38kx6YjMTdp4UyvOgezdSaiTx1xVeo4L83R1MxFeLcCJj+Hfm2Vuu5I/07n+IH1n 6VX0DI1JBhU9S714LkBYuwmCJfDm2HRNv1bo8WBULEkFf3VfyLlbhF4hXmQJ1+5IfKSm L0YkZVYgw0OCMTtsju5bHxWlcMWsXm+0STEg3quQ+r9sCdMn/odBGb6wCHypxYoIJW1M UYyA== X-Gm-Message-State: ALoCoQllDUFOBcNUb1aikHijpOhCLCcstiTUIzLycVANmFm3gwNSzDHABPBOSuWzHQVGiY8W6aCq X-Received: by 10.51.15.130 with SMTP id fo2mr9712774igd.28.1385305875565; Sun, 24 Nov 2013 07:11:15 -0800 (PST) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id jk5sm21071008igb.0.2013.11.24.07.11.14 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 24 Nov 2013 07:11:15 -0800 (PST) Sender: Warner Losh Subject: Re: Apple's GCC 42 enhancements (was Re: [CFT] Experimental gcc update). Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <3826345B-E783-43C7-B4AB-A05C95C1A8A2@FreeBSD.org> Date: Sun, 24 Nov 2013 08:11:13 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <573FEF92-255E-4C71-B5A3-496A0C504925@bsdimp.com> References: <528A924A.8050904@FreeBSD.org> <529127F8.5080606@FreeBSD.org> <3826345B-E783-43C7-B4AB-A05C95C1A8A2@FreeBSD.org> To: David Chisnall X-Mailer: Apple Mail (2.1085) Cc: toolchain@FreeBSD.org, Pedro Giffuni X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 15:11:21 -0000 On Nov 24, 2013, at 5:54 AM, David Chisnall wrote: > On 23 Nov 2013, at 22:11, Pedro Giffuni wrote: >=20 >> I have particular interest in -fwritable-strings >> and the block support, mostly with the idea of making our gcc >> somewhat more compatible to clang. >=20 > I would absolutely love to see our GCC have blocks support. It would = be very nice to be able to use blocks in libc. =20 >=20 > I have some macros that allow code to call blocks even when compiled = with a compiler that doesn't support them, but having native blocks = support would be fantastic. It's worth noting that Apple's libc = includes a few _b variants of standard library functions: >=20 > scandir_b > err_set_exit_b > fts_open_b > glob_b > atexit_b > bsearch_b > heapsort_b > mergesort_b > psort_b > qsort_b >=20 > These all do the same as their non-_b-suffixed equivalents, but take a = block as an argument instead of a function pointer. Adding them has = been on my todo list for a while, and this would give me a strong = incentive to do so... Cool! Any chance clang supports this Apple extension? :) Warner From owner-freebsd-toolchain@FreeBSD.ORG Sun Nov 24 16:05:38 2013 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 79160611 for ; Sun, 24 Nov 2013 16:05:38 +0000 (UTC) Received: from nm37-vm8.bullet.mail.bf1.yahoo.com (nm37-vm8.bullet.mail.bf1.yahoo.com [72.30.238.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D1A16276D for ; Sun, 24 Nov 2013 16:05:37 +0000 (UTC) Received: from [66.196.81.171] by nm37.bullet.mail.bf1.yahoo.com with NNFMP; 24 Nov 2013 15:58:56 -0000 Received: from [98.139.211.201] by tm17.bullet.mail.bf1.yahoo.com with NNFMP; 24 Nov 2013 15:58:56 -0000 Received: from [127.0.0.1] by smtp210.mail.bf1.yahoo.com with NNFMP; 24 Nov 2013 15:58:56 -0000 X-Yahoo-Newman-Id: 334327.56221.bm@smtp210.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: mDJYyLUVM1mGDoHAIpKHZrnX1Y3L0x0gSGy1Xu5DOViZih4 y4DZs1ca2v2ddmOLPi6aOh9aIunlWve2KSQQ3g6V4hKW6h6jqrMJhntePTqq dwa37ROHwmgjE6j5TmuUI3rImgAlWsyRD1oDZerNhD2CleULY5uH0n8ZAZPu cjbAdzDLesjCLYt0bPTmVEnx2sF0g7A4Pa7kvK7noVAyEjFl3ArnkpGAd3hU _kKEw7bD35ImHkwsBFU0Z6Q41z4LDA0SFoo2KoUkPB4Cpo2nqfW.aWpaLabz f9EYz37xEHA14PVMASM2wT3fDFYKKNxP1Rk6S5GK56YPUCKb34woFS0s1..a 1TDT_jW0YpvKR.KEuM5Um4CMkCqW6IK0MaKi1AZs.GnpjfOslVmM_w.mXL_6 AwTUuPh4wGGMsXDYEn_6RdIlQ4WjkcKRdmmhwEGXe.P0_GO7qcarxrbJ8O.2 GPc2vrjvvVwn80sJd08nIcPgZFbSP0g0e_EArcMm2sKq0ijlxFxzL9HcIq.m 5SxeeMt.h8Pn_ZZnf7sSHz_IQcZLFbt6.ZmcaPsMFusX4Xu_D5NojYQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with ) by smtp210.mail.bf1.yahoo.com with SMTP; 24 Nov 2013 07:58:56 -0800 PST Message-ID: <5292223E.3070603@FreeBSD.org> Date: Sun, 24 Nov 2013 10:58:54 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Warner Losh , 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> <573FEF92-255E-4C71-B5A3-496A0C504925@bsdimp.com> In-Reply-To: <573FEF92-255E-4C71-B5A3-496A0C504925@bsdimp.com> 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.16 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2013 16:05:38 -0000 On 24.11.2013 10:11, Warner Losh wrote: > On Nov 24, 2013, at 5:54 AM, 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. >> >> I have some macros that allow code to call blocks even when compiled with a compiler that doesn't support them, but having native blocks support would be fantastic. It's worth noting that Apple's libc includes a few _b variants of standard library functions: >> >> scandir_b >> err_set_exit_b >> fts_open_b >> glob_b >> atexit_b >> bsearch_b >> heapsort_b >> mergesort_b >> psort_b >> qsort_b >> >> These all do the same as their non-_b-suffixed equivalents, but take a block as an argument instead of a function pointer. Adding them has been on my todo list for a while, and this would give me a strong incentive to do so... Nice! > Cool! Any chance clang supports this Apple extension? :) clang, of course, supports it. The upstream gcc doesn't (they are considering it but apparently they can't reuse the GPLv2 code). Bringing blocks support means we are forking gcc but that doesn't really worry me since we are not getting any support from the FSF anyways. There is a fork of Android's gcc that supports objc and they did the heavy lifting. I have a patch from there but I still have to clean it up. Pedro.