From owner-svn-src-all@freebsd.org Thu Jul 20 09:19:45 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A23DDAD581; Thu, 20 Jul 2017 09:19:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 212506359A; Thu, 20 Jul 2017 09:19:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 77AF0106124; Thu, 20 Jul 2017 19:19:37 +1000 (AEST) Date: Thu, 20 Jul 2017 19:19:36 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ryan Libby cc: Bruce Evans , kib@freebsd.org, Ryan Libby , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r321284 - in head/sys: amd64/include sys In-Reply-To: Message-ID: <20170720190955.U1634@besplex.bde.org> References: <201707200647.v6K6l7Hq076554@repo.freebsd.org> <20170720172157.W1152@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=VbSHBBh9 c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=hSAPkCe7wNuG41XxVuwA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Thu, 20 Jul 2017 09:19:45 -0000 On Thu, 20 Jul 2017, Ryan Libby wrote: > On Thu, Jul 20, 2017 at 1:01 AM, Bruce Evans wrote: >> On Thu, 20 Jul 2017, Ryan Libby wrote: >>> Modified: head/sys/amd64/include/efi.h >>> >>> ============================================================================== >>> --- head/sys/amd64/include/efi.h Thu Jul 20 05:43:48 2017 >>> (r321283) >>> +++ head/sys/amd64/include/efi.h Thu Jul 20 06:47:06 2017 >>> (r321284) >>> @@ -36,8 +36,14 @@ >>> * XXX: from gcc 6.2 manual: >>> * Note, the ms_abi attribute for Microsoft Windows 64-bit targets >>> * currently requires the -maccumulate-outgoing-args option. >>> + * >>> + * Avoid EFIABI_ATTR declarations for compilers that don't support it. >>> + * GCC support began in version 4.4. >>> */ >>> +#if defined(__clang__) || defined(__GNUC__) && \ >>> + (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4) >>> #define EFIABI_ATTR __attribute__((ms_abi)) >> >> >> This is still broken. ms_abi is in the application namespace. Thus >> my hack of defining it to nothing is valid, and so is defining it to >> 'syntax error', but the latter shows the brokenness of EFIABI_ATTR. > > To be clear, you're referring to how ms_abi is spelled here without > underscores? I can prepare a follow-up to spell it as > __attribute__((__ms_abi__)) Yes. >> ... >> X amd64/include/efi.h:#define EFIABI_ATTR __attribute__((ms_abi)) >> X i386/include/efi.h:#define EFIABI_ATTR /* __attribute__((ms_abi)) */ /* clang fails with this */ >> X ofed/include/rdma/ib_user_mad.h:typedef unsigned long __attribute__((aligned(4))) packed_ulong; >> X ofed/include/rdma/ib_smi.h:} __attribute__ ((packed)); >> X ofed/include/rdma/ib_mad.h:} __attribute__ ((packed)); >> X ofed/include/rdma/ib_mad.h:} __attribute__ ((packed)); >> >> The commented-out ms_abi was only a style bug. Now it is a larger style >> bug -- it is different and worse than amd64. > > I'm not sure what to do about i386 there (again beyond fixing up the > spelling in the comment). Maybe the unsupported architectures should > just not be declaring EFIABI_ATTR at all? (Thoughts, kib?) Maybe it can go in x86 with a different ifdef for clang. Or if it just doesn't work on i386, don't define or use EFIABI_ATTR. Bruce