From 31ae968e2df4bff3facb9e1ebb856ad5b27d58fd Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Sat, 25 Mar 2006 16:29:49 +0100 Subject: [PATCH] --- yaml --- r: 23806 b: refs/heads/master c: 6edfba1b33c701108717f4e036320fc39abe1912 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Makefile | 3 +-- trunk/arch/i386/Makefile | 3 +++ trunk/include/asm-x86_64/string.h | 17 +++-------------- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/[refs] b/[refs] index 91d827e86463..013e6a43a04e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 681558fdb5848f0a6dc248108f0f7323f7380857 +refs/heads/master: 6edfba1b33c701108717f4e036320fc39abe1912 diff --git a/trunk/Makefile b/trunk/Makefile index 7bc2f4ad8093..af6210d48836 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -306,8 +306,7 @@ LINUXINCLUDE := -Iinclude \ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common \ - -ffreestanding + -fno-strict-aliasing -fno-common AFLAGS := -D__ASSEMBLY__ # Read KERNELRELEASE from .kernelrelease (if it exists) diff --git a/trunk/arch/i386/Makefile b/trunk/arch/i386/Makefile index ff6973a85c8f..c848a5b30391 100644 --- a/trunk/arch/i386/Makefile +++ b/trunk/arch/i386/Makefile @@ -39,6 +39,9 @@ include $(srctree)/arch/i386/Makefile.cpu cflags-$(CONFIG_REGPARM) += -mregparm=3 +# temporary until string.h is fixed +cflags-y += -ffreestanding + # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use # a lot more stack due to the lack of sharing of stacklots: CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) diff --git a/trunk/include/asm-x86_64/string.h b/trunk/include/asm-x86_64/string.h index a3493ee282bb..ee6bf275349e 100644 --- a/trunk/include/asm-x86_64/string.h +++ b/trunk/include/asm-x86_64/string.h @@ -40,26 +40,15 @@ extern void *__memcpy(void *to, const void *from, size_t len); #define __HAVE_ARCH_MEMSET -#define memset __builtin_memset +void *memset(void *s, int c, size_t n); #define __HAVE_ARCH_MEMMOVE void * memmove(void * dest,const void *src,size_t count); -/* Use C out of line version for memcmp */ -#define memcmp __builtin_memcmp int memcmp(const void * cs,const void * ct,size_t count); - -/* out of line string functions use always C versions */ -#define strlen __builtin_strlen size_t strlen(const char * s); - -#define strcpy __builtin_strcpy -char * strcpy(char * dest,const char *src); - -#define strcat __builtin_strcat -char * strcat(char * dest, const char * src); - -#define strcmp __builtin_strcmp +char *strcpy(char * dest,const char *src); +char *strcat(char * dest, const char * src); int strcmp(const char * cs,const char * ct); #endif /* __KERNEL__ */