From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.61]) by mx.groups.io with SMTP id smtpd.web10.16761.1682590677746712795 for ; Thu, 27 Apr 2023 03:17:58 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nvidia.com header.s=selector2 header.b=WF9wxy77; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: nvidia.com, ip: 40.107.220.61, mailfrom: nicklew@nvidia.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AzbarA9jrlH2gMvICLEmUU7yPkprGQpvIU35COLyvsgWGZqFc9AkmQjh6a3+nOYPR4mjSA3LxJkASktDUTamVcfy/QYznx8YpDYXG1fzsHCs5jvJ9InJlkEBmFZdHBQQXBgqJUYfwOyBH6DJUCicSXv+PS9Vr2ktw8O8IaYjJ2KKxPu6ZsSgPX2eJsPjfqh+73hA2ydJShioh/qKjBAQkghvPTCghO+6QE0AgjrWQluPklarT9DoHhy3P6BxtH3M+Mt188wHR7kcwIv8VzISBV7VC4wnNACSuJewjcg/IqDAfoPlVIcdm/IWBDYpXDngpSXmEhr74WZabvBVxVuLUA== 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=GG7oM83Pc46lsba8VdalwZot8gbUoeYchSOORmH5cso=; b=Y3COJ19TIfnIHE+4XnyT9TBlpetcEPvjQm5H9BkgniTU6QsxnbVR+wbJdK/qGE6tGrVrO3gzmrvBWWuUO43r1pm2QQrSRZaQt1aa699HOQxsXKY7K+GDLaOnzUuAYLBJaraGQs3U+Xk5+o8SLG9rZsPE6VCa3wk+JfSX7AfUwU9uxlLK1gu2vibnG55rf3UxKvIyUVo2Vx8PB0vZnjEPCp0lQQ7J/k8e0DECqBcuQ8BHdBOhlLM9EDKgm8ebtHcCwxDUQ9YpKP0tZyb3+YWTVVMT6RexfypIVa9Up0H5h/2aCZOUB9LWjbAxUGlArDenGGkfYmkns7EEJT0fhBC0zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GG7oM83Pc46lsba8VdalwZot8gbUoeYchSOORmH5cso=; b=WF9wxy77RzEJPwSTHk2Dsgx8nLV0XGMh4JKaUB3CLnsBC10PdKSyKbqWk9voZnZGscZuF42BfmLLqkCWiGB5ReXozDv2Wxgpj2unf1ow0JsHAvzkxt3e+iSa0Gv5FlUBWDfMs/whgWL7cVzb/buOMbcQ9c7h/lujXQsYei+ts6+TAN1NRYL4lvFCisRl+XGNYdUNE7PNnAYr8QmPoOyRub4JAYwNTDXhUj9eSArHZYPwpuReYcA7d/dWJNent5+gxtms8ub9YilTIun2CGs/+4e7Xz8aplHppNzm4LTeZvA+y8oTF/Rm7dUzLOT44V/1oG05rND+TG7wWyP6wbW1zg== Received: from MW4PR03CA0080.namprd03.prod.outlook.com (2603:10b6:303:b6::25) by CH2PR12MB4245.namprd12.prod.outlook.com (2603:10b6:610:af::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.22; Thu, 27 Apr 2023 10:17:53 +0000 Received: from CO1NAM11FT079.eop-nam11.prod.protection.outlook.com (2603:10b6:303:b6:cafe::fe) by MW4PR03CA0080.outlook.office365.com (2603:10b6:303:b6::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.22 via Frontend Transport; Thu, 27 Apr 2023 10:17:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1NAM11FT079.mail.protection.outlook.com (10.13.175.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.22 via Frontend Transport; Thu, 27 Apr 2023 10:17:53 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 27 Apr 2023 03:17:40 -0700 Received: from rnnvmail204.nvidia.com (10.129.68.6) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 27 Apr 2023 03:17:39 -0700 Received: from NV-CL38DL3.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.6) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 27 Apr 2023 03:17:38 -0700 From: "Nickle Wang" To: CC: Jian J Wang , Liming Gao , Michael D Kinney , Nick Ramirez Subject: [PATCH v2 1/1] MdeModulePkg/RegularExpressionDxe: Fix Arm build error Date: Thu, 27 Apr 2023 18:17:37 +0800 Message-ID: <20230427101737.108-1-nicklew@nvidia.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Return-Path: nicklew@nvidia.com X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1NAM11FT079:EE_|CH2PR12MB4245:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ee17d23-4391-49db-17f0-08db4708a996 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wiuw3ICB+IRUNQaYtuCuiO6UioKsuYPl0lsc4wG67qcOPGIn3/rSM4X9PCRyi7MMeoBk9n5GfySGLuTyDn648T1kn1NaZRCowemoFn8aTCCS5vKemyIm4qLYdLmh8FUoOpLC0QCs+NlCeZOkQeqFla2VHWY21/npmUPrMbABdFOR/aJ+G3V1al5bt6f7m/y0eHz2Jt1vvdpsjLxl+MmBt+06hSzdnU2yZ/2I2hkIXv2UALE2ZagiLBKE0zJ/MvNbs7DE9sLQJ83JbKsizDNqg9TqW827p142ZDnrJXpxOrpbsNRffcMQWL1WDH9wBpZYDBiniCpfdZFA4TB6rYSEnJniiW30294M0R1N1RmDbOe5OwIfu2v5S4Pj9BKy1IAE+pKpY1PIziaZJgJhyB9kgOot4eH6XqdInToxh6fGENlS5xrJQDJjXxs4pwYFIYQTPC2v/FFeTodr/nkYo0qX7uhIrBr6Krw13t2w7uVGgxqRVptwpno6PbUCuCu37K1btNqE8I83K5NzAw4ZBRFqMRgYIXRtNsDQQjBqSid+BSML41pGhDxvVySEXXkw1boitev6spImTLQ0nivCHseH/+mxbrFp2ShcG2NDe4kEuXVaYeI4WIuqOeRwpYb++SQB2OO4zbiinzKWXViAU5rSfVlViahwESG7aJ9mxLJIkY0AnZFAu/Ja6Ns+oYFJ60n69ElLPC4jalUnB0jjnCJ1WP7H1joIm3nVjxBZgtSOnYc= X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(376002)(136003)(39860400002)(451199021)(36840700001)(46966006)(40470700004)(86362001)(107886003)(41300700001)(26005)(1076003)(2906002)(47076005)(5660300002)(8676002)(40480700001)(8936002)(36756003)(336012)(426003)(40460700003)(34020700004)(478600001)(83380400001)(7636003)(356005)(54906003)(186003)(7696005)(82740400003)(36860700001)(82310400005)(4326008)(6916009)(316002)(2616005)(70586007)(70206006);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2023 10:17:53.1991 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ee17d23-4391-49db-17f0-08db4708a996 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1NAM11FT079.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4245 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Arm CI build error: - ArmPkg/Library/CompilerIntrinsicsLib/memset.c:39:1: warning: type of =E2=80=98memset=E2=80=99 does not match original declaration [-Wlto-type-mi= smatch] MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c:123:1: note: type =E2=80=98char=E2=80=99 should match type =E2=80=98int=E2=80=99 - multiple definition of `memcpy'; OnigurumaUefiPort.obj (symbol from plugin):(.text+0x0): first defined here Fix: - Update memset() implementation to match memset() definition in ArmPkg/Library/CompilerIntrinsicsLib. - memcpy() is supported by ArmPkg/Library/CompilerIntrinsicsLib. Exclude it in OnigurumaUefiPort.c. Signed-off-by: Nickle Wang Cc: Jian J Wang Cc: Liming Gao Cc: Michael D Kinney Cc: Nick Ramirez --- .../Universal/RegularExpressionDxe/OnigurumaUefiPort.h | 7 +++++-- .../Universal/RegularExpressionDxe/OnigurumaUefiPort.c | 8 ++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.= h b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h index 248109b0c96e..8931f8ec50a9 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h +++ b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.h @@ -4,7 +4,7 @@ =20 (C) Copyright 2014-2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2020, Intel Corporation. All rights reserved.
- Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . + Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights res= erved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -107,6 +107,7 @@ realloc ( size_t size ); =20 +#if !defined (MDE_CPU_ARM) void * memcpy ( void *dest, @@ -114,10 +115,12 @@ memcpy ( unsigned int count ); =20 +#endif + void * memset ( void *dest, - char ch, + int ch, unsigned int count ); =20 diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.= c b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c index 6661c67f976e..0d8984dde091 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/OnigurumaUefiPort.c @@ -4,6 +4,7 @@ =20 (C) Copyright 2014-2021 Hewlett Packard Enterprise Development LP
Copyright (c) 2020, Intel Corporation. All rights reserved.
+ Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved= . =20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -109,6 +110,7 @@ realloc ( return NULL; } =20 +#if !defined (MDE_CPU_ARM) void * memcpy ( void *dest, @@ -119,14 +121,16 @@ memcpy ( return CopyMem (dest, src, (UINTN)count); } =20 +#endif + void * memset ( void *dest, - char ch, + int ch, unsigned int count ) { - return SetMem (dest, count, ch); + return SetMem (dest, (UINTN)count, (UINT8)ch); } =20 void --=20 2.17.1