[uClibc] Re: Kernel 2.4 and gcc 3.4
Peter S. Mazinger
ps.m at gmx.net
Mon Feb 28 15:43:39 UTC 2005
Attached a patch that I used, it seems that -Os in gcc-3.4 optimizes away
memcmp
Disclaimer: don't blaim me, if it is incorrect, if you loose data, etc ;)
I haven't gotten any feedback on this patch.
Peter
--
Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
-------------- next part --------------
--- lib/string.c.mps Tue Nov 30 14:22:32 2004
+++ lib/string.c Tue Nov 30 14:24:03 2004
@@ -459,6 +459,7 @@
break;
return res;
}
+EXPORT_SYMBOL(memcmp);
#endif
#ifndef __HAVE_ARCH_MEMSCAN
--- lib/Makefile.mps Tue Nov 30 14:24:07 2004
+++ lib/Makefile Tue Nov 30 14:25:35 2004
@@ -9,7 +9,7 @@
L_TARGET := lib.a
export-objs := cmdline.o dec_and_lock.o rwsem-spinlock.o rwsem.o \
- rbtree.o crc32.o firmware_class.o
+ rbtree.o crc32.o firmware_class.o string.o
obj-y := errno.o ctype.o string.o vsprintf.o brlock.o cmdline.o \
bust_spinlocks.o rbtree.o dump_stack.o
--- include/asm-i386/string.h.mps 2004-11-30 15:36:30.000000000 +0100
+++ include/asm-i386/string.h 2004-11-30 15:06:17.000000000 +0100
@@ -332,7 +332,9 @@
return dest;
}
+#ifdef __HAVE_ARCH_MEMCMP
#define memcmp __builtin_memcmp
+#endif
#define __HAVE_ARCH_MEMCHR
static inline void * memchr(const void * cs,int c,size_t count)
More information about the uClibc
mailing list