From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (NAM11-DM6-obe.outbound.protection.outlook.com [40.107.223.43]) by mx.groups.io with SMTP id smtpd.web11.10223.1674026376524846196 for ; Tue, 17 Jan 2023 23:19:37 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@ami.com header.s=selector1 header.b=W14DRFwu; spf=pass (domain: ami.com, ip: 40.107.223.43, mailfrom: sountharyan@ami.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iC/TvcQHlNHcTd8bF7AsolsscsaIZAGlZFNGJ7mm9R+DIEFD33JoyG7Qu2FD7UEq+uSPBx8FTTUWVJXE1TKUoDf8vxuHQe2gHLVXrfrwz0NJc3thm6GISi3+UTdfpO9G8VB2KJX4h0XaRPUJK1idq6mSl1xCaFiNJ7B3jNdPWRtuFmbpXz9uamszvFZPPmSyUl6FV28g4H1ZFUEV/dMfQfjejUk0ulNs+riZfHXKzl3KbvU1SWKYdTRP/0IDBRdjWAYthlmr2Ew3go2cSGFK8CAZzHBMZP3TA2RL4IWflUNRjbeBcmJL2FNRLlvNl9WveboR0nZQlrKeSJGmjXr/7w== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mBYfWSAkvoxIBlLTC/8zOLVyB+iQJ3pA7COQHS9Vu3k=; b=EmY+/ymoh/RUv2kTvNBGY3JX/d1R41vhfLCjJgd43AKqdF/UZQCs9UWp6d1cKnPP636eZuc+tTNOp/Rs+W+YrKg8gEpK9DtpXwoEhs2DGFTSEJVmkgrKLgTkyNSewvdOfTHP4KNyg/9A3hbIvWYTnFqPtVL9rUWnW5XUlOAcdgvpWzw0Y2179ZGGgAodpD7iQRSjA3YCS2iZlJzB/lhGQ9Bm0i18pgEe8P0rOKyjsizSHQQN6vAFEFXRkCxGICclUDRrMf6vhtdYeLdwzWw4+5gwcPjkvXDFMEssEmYih2RHTnqefIbY07Zhti/j2bkUY3agRE6DqUjwLX6ndHHtVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ami.com; dmarc=pass action=none header.from=ami.com; dkim=pass header.d=ami.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ami.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mBYfWSAkvoxIBlLTC/8zOLVyB+iQJ3pA7COQHS9Vu3k=; b=W14DRFwuLSaDfZbPa9Edzo5nBamgJ3i4JMCawbHXotF+TrzwOfPpk0/HyFvFan8wQTFvDTdZyuxaDOOeH612GkEeePX3LpJNz3Qli/6HG4E6nUaDxwIcNYQZAf+QtRs5fUZLYVKRkGPHSQK3Pd4kgTr6gO6EdVU6ZzPVuoQIgiE= Received: from CO1PR10MB4594.namprd10.prod.outlook.com (2603:10b6:303:9a::19) by DM4PR10MB6040.namprd10.prod.outlook.com (2603:10b6:8:b9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.12; Wed, 18 Jan 2023 07:19:34 +0000 Received: from CO1PR10MB4594.namprd10.prod.outlook.com ([fe80::db86:7ad6:2acc:a5eb]) by CO1PR10MB4594.namprd10.prod.outlook.com ([fe80::db86:7ad6:2acc:a5eb%5]) with mapi id 15.20.6002.024; Wed, 18 Jan 2023 07:19:34 +0000 From: Sountharya N To: "devel@edk2.groups.io" CC: Prarthana Sagar V , Srinivasan Mani Subject: RE : Build Error after adding GLOBAL_REMOVE_IF_UNREFERENCED in CryptoPkg's CryptTs.c file Thread-Topic: RE : Build Error after adding GLOBAL_REMOVE_IF_UNREFERENCED in CryptoPkg's CryptTs.c file Thread-Index: AdkrDSMSKOGPqG8zQ5uKGlH/04tlNw== Date: Wed, 18 Jan 2023 07:19:34 +0000 Message-ID: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ami.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR10MB4594:EE_|DM4PR10MB6040:EE_ x-ms-office365-filtering-correlation-id: 68d1d3da-a00e-4e29-cf51-08daf92459a6 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WwjQyLOf3PLOg8GoS7NHLOh+tyPXgXSfk6rCV7D0ZPAn2EfMv1Ok4LItiJQTsc4bpYcD9dKU8Jsa/uED6OcdWMerbvA5F6WqK+LJzN8N9y6sO9q7dZpnVE40XZjJLnhUc849zPn62Pw3adEevfIcUQMDKTiywvSRyBM+V5XiV8/TGdvK3nRfy8aS7Vmd+opGz3NqBKRNxYwat5szAZUz588Zy3Rv8SnfUwI5R8OId75wP7/YmPpLPjB2cQFFUpSNQIkvyk5UfMKlNaItAAEr0tfGr/mILsVmpc8EPv/AKY9Y+L6A+eNYkjHhS7rj9B5QzAIOMBCsJz1kc+IaOFQUKh5MPPFYUYwn0McmOjliT8AMvVL7dr4jYp28eAujWdWnYvuzaYljZ4PnfiYAqOHXPUCsRaWRPRup9XnvNA7E/WWcwiJrpAi8jXUWEArcvrc056CxPhHgxTBZHmZY/O74aIIY77RU3LVkSbCQ4W9jgD1fmjjnMktOMO1nS1j5g9WX3dc5bIhg3dcgBazmkd2RTrHp1o/QAIV+3p6g9xvJMI7ztKD+1MmAHzfEz5yYSDbpraPXid/jgN+t7aPyu9eLaMhovfUUd5l6BqjS5awiHrJDI8cQlu/4IL4jG9MnefuB1B/uBV8tNUdglePOQ7VpVP3VaAU8RKG+iFelbbGu3V/hPgFjnkozgIy9k60CsdXokz7eNj67nxjsfg6eXH/K3Wc2KIQcyG0yV+r6J0y9a3g= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4594.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(136003)(396003)(39850400004)(366004)(346002)(451199015)(38100700002)(40140700001)(33656002)(86362001)(122000001)(8936002)(52536014)(9326002)(41300700001)(5660300002)(66946007)(55016003)(66476007)(76116006)(8676002)(4326008)(66556008)(6916009)(64756008)(2906002)(66446008)(83380400001)(9686003)(54906003)(45080400002)(71200400001)(7696005)(38070700005)(316002)(186003)(478600001)(6506007)(460985005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XcV3pt4eeH19PF8YNDNLCXNFOdH5xEG7IQHtE1BKX9ucJZVRc6B8Oudhz3BA?= =?us-ascii?Q?8q8L3r+PhFurLSVTrW1exGX6AY2k6AndMgk8wtVUEtvtfXG1nNO98tIO9FLx?= =?us-ascii?Q?59oyIKT2tglZU63nfvdfNNDPXcXGc+7uaO4e/m+KtRD7vw/TA3yGXNT/EUOx?= =?us-ascii?Q?9wXUqCnKdgIyOEWtfmwy3KW5QQI4+J+dzh+isbdequ6EX1j5iwyv4KmPmust?= =?us-ascii?Q?/rtIkNjGklHl1+912Tb/yaS5tDKFbtEkmc34hXZV71jo9KzVe9Z4x7uzjUOC?= =?us-ascii?Q?XJc5jFQXYCIofOf4P7QmM87Guu0veBHJE8jzGDFlek0x0UC1VUoujfv548yU?= =?us-ascii?Q?dLkCOLtXdFmu9AU9k52MajO0NErbwD658/zd8Pa7TVhulaS2CdNsu1XEcQXA?= =?us-ascii?Q?jattX/wOT8u3iF7XvcrNnhCH2WEV8tvMSJd3YncaeMdoVDbCtGpUEQQ8Yyaq?= =?us-ascii?Q?FKudARdudy2WB6w1t9eij1Q99MkWtf0/4JKcSAiPT9DEgIl8eXP9EzAwydhQ?=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iTmwxbZ2ZGnZJ5XInyGasJ8sRaOAjWmZE1v?= =?us-ascii?Q?EVBHVGad6o3IC3We/hTjluwi9YKuCly37xPSMithcFOTM/O6L+AD30hwOJAB?= =?us-ascii?Q?vY1ZBffW8dZBgVIU94OJhMGnz95KDZYaXwEauDc3Pf4UcmV3F+Kgyl3Wr8pW?= =?us-ascii?Q?+M+Eg8gMm/FCipCizKVODr3n3FlrJ1JVKcsIdrH7tXm5N4gHbXvlhsBrfOtS?= =?us-ascii?Q?W6n0kCswCD4TPqETWO8gGZG1iWxfi4KyLVIDTmbB4WDE?= MIME-Version: 1.0 X-OriginatorOrg: ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4594.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68d1d3da-a00e-4e29-cf51-08daf92459a6 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jan 2023 07:19:34.3964 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 27e97857-e15f-486c-b58e-86c2b3040f93 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /KpnAhqu20G6bEp+mXJtjp2qMNRkYgo/9bHfiXJqpmdrVKQKd0Kkv+ByNdcsfbm1wkjo1B2vztddAE9NZS4xrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB6040 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_CO1PR10MB4594A2BD5A49F48BDF6DF8CDAEC79CO1PR10MB4594namp_" --_000_CO1PR10MB4594A2BD5A49F48BDF6DF8CDAEC79CO1PR10MB4594namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi, We are facing Build error in Old platforms after adding GLOBAL_REMOVE_IF_UN= REFERENCED in CryptoPkg's CryptTs.c file in edk202211 tag. GLOBAL_REMOVE_IF_UNREFERENCED macro is defined in MdePkg/Include/Base.h // // The Microsoft* C compiler can removed references to unreferenced data it= ems // if the /OPT:REF linker option is used. We defined a macro as this is a // a non standard extension // #if defined (_MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC) /// /// Remove global variable from the linked image if there are no references= to /// it after all compiler and linker optimizations have been performed. /// /// #define GLOBAL_REMOVE_IF_UNREFERENCED __declspec(selectany) #else /// /// Remove the global variable from the linked image if there are no refere= nces /// to it after all compiler and linker optimizations have been performed. /// /// #define GLOBAL_REMOVE_IF_UNREFERENCED #endif Facing Below Build Error: Building ... d:\bakerville\crypto\5.14_bakerville_0acjf044\MdePkg\Library\D= xeServicesLib\DxeServicesLib.inf [X64] d:\bakerville\crypto\5.14_bakerville_0acjf044\CryptoPkg\Library\BaseCryptLi= b\Pk\CryptTs.c(58) : error C2496: 'TS_MESSAGE_IMPRINT_new' : 'selectany' ca= n only be applied to data items with external linkage d:\bakerville\crypto\5.14_bakerville_0acjf044\CryptoPkg\Library\BaseCryptLi= b\Pk\CryptTs.c(89) : error C2496: 'TS_ACCURACY_new' : 'selectany' can only = be applied to data items with external linkage d:\bakerville\crypto\5.14_bakerville_0acjf044\CryptoPkg\Library\BaseCryptLi= b\Pk\CryptTs.c(141) : error C2496: 'TS_TST_INFO_new' : 'selectany' can only= be applied to data items with external linkage NMAKE : fatal error U1077: 'F:\Tools\WINDDK\7600.16385.1\bin\x86\amd64\cl.e= xe' : return code '0x2' Stop. AmiFlashLibCommon.c Assembling: d:\bakerville\crypto\5.14_bakerville_0acjf044\Build\YubaCity\RE= LEASE_MYTOOLS\X64\AmiCompatibilityPkg\Library\AmiDxeLib\OUTPUT\x64\x64AsmLi= b\GetCpuTimer.iii build... : error 7000: Failed to execute command nmake.exe /nologo -s tbuild [d:\bakerville\crypto\5.14_bakerville_0acjf= 044\Build\YubaCity\RELEASE_MYTOOLS\X64\CryptoPkg\Library\BaseCryptLib\BaseC= ryptLib] After commenting GLOBAL_REMOVE_IF_UNREFERENCED macro in CryptTs.c file, pro= ject builds successfully. Kindly, provide your comments. Thanks, Sountharya -The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are o= n notice that any distribution of this message, in any form, is strictly pr= ohibited. Please promptly notify the sender by reply e-mail or by telephone= at 770-246-8600, and then delete or destroy all copies of the transmission= . --_000_CO1PR10MB4594A2BD5A49F48BDF6DF8CDAEC79CO1PR10MB4594namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi,

 

We are facing Build error in Old platforms after addin= g GLOBAL_REMOVE_IF_UNREFERENCED in CryptoPkg's CryptTs.c file in edk202211 = tag.

 

GLOBAL_REMOVE_IF_UNREFERENCED macro is defined in MdePkg/In= clude/Base.h 

//

// The Microsoft* C compiler can removed references to unre= ferenced data items

//  if the /OPT:REF linker option is used. We defined = a macro as this is a

//  a non standard extension

//

#if defined (_= MSC_VER) && _MSC_VER < 1800 && !defined (MDE_CPU_EBC)

///

/// Remove global variable from the linked image if there a= re no references to

/// it after all compiler and linker optimizations have bee= n performed.

///

///

#define GLOBAL= _REMOVE_IF_UNREFERENCED  __declspe= c(selectany)

#else

///

/// Remove the global variable from the linked image if the= re are no references

///  to it after all compiler and linker optimizations= have been performed.

///

///

#define GLOBAL= _REMOVE_IF_UNREFERENCED

#endif

 

Facing Below Build Error:

Building ... d:\bakerville\crypto\5.14_bakerville_0acjf044\= MdePkg\Library\DxeServicesLib\DxeServicesLib.inf [X64]
d:\bakerville\crypto\5.14_bakerville_0acjf044\CryptoPkg\Library\BaseCryptLi= b\Pk\CryptTs.c(58) : error C2496: 'TS_MESSAGE_IMPRINT_new' : 'selectany' ca= n only be applied to data items with external linkage
d:\bakerville\crypto\5.14_bakerville_0acjf044\CryptoPkg\Library\BaseCryptLi= b\Pk\CryptTs.c(89) : error C2496: 'TS_ACCURACY_new' : 'selectany' can only = be applied to data items with external linkage
d:\bakerville\crypto\5.14_bakerville_0acjf044\CryptoPkg\Library\BaseCryptLi= b\Pk\CryptTs.c(141) : error C2496: 'TS_TST_INFO_new' : 'selectany' can only= be applied to data items with external linkage
NMAKE : fatal error U1077: 'F:\Tools\WINDDK\7600.16385.1\bin\x86\amd64\cl.e= xe' : return code '0x2'
Stop.
AmiFlashLibCommon.c
Assembling: d:\bakerville\crypto\5.14_bakerville_0acjf044\Build\YubaCity\RE= LEASE_MYTOOLS\X64\AmiCompatibilityPkg\Library\AmiDxeLib\OUTPUT\x64\x64AsmLi= b\GetCpuTimer.iii

 


build...
: error 7000: Failed to execute command
    nmake.exe /nologo -s tbuild [d:\bakerville\crypto\5.14_b= akerville_0acjf044\Build\YubaCity\RELEASE_MYTOOLS\X64\CryptoPkg\Library\Bas= eCryptLib\BaseCryptLib]

 

After commenting GLOBAL_REMOVE_IF_UNREFERENCED macro in Cry= ptTs.c file, project builds successfully. Kindly, provide your comment= s.

 

Thanks,

Sountharya

-The information contained in this message may be confidential and propriet= ary to American Megatrends (AMI). This communication is intended to be read= only by the individual or entity to whom it is addressed or by their desig= nee. If the reader of this message is not the intended recipient, you are on notice that any distribution of = this message, in any form, is strictly prohibited. Please promptly notify t= he sender by reply e-mail or by telephone at 770-246-8600, and then delete = or destroy all copies of the transmission. --_000_CO1PR10MB4594A2BD5A49F48BDF6DF8CDAEC79CO1PR10MB4594namp_--