From patchwork Thu Nov 2 10:21:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13443603 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78EB0C4332F for ; Thu, 2 Nov 2023 10:21:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.626822.977426 (Exim 4.92) (envelope-from ) id 1qyUpT-0006F1-Uz; Thu, 02 Nov 2023 10:21:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 626822.977426; Thu, 02 Nov 2023 10:21:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qyUpT-0006Eu-SG; Thu, 02 Nov 2023 10:21:35 +0000 Received: by outflank-mailman (input) for mailman id 626822; Thu, 02 Nov 2023 10:21:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qyUpT-0006Em-0g for xen-devel@lists.xenproject.org; Thu, 02 Nov 2023 10:21:35 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 98106682-7969-11ee-9b0e-b553b5be7939; Thu, 02 Nov 2023 11:21:32 +0100 (CET) Received: from Dell.homenet.telecomitalia.it (host-87-7-132-154.retail.telecomitalia.it [87.7.132.154]) by support.bugseng.com (Postfix) with ESMTPSA id 0A26D4EE0737; Thu, 2 Nov 2023 11:21:32 +0100 (CET) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 98106682-7969-11ee-9b0e-b553b5be7939 From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [XEN PATCH] xen/lib: remove the overwrtitten string functions from x86 build Date: Thu, 2 Nov 2023 11:21:01 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Remove the generic implementation of memcpy(), memmove() and memset() from the x86 build since a version written in asm is present. This addesses violations of MISRA C:2012 Rule 8.6 ("An identifier with external linkage shall have exactly one external definition"). Signed-off-by: Federico Serafini --- xen/lib/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xen/lib/Makefile b/xen/lib/Makefile index 2d9ebb945f..ac0edd4745 100644 --- a/xen/lib/Makefile +++ b/xen/lib/Makefile @@ -1,5 +1,9 @@ obj-$(CONFIG_X86) += x86/ +ifneq ($(CONFIG_X86),y) + NO_ARCH_STRING_C=y +endif + lib-y += bsearch.o lib-y += ctors.o lib-y += ctype.o @@ -7,9 +11,9 @@ lib-y += list-sort.o lib-y += memchr.o lib-y += memchr_inv.o lib-y += memcmp.o -lib-y += memcpy.o -lib-y += memmove.o -lib-y += memset.o +lib-$(NO_ARCH_STRING_C) += memcpy.o +lib-$(NO_ARCH_STRING_C) += memmove.o +lib-$(NO_ARCH_STRING_C) += memset.o lib-y += muldiv64.o lib-y += parse-size.o lib-y += rbtree.o