diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | arch/i386/Makefile | 3 | ||||
-rw-r--r-- | include/asm-x86_64/string.h | 17 |
3 files changed, 7 insertions, 16 deletions
@@ -306,8 +306,7 @@ LINUXINCLUDE := -Iinclude \ | |||
306 | CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) | 306 | CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) |
307 | 307 | ||
308 | CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ | 308 | CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ |
309 | -fno-strict-aliasing -fno-common \ | 309 | -fno-strict-aliasing -fno-common |
310 | -ffreestanding | ||
311 | AFLAGS := -D__ASSEMBLY__ | 310 | AFLAGS := -D__ASSEMBLY__ |
312 | 311 | ||
313 | # Read KERNELRELEASE from .kernelrelease (if it exists) | 312 | # Read KERNELRELEASE from .kernelrelease (if it exists) |
diff --git a/arch/i386/Makefile b/arch/i386/Makefile index ff6973a85c8f..c848a5b30391 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile | |||
@@ -39,6 +39,9 @@ include $(srctree)/arch/i386/Makefile.cpu | |||
39 | 39 | ||
40 | cflags-$(CONFIG_REGPARM) += -mregparm=3 | 40 | cflags-$(CONFIG_REGPARM) += -mregparm=3 |
41 | 41 | ||
42 | # temporary until string.h is fixed | ||
43 | cflags-y += -ffreestanding | ||
44 | |||
42 | # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use | 45 | # Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use |
43 | # a lot more stack due to the lack of sharing of stacklots: | 46 | # a lot more stack due to the lack of sharing of stacklots: |
44 | CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) | 47 | CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) |
diff --git a/include/asm-x86_64/string.h b/include/asm-x86_64/string.h index a3493ee282bb..ee6bf275349e 100644 --- a/include/asm-x86_64/string.h +++ b/include/asm-x86_64/string.h | |||
@@ -40,26 +40,15 @@ extern void *__memcpy(void *to, const void *from, size_t len); | |||
40 | 40 | ||
41 | 41 | ||
42 | #define __HAVE_ARCH_MEMSET | 42 | #define __HAVE_ARCH_MEMSET |
43 | #define memset __builtin_memset | 43 | void *memset(void *s, int c, size_t n); |
44 | 44 | ||
45 | #define __HAVE_ARCH_MEMMOVE | 45 | #define __HAVE_ARCH_MEMMOVE |
46 | void * memmove(void * dest,const void *src,size_t count); | 46 | void * memmove(void * dest,const void *src,size_t count); |
47 | 47 | ||
48 | /* Use C out of line version for memcmp */ | ||
49 | #define memcmp __builtin_memcmp | ||
50 | int memcmp(const void * cs,const void * ct,size_t count); | 48 | int memcmp(const void * cs,const void * ct,size_t count); |
51 | |||
52 | /* out of line string functions use always C versions */ | ||
53 | #define strlen __builtin_strlen | ||
54 | size_t strlen(const char * s); | 49 | size_t strlen(const char * s); |
55 | 50 | char *strcpy(char * dest,const char *src); | |
56 | #define strcpy __builtin_strcpy | 51 | char *strcat(char * dest, const char * src); |
57 | char * strcpy(char * dest,const char *src); | ||
58 | |||
59 | #define strcat __builtin_strcat | ||
60 | char * strcat(char * dest, const char * src); | ||
61 | |||
62 | #define strcmp __builtin_strcmp | ||
63 | int strcmp(const char * cs,const char * ct); | 52 | int strcmp(const char * cs,const char * ct); |
64 | 53 | ||
65 | #endif /* __KERNEL__ */ | 54 | #endif /* __KERNEL__ */ |