[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH] xen/lib: remove the overwrtitten string functions from x86 build



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 <federico.serafini@xxxxxxxxxxx>
---
 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
-- 
2.34.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.