From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.3596.1601024378337511411 for ; Fri, 25 Sep 2020 01:59:39 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=vbcnxl7E; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: ray.ni@intel.com) IronPort-SDR: OQqP6FHtgYswbBQ9cZ6Ccl6QcVegpoG6NCmwW2ZOlYOOIqhekH052pIV9SW+iVttPypq5FNzT9 hFaUGBMfpXow== X-IronPort-AV: E=McAfee;i="6000,8403,9754"; a="223076212" X-IronPort-AV: E=Sophos;i="5.77,301,1596524400"; d="scan'208";a="223076212" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Sep 2020 01:59:37 -0700 IronPort-SDR: sqt0F2q61j6fxRQDw1xo6am2Tu3clF85o0fOusgzomOc8QY9rgEdZNgUMs90rfIBs/4W7SxBt8 5vdQtme64DQQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,301,1596524400"; d="scan'208";a="323301973" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga002.jf.intel.com with ESMTP; 25 Sep 2020 01:59:36 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 25 Sep 2020 01:59:36 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 25 Sep 2020 01:59:36 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 25 Sep 2020 01:59:36 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.168) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Fri, 25 Sep 2020 01:59:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Anay+U27isEfOGE4bZ2S10TXjP28fir3rcu2HAYb8mYWVc0hgs+5L4LPKT87VO3y7GNKixcFZAcQfWKwAkufDHFHLPi1Dpp9DvEMP59Bn4VxfJqIibXEhJeqUnBhOKXDoNmWpyFb2nLuvoZfnVsZkxWBlOZd9Xbzn/0MeGhzWV4eSw1RreLaFGnckAdnaEH5LI656jvBO4OIgiLgSScQe2tAHvLn5hzV8HTRVfjIZXNCSeghCqI8eBazVgNmiyqKe3kiUnwex1KJLnJY4Slmu9xF+vpI0HNC4XkwoxKLk8D2aUFZkgtWvP3G9WH/OIdEFWuEm/vxq5Q2Hlc52i5PRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+5/bupAI1eMhYa0j58yscsbkm2ODHAwEAr155TF7lNY=; b=T6x1d5+l2XPnVBDB6V3aFEsQpXSIRAzXdAULt3IFlRlRrRtE8wHho0MT3aLdn0bTiEEqkXiwONsT6l1yIxuibu9u5QD+Qkxk+KQZZzGP8xTlQCQEsSAD0CRv8dvcBtPR9G2jydhrYeGCZiVzqPKDsqZiP8RJPegZyHyErFesM0Sv6KQDC1pQO8YT2g6q1KYiQgw9hn2+a6dq2Vc3ApVq6zIzXiWXD6LjWggZn/1sh1RvXLtxHYlMS6k1yOnMfvoaWLzMWaSJ5iR/A680gj2i6qmnOKxqX8rA/FMtLh4Tw9x6XqYN8djA8A4YmzEW3/pDxxSz+/Ff0Q0HEw2rAl/Tug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+5/bupAI1eMhYa0j58yscsbkm2ODHAwEAr155TF7lNY=; b=vbcnxl7ERiP81jCr8sVyGVnioH2w4Kps/P8oareHGGimuUoJf4Yy3dBrzKfueT8rU5lr2z+aB40Dl00dkuQ4w4LuKj3VkGVrgvDmXmaZhF0eo/aBU3PUB51BIj9DX3Pm6xJXLeLBWCckkBf9hV284wbW4NEOkyVkT+0C8FVOmWI= Received: from BY5PR11MB4007.namprd11.prod.outlook.com (2603:10b6:a03:189::28) by BYAPR11MB2600.namprd11.prod.outlook.com (2603:10b6:a02:c8::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.19; Fri, 25 Sep 2020 08:59:32 +0000 Received: from BY5PR11MB4007.namprd11.prod.outlook.com ([fe80::1533:4053:1c45:3596]) by BY5PR11MB4007.namprd11.prod.outlook.com ([fe80::1533:4053:1c45:3596%6]) with mapi id 15.20.3370.033; Fri, 25 Sep 2020 08:59:33 +0000 From: "Ni, Ray" To: LiuYu , "Justen, Jordan L" , "afish@apple.com" CC: "devel@edk2.groups.io" Subject: Re: [edk2-devel][PATCH] EmulatorPkg/Unix Prevents the compiler form optimizing unused variable Thread-Topic: [edk2-devel][PATCH] EmulatorPkg/Unix Prevents the compiler form optimizing unused variable Thread-Index: AQHWkv+eUxDkyWpw8USo7ZgbfDRMuql5DiyQ Date: Fri, 25 Sep 2020 08:59:32 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.5.1.3 dlp-reaction: no-action dlp-product: dlpe-windows authentication-results: greatwall.com.cn; dkim=none (message not signed) header.d=none;greatwall.com.cn; dmarc=none action=none header.from=intel.com; x-originating-ip: [124.77.209.203] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 198c415a-bc09-4186-e535-08d861315202 x-ms-traffictypediagnostic: BYAPR11MB2600: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: k2GSSORbF4DAP2Rew8l/EhvlwJMUm3glnU4DB3lWmbRDqbxA+cP0Ra/joaZTXUpSjg3Kf0aiN90uM0W3A3CfH0Sx9xnObraBu89rgLS+cbRAWJZyalJRLJ+6+mFLZo1vspYP4VT2SP3BJ5a9vBjLKKtHxsU0zBB+IuyNM+57heQzH7/KXq3CA1kwKyxW0kjnF/67DbC9xpHN1W2VyXDmdegaoTvC+djRwkGoi++eFNcCcEYx+JEWJyCKxIAJNNWQND5NKPWSyqRLRxEehV3+By2LNTTFeGEsrQImftu9ocjm1oAEAJVoHQfZcTL9x+h6izk+4mxAKZgQlclv0ByNWA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR11MB4007.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(376002)(346002)(39860400002)(396003)(366004)(64756008)(5660300002)(45080400002)(52536014)(2906002)(8676002)(478600001)(4326008)(8936002)(33656002)(66946007)(66476007)(110136005)(71200400001)(83380400001)(66446008)(9686003)(7696005)(26005)(55016002)(316002)(76116006)(53546011)(6506007)(86362001)(186003)(66556008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: FOwckr37Q6fIeCw8h3Jb7PR2x5ZsTo8mWH/qrPoBoZBMx4SAgG+gD06jnSHzedCosNyaDuz0CRcVa95zXz/jkp60eZeZICkenoHwGzpC+vkMQn6nCx4B1FjTpq1kfuXZfpJgkh3EFUpIc84c8pKgqXZYyneMEoSI0vOKOfu7yogtjrM4n6KGG3m8Pt6t3zk07Y85wBKqTt98fgpFyplvHofRAuW8NPvkQY2wH09E+7NskMKCd6zWKCDNr89Wi2T/CM5xZPISo/l9FMKrY8f9+CpwY/afevyCMFnmfYycrBtNxoT233hsy9n6EKQU+J833Kp0oI8aXsIu0AOz4zaXP6UYRBe+Z0GutlFrgExF2Qf1PwJeb/ZOi+nC1hiIG2J4bxUi0IoRkoQFPC/UAVVhpI20ZzJTSaW1skaE0Yi8NqeDkBC84q3ezYsinFNNiUkG/dSZOTfo0PIeqPL9IiFuDEfDbKGeLV+9iJK9TX/Yal2TCGwxPfJUI4yRgeFIA05KFE2aGR5TxV0BGtMWMR48hZSJsqxXqiUd0Zs57drYpeU1NU3RAx6qDQ1a9TshcIYW8Ht8UvGQ+WUB6TqsXpRA8P1wjUvi9eb1VIdaoDM/sEsIZPafSKUpsX6jW/sgKtAZnjglabk5mGQ+Y+H/+HKUFg== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB4007.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 198c415a-bc09-4186-e535-08d861315202 X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Sep 2020 08:59:32.9119 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: nqcUe8VEPY3BB4GJWA6IIssotVRAwFhACnhvEYXmLRJ7mLiDNt8W4itnjndUAC1vi26ZNsQhUgdHdCLKAUDDkg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2600 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Jordan, Andrew, I will defer to you to review the patch. Thanks, Ray > -----Original Message----- > From: LiuYu > Sent: Friday, September 25, 2020 1:49 PM > To: Justen, Jordan L ; afish@apple.com; Ni, Ra= y > Cc: devel@edk2.groups.io; LiuYu > Subject: [edk2-devel][PATCH] EmulatorPkg/Unix Prevents the compiler form = optimizing unused variable >=20 > gInXcode is only used by GDB script and if optimization is turned on then= compiler > treats this variable as unused so it can't been linked in the final objec= t. >=20 > Signed-off-by: LiuYu > --- > EmulatorPkg/Unix/Host/Host.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/EmulatorPkg/Unix/Host/Host.c b/EmulatorPkg/Unix/Host/Host.c > index b4e5510613..b851264c8e 100644 > --- a/EmulatorPkg/Unix/Host/Host.c > +++ b/EmulatorPkg/Unix/Host/Host.c > @@ -54,7 +54,7 @@ IMAGE_CONTEXT_TO_MOD_HANDLE *mImageContextModHandleArr= ay =3D NULL; > EFI_PEI_PPI_DESCRIPTOR *gPpiList; >=20 >=20 > -int gInXcode =3D 0; > +int gInXcode __attribute__((used)) =3D 0; >=20 >=20 > /*++ > -- > 2.20.1