Re: Strange problem with emu10k1 and gcc-3.4

From: Valdis . Kletnieks
Date: Thu Feb 12 2004 - 22:16:46 EST


On Fri, 13 Feb 2004 00:18:02 +0100, "J.A. Magallon" <jamagallon@xxxxxxx> said:
> Hi al...
>
> I have tried to build 2.6.3-rc2-mm1 with gcc-3.4, and it works apart from thi
s:

> emu10k1: Unknown symbol strcpy
>

Alternate fix for a similar problem I hit is appended. Basically, if
gcc-3.4 fails to inline all of them, we need to have a copy that's visible
from a module.

(Oh, the '#undef memcmp' was needed because memcmp was #defined to
__inline_memcmp so the wrong thing got EXPORT_SYMBOL'ed...)

I'll submit an extended patch that does all of string.c if people think
it's a good idea.

--- linux-2.6.2-rc1-mm1/lib/string.c.dist 2004-01-22 17:20:00.859598882 -0500
+++ linux-2.6.2-rc1-mm1/lib/string.c 2004-01-22 17:29:43.316730389 -0500
@@ -501,6 +501,9 @@
#endif

#ifndef __HAVE_ARCH_MEMCMP
+#ifdef memcmp
+#undef memcmp
+#endif
/**
* memcmp - Compare two areas of memory
* @cs: One area of memory
@@ -517,6 +520,7 @@
break;
return res;
}
+EXPORT_SYMBOL(memcmp);
#endif

#ifndef __HAVE_ARCH_MEMSCAN


Attachment: pgp00000.pgp
Description: PGP signature