From owner-svn-src-stable-11@freebsd.org Tue Sep 12 06:24:45 2017 Return-Path: Delivered-To: svn-src-stable-11@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 90F38E1BB47; Tue, 12 Sep 2017 06:24:45 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A2C263BCA; Tue, 12 Sep 2017 06:24:45 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v8C6OivW060940; Tue, 12 Sep 2017 06:24:44 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v8C6Oip4060938; Tue, 12 Sep 2017 06:24:44 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201709120624.v8C6Oip4060938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Tue, 12 Sep 2017 06:24:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r323486 - in stable/11/sys: amd64/include sys X-SVN-Group: stable-11 X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in stable/11/sys: amd64/include sys X-SVN-Commit-Revision: 323486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2017 06:24:45 -0000 Author: rlibby Date: Tue Sep 12 06:24:44 2017 New Revision: 323486 URL: https://svnweb.freebsd.org/changeset/base/323486 Log: MFC r321284: efi: restrict visibility of EFIABI_ATTR-declared functions Modified: stable/11/sys/amd64/include/efi.h stable/11/sys/sys/efi.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/include/efi.h ============================================================================== --- stable/11/sys/amd64/include/efi.h Tue Sep 12 06:21:43 2017 (r323485) +++ stable/11/sys/amd64/include/efi.h Tue Sep 12 06:24:44 2017 (r323486) @@ -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)) +#endif #ifdef _KERNEL struct uuid; Modified: stable/11/sys/sys/efi.h ============================================================================== --- stable/11/sys/sys/efi.h Tue Sep 12 06:21:43 2017 (r323485) +++ stable/11/sys/sys/efi.h Tue Sep 12 06:24:44 2017 (r323486) @@ -122,6 +122,9 @@ struct efi_tblhdr { uint32_t __res; }; +#ifdef _KERNEL + +#ifdef EFIABI_ATTR struct efi_rt { struct efi_tblhdr rt_hdr; efi_status (*rt_gettime)(struct efi_tm *, struct efi_tmcap *) @@ -144,6 +147,7 @@ struct efi_rt { efi_status (*rt_reset)(enum efi_reset, efi_status, u_long, efi_char *) EFIABI_ATTR; }; +#endif struct efi_systbl { struct efi_tblhdr st_hdr; @@ -163,7 +167,6 @@ struct efi_systbl { uint64_t st_cfgtbl; }; -#ifdef _KERNEL extern vm_paddr_t efi_systbl_phys; #endif /* _KERNEL */