Skip to contentSkip to conversation

x86, efi: Fix processor-specific memcpy() build error

PATCH New Matt Fleming 1 participant 1 message Mar 22, 2012 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, efi: Fix processor-specific memcpy() build error

From: Matt Fleming <[email protected]>

Building for Athlon/Duron/K7 results in the following build error,

arch/x86/boot/compressed/eboot.o: In function `__constant_memcpy3d':
eboot.c:(.text+0x385): undefined reference to _mmx_memcpy' arch/x86/boot/compressed/eboot.o: In function efi_main':
eboot.c:(.text+0x1a22): undefined reference to `_mmx_memcpy'

because the boot stub code doesn't link with the kernel proper, and therefore doesn't have access to the 3DNow version of memcpy. So, follow the example of misc.c and #undef memcpy so that we use the version provided by misc.c.

---
 arch/x86/boot/compressed/eboot.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/boot/compressed/eboot.c +2 -0
index fec216f..3481574 100644
@@ -14,6 +14,8 @@
 
 #include "eboot.h"
 
+#undef memcpy			/* Use memcpy from misc.c */
+
 static efi_system_table_t *sys_table;
 
 static efi_status_t __get_map(efi_memory_desc_t **map, unsigned long *map_size,
Signature · 1 line
1.7.4.4