1
0
Fork 0
alistair23-linux/arch
Jesper Nilsson 9fe3fd03a1 CRIS: Import string.c (memcpy) from newlib: fixes compile error with gcc 4
Adrian Bunk reported another compile error with a SVN head GCC:

...
  CC      arch/cris/arch-v10/lib/string.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:138:
error: lvalue required as increment operand
/home/bunk/linux/kernel-2.6/git/linux-2.6/arch/cris/arch-v10/lib/string.c:139:
error: lvalue required as increment operand
...

This is due to the use of the construct:

	*((long*)dst)++ = lc;

Which isn't legal since casts don't return an lvalue.

The solution is to import the implementation from newlib,
which is continually autotested together with GCC mainline,
and uses the construct:

	*(long *) dst = lc; dst += 4;

Since this is an import of a file from newlib, I'm not touching
the formatting or correcting any checkpatch errors.

As for the earlier fix for memset.c, even if the two files for
CRIS v10 and CRIS v32 are identical at the moment, it might
be possible to tweak the CRIS v32 version.
Thus, I'm not yet folding them into the same file, at least not
until we've done some research on it.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-03-04 16:35:13 -08:00
..
alpha Introduce path_put() 2008-02-14 21:13:33 -08:00
arm Kprobes: indicate kretprobe support in Kconfig 2008-03-04 16:35:11 -08:00
avr32 avr32: Fix OCD refcounting bug 2008-02-27 14:23:53 +01:00
blackfin [Blackfin] arch: kill section mismatch warnings 2008-02-29 12:02:10 +08:00
cris CRIS: Import string.c (memcpy) from newlib: fixes compile error with gcc 4 2008-03-04 16:35:13 -08:00
frv FRV: Change the timerfd syscalls to be the same as i386 2008-02-20 19:58:16 -08:00
h8300 h8300: defconfig update 2008-02-23 17:12:16 -08:00
ia64 Kprobes: indicate kretprobe support in Kconfig 2008-03-04 16:35:11 -08:00
m32r ide: introduce HAVE_IDE 2008-02-09 10:46:40 +01:00
m68k m68k{,nommu}: Wire up new timerfd syscalls 2008-03-04 08:04:11 -08:00
m68knommu m68k{,nommu}: Wire up new timerfd syscalls 2008-03-04 08:04:11 -08:00
mips [MIPS] BCM47XX: Use new SSB SPROM data structure 2008-02-19 17:01:34 +00:00
mn10300 MN10300: define HZ as a config option 2008-02-23 17:12:13 -08:00
parisc Introduce path_put() 2008-02-14 21:13:33 -08:00
powerpc Kprobes: indicate kretprobe support in Kconfig 2008-03-04 16:35:11 -08:00
ppc [POWERPC] PPC440EP Interrupt Triggering and Level Settings 2008-02-15 21:33:02 -06:00
s390 Kprobes: indicate kretprobe support in Kconfig 2008-03-04 16:35:11 -08:00
sh arch/sh/drivers/dma/dma-sh.c: Correct use of ! and & 2008-02-27 10:28:48 +09:00
sparc [SPARC]: Fix build in arch/sparc/kernel/led.c 2008-02-24 18:45:09 -08:00
sparc64 Kprobes: indicate kretprobe support in Kconfig 2008-03-04 16:35:11 -08:00
um sched: add declaration of sched_tail to sched.h 2008-02-25 16:34:17 +01:00
v850 ide: introduce HAVE_IDE 2008-02-09 10:46:40 +01:00
x86 Kprobes: indicate kretprobe support in Kconfig 2008-03-04 16:35:11 -08:00
xtensa [XTENSA] Allow debugger to modify the WINDOWBASE register. 2008-02-13 17:45:36 -08:00
.gitignore arch: Ignore arch/i386 and arch/x86_64 2008-01-19 21:29:39 -08:00
Kconfig Kprobes: indicate kretprobe support in Kconfig 2008-03-04 16:35:11 -08:00