From nobody Sat May 18 14:10:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+103732+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+103732+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1682650029; cv=none; d=zohomail.com; s=zohoarc; b=TipiRE3RIzsOvdD3beGX3zvxewzt61x2WukCAP5cKKpZGpnBjMSDUaTiTa+XfXfGLK3hC7lNeS71RkthFFjqdw6JFtgHVcqudOiWO1q3P+SwYZUS+UvHfAD6AAkztVtXAFcpZb47gMl+U1AH1ij+qHjeeWFh7gtHvoavyKoFmCI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682650029; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=5ybw/Bj7XWtLjJoBxffJmO6s1CGg1iu02SIY/xesISA=; b=lyDY8XmxYeijlzhH2xxb43AwptDXDLVtYVs031UefZCD3VkKlxKD69Eo2vwIdbp0ATaUHjXxCaSvxaQ/JRax1BA8nUOFBQPbRTDAL7JCCTsRLYr9GltFHNorVV4Rb2QIBoMqwBdaStttfi9/v2Hfe7znKeMjLz3b/J2JmgzBQl4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+103732+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1682650029451913.1457402993294; Thu, 27 Apr 2023 19:47:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id FnLLYY1788612xOOaqnYYhyC; Thu, 27 Apr 2023 19:47:09 -0700 X-Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web10.10810.1682650028441397722 for ; Thu, 27 Apr 2023 19:47:08 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="347656431" X-IronPort-AV: E=Sophos;i="5.99,233,1677571200"; d="scan'208";a="347656431" X-Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2023 19:46:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10693"; a="940905904" X-IronPort-AV: E=Sophos;i="5.99,233,1677571200"; d="scan'208";a="940905904" X-Received: from shserverbios518.ccr.corp.intel.com ([10.5.215.124]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2023 19:46:58 -0700 From: "JoeX Lu" To: devel@edk2.groups.io Cc: JoeX Lu , Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [edk2-devel] [PATCH] Support GLOBAL_REMOVE_IF_UNREFERENCED in GCC5/11 Date: Fri, 28 Apr 2023 10:46:37 +0800 Message-Id: <20230428024637.34637-1-pen-chunx.lu@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pen-chunx.lu@intel.com X-Gm-Message-State: vT82Cseg99PmkjUqYiBljM8Dx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1682650029; bh=bCur35ZC/U/dveRDGOR3cbxeP4o4vQTkUrvfgb7v8Fc=; h=Cc:Date:From:Reply-To:Subject:To; b=lUSrlynuc3/UfqBpZgO/DrsT5nn7xa6PeZA9C+sJb+Qq7EAdHrovQKWAJfEJhDexOBl qmSOf7A0hSA5csJPA2NEqfCWqJ3k9/JhFAPG8Eq8S2TL88vKvXfPvaeTfChMQhMwJIraY ffiaF6OJCKab9HlABSvwVm97/T3GgXS6Eew= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1682650030617100001 Content-Type: text/plain; charset="utf-8" CC: Michael D Kinney CC: Liming Gao CC: Zhiguang Liu Signed-off-by: JoeX Lu --- MdePkg/Include/Base.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index 6597e441a6..951fce43ee 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -45,8 +45,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent /// to it after all compiler and linker optimizations have been performed. /// /// +#if defined (__GNUC__) +#define GLOBAL_REMOVE_IF_UNREFERENCED __attribute__((unused)) +#else #define GLOBAL_REMOVE_IF_UNREFERENCED #endif +#endif =20 // // Should be used in combination with NORETURN to avoid 'noreturn' returns --=20 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#103732): https://edk2.groups.io/g/devel/message/103732 Mute This Topic: https://groups.io/mt/98551348/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-