From owner-svn-src-all@FreeBSD.ORG Fri May 15 20:54:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A3065DD for ; Fri, 15 May 2015 20:54:14 +0000 (UTC) Received: from nm44-vm7.bullet.mail.bf1.yahoo.com (nm44-vm7.bullet.mail.bf1.yahoo.com [216.109.115.31]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEFE81260 for ; Fri, 15 May 2015 20:54:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1431723246; bh=DEIUI+VhC0dSiUzZ2zENmtHhMUHCQdaLUQdR6b9C15g=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=JbYB0UpQtoY0rcXRMGx4vLNezEub5b8W4GTguk5ANjjTmuD+fUBpJ9QU8ABoKtwZFeal4wryKGuMRB5Qm2FQ0TBr+SQToXVsin3ZrUcfjy6cruDjkapvn2u1RBOGhGInyNiKfP3Gqc2nEWK0Ys9+W7SpTg/DGemQHb98ArifpkmRVksx3vgBOdnW6aiyK8p5iyMRvL0BWU0WdWl82UmXzhxgYR7GLZ/KKoRL7jilLJxB3rNCI5SymRbGxVy16DkL31Jb+UhUGnFBxZdZo/kKcXeHX+IjJ+PzGDnqkykyla3EFUqhoLIQhUs2E2lpUFAhzInAH02jAAadm9k/v7ANVA== Received: from [66.196.81.172] by nm44.bullet.mail.bf1.yahoo.com with NNFMP; 15 May 2015 20:54:06 -0000 Received: from [98.139.213.10] by tm18.bullet.mail.bf1.yahoo.com with NNFMP; 15 May 2015 20:54:06 -0000 Received: from [127.0.0.1] by smtp110.mail.bf1.yahoo.com with NNFMP; 15 May 2015 20:54:06 -0000 X-Yahoo-Newman-Id: 792581.33443.bm@smtp110.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: CbAlzYAVM1kFFPssPXL.f.DVIrFYSKbmo.iYr2hesJeRb4V uohv.EZkOsUOmuc.Y2lfxXK5InVv92XHVU9rQFjJ3Hv6BRncYwhdwgf8gAtZ bDKTY6gdBzGLSOdVb6hcvWxWpVSUSeMs9gsE7RzvWMDGmkHO.yVNtYrs_x8C ZSKBOgFq1c80N5ECA9ua8BXE93tUaMX3BNaWH.e96P1qJuUgDjjKBVALXYG_ 08jRzp0lxfQ4NIyrkdOLFgyUOFbdaUDPf4E0IZM0v_iUKOyHgZpgTB4kzirM zHYMZ_wE5FvJyDyE.yAsgrHWLYEebYhvrAoSY38EBm6G5q1gH3GshgEp4x.B 0hHNj4XWqZKAyOsM4GYTa_74DIYPg3HxaFD06wH44PDkqY76pK_neXv1YoWA A1vwb17nZVvOishMN1oP.4h31iUJZaY8C_nnYRl49dClfSD0QRngI6DUgSUb qRPvxRC_ubck9kModfcQ8l.JKj3T.dWybVBAN7vzS.Afe45_XrmvY5L2yZHI ALy60orHKtpnYhXePY_OIlMrK3smEGpvI X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <55565CF6.80101@FreeBSD.org> Date: Fri, 15 May 2015 15:54:14 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: John Baldwin CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r282987 - head/sys/sys References: <201505151951.t4FJp6Gj043073@svn.freebsd.org> <2535986.nxztlW3efp@ralph.baldwin.cx> In-Reply-To: <2535986.nxztlW3efp@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 May 2015 20:54:14 -0000 On 05/15/15 15:35, John Baldwin wrote: > On Friday, May 15, 2015 07:51:06 PM Pedro F. Giffuni wrote: >> Author: pfg >> Date: Fri May 15 19:51:05 2015 >> New Revision: 282987 >> URL: https://svnweb.freebsd.org/changeset/base/282987 >> >> Log: >> Break apart the gnu_inline attribute and use "artificial" if available. >> >> In general it is bad practice to use the gnu_inline attribute but we >> will need it in special cases like FORTIFY_SOURCE. In this specific >> case it is also useful to have the "artificial" attribute: >> >> "This attribute is useful for small inline wrappers which if possible >> should appear during debugging as a unit, depending on the debug info >> format it will either mean marking the function as artificial or using the >> caller location for all instructions within the inlined body." >> >> This attribute appears to be currently implemented only in GCC. Use it >> only in conjuntion with gnu_inline in the cases where it is available, >> which is similar in spirit in how it's used in glibc. >> >> Modified: >> head/sys/sys/cdefs.h >> >> Modified: head/sys/sys/cdefs.h >> ============================================================================== >> --- head/sys/sys/cdefs.h Fri May 15 19:37:17 2015 (r282986) >> +++ head/sys/sys/cdefs.h Fri May 15 19:51:05 2015 (r282987) >> @@ -375,10 +375,8 @@ >> #endif >> >> #if __GNUC_PREREQ__(4, 1) >> -#define __gnu_inline __attribute__((__gnu_inline__)) >> #define __returns_twice __attribute__((__returns_twice__)) >> #else >> -#define __gnu_inline >> #define __returns_twice >> #endif >> >> @@ -538,6 +536,21 @@ >> __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) >> #endif >> >> +/* >> + * FORTIFY_SOURCE, and perhaps other compiler-specific features, require >> + * the use of non-standard inlining. In general we should try to avoid >> + * using these but GCC-compatible compilers tend to support the extensions >> + * well enough to use them in limited cases. >> + */ >> +#if __GNUC_PREREQ__(4, 1) >> +#if __has_attribute(artificial) || __GNUC_PREREQ__(4, 3) >> +#define __gnu_inline __attribute__((__gnu_inline__, __artificial__)) >> +#else >> +#define __gnu_inline __attribute__((__gnu_inline__)) > ^^^^ missing an #endif here? > > I'm getting this error from buildworld: > > /usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:550:2: error: #else after #else > #else > ^ > /usr/obj/usr/src/tmp/usr/include/sys/cdefs.h:36:2: error: unterminated conditional directive > #ifndef _SYS_CDEFS_H_ > ^ > 14 errors generated. > mkdep: compile failed > (Bah... you guys beat my tinderbox.) Fixed sorry. Pedro.