* fib_hash.c:fn_hash()
@ 2004-06-24 8:09 Andrew Morton
2004-06-24 10:39 ` fib_hash.c:fn_hash() Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2004-06-24 8:09 UTC (permalink / raw)
To: netdev
Current gcc CVS emits a memmove() when compiling this function, and the
kernel link fails.
The gcc guys are being rude about it:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16172
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: fib_hash.c:fn_hash()
2004-06-24 8:09 fib_hash.c:fn_hash() Andrew Morton
@ 2004-06-24 10:39 ` Andi Kleen
2004-06-24 15:39 ` fib_hash.c:fn_hash() Jeff Garzik
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2004-06-24 10:39 UTC (permalink / raw)
To: Andrew Morton; +Cc: netdev
On Thu, Jun 24, 2004 at 01:09:38AM -0700, Andrew Morton wrote:
>
> Current gcc CVS emits a memmove() when compiling this function, and the
> kernel link fails.
It's just an i386 bug. Other architectures have a proper out of line
memmove.
I would suggest to just not define __HAVE_ARCH_MEMMOVE, then lib/string.c
will do the right thing.
BTW if we don't want to supply these functions we should change
the kernel to compile with -ffreestanding. But so far at least
the common ports are good enough at that now that it isn't needed.
-Andi
Here's a patch: Or perhaps it would be better to just remove
this completely from asm/string.h, since I can see no sane reason
to inline memmove(). That would make the kernel smaller.
diff -u linux/include/asm-i386/string.h-o linux/include/asm-i386/string.h
--- linux/include/asm-i386/string.h-o 2004-03-21 21:11:56.000000000 +0100
+++ linux/include/asm-i386/string.h 2004-06-24 12:38:25.000000000 +0200
@@ -293,7 +293,7 @@
memcpy(x, y, sizeof(*(x))); \
})
-#define __HAVE_ARCH_MEMMOVE
+#ifndef IN_STRING_C
static inline void * memmove(void * dest,const void * src, size_t n)
{
int d0, d1, d2;
@@ -312,6 +312,7 @@
:"memory");
return dest;
}
+#endif
#define memcmp __builtin_memcmp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: fib_hash.c:fn_hash()
2004-06-24 10:39 ` fib_hash.c:fn_hash() Andi Kleen
@ 2004-06-24 15:39 ` Jeff Garzik
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2004-06-24 15:39 UTC (permalink / raw)
To: Andi Kleen; +Cc: Andrew Morton, netdev
Andi Kleen wrote:
> BTW if we don't want to supply these functions we should change
> the kernel to compile with -ffreestanding. But so far at least
> the common ports are good enough at that now that it isn't needed.
Agreed...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-24 15:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-24 8:09 fib_hash.c:fn_hash() Andrew Morton
2004-06-24 10:39 ` fib_hash.c:fn_hash() Andi Kleen
2004-06-24 15:39 ` fib_hash.c:fn_hash() Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).