ia64/xen-unstable

changeset 16450:5e8e82e80f3b

Fix non-optimized compilation of Xen's memcmp

Even when using __builtin_memcmp, gcc may emit external references to
memcmp (when not optimizing for instance), so this #define does not
always provide a completely suitable memcmp().

Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Nov 24 13:37:26 2007 +0000 (2007-11-24)
parents 96409cebd74b
children 483329e219c9
files xen/common/string.c xen/include/asm-x86/string.h
line diff
     1.1 --- a/xen/common/string.c	Sat Nov 24 13:31:39 2007 +0000
     1.2 +++ b/xen/common/string.c	Sat Nov 24 13:37:26 2007 +0000
     1.3 @@ -370,6 +370,7 @@ void * memmove(void * dest,const void *s
     1.4  #endif
     1.5  
     1.6  #ifndef __HAVE_ARCH_MEMCMP
     1.7 +#undef memcmp
     1.8  /**
     1.9   * memcmp - Compare two areas of memory
    1.10   * @cs: One area of memory
     2.1 --- a/xen/include/asm-x86/string.h	Sat Nov 24 13:31:39 2007 +0000
     2.2 +++ b/xen/include/asm-x86/string.h	Sat Nov 24 13:37:26 2007 +0000
     2.3 @@ -109,7 +109,8 @@ void *__memcpy(void *t, const void *f, s
     2.4  #define __HAVE_ARCH_MEMMOVE
     2.5  extern void *memmove(void *dest, const void *src, size_t n);
     2.6  
     2.7 -#define __HAVE_ARCH_MEMCMP
     2.8 +/* Some versions of gcc emit references to memcmp despite this macro defn. */
     2.9 +/*#define __HAVE_ARCH_MEMCMP*/
    2.10  #define memcmp __builtin_memcmp
    2.11  
    2.12  static inline void *__memset_generic(void *s, char c, size_t count)