PATCH: Fix build failure with GCC-4.2

Matthias Klose doko@ubuntu.com
Mon Jul 2 19:22:00 GMT 2007


[see http://bugs.debian.org/429738]

Building current CVS with --enable-targets=...,spu with GCC-4.2 fails with:

...
LIB_PATH='' /bin/sh ../../ld/genscripts.sh "../../ld" "/usr/lib" "/usr" "/usr"
i486-pc-linux-gnu i486-pc-linux-gnu i486-linux-gnu "elf_i386 elf64alpha
armelf_linux armelfb_linux hppalinux elf_x86_64 elf64_ia64 m68kelf elf32btsmip
elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip elf32ppclinux
elf32ppc elf64ppc elf_s390 elf64_s390 shlelf_linux shelf_linux elf32_sparc
elf64_sparc m32relf_linux elf32_spu" "/usr/local/lib /lib /usr/lib" no elf32_spu
"spu"
gcc -DHAVE_CONFIG_H -I. -I../../ld -I. -D_GNU_SOURCE -I. -I../../ld -I../bfd
-I../../ld/../bfd -I../../ld/../include  -g -O2
-DLOCALEDIR="\"/usr/share/locale\""   -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -Werror -g -O2 -c eelf32_spu.c
eelf32_spu.c:460:55: error: missing terminating ' character
make[5]: *** [eelf32_spu.o] Error 1
make[5]: Leaving directory `/tmp/buildd/binutils-2.17cvs20070426/builddir-multi/ld'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/tmp/buildd/binutils-2.17cvs20070426/builddir-multi/ld'
make[3]: *** [all] Error 2


--- ./ld/emultempl/spuelf.em~   2007-07-02 17:56:40.000000000 +0200
+++ ./ld/emultempl/spuelf.em    2007-07-02 17:57:41.000000000 +0200
@@ -270,7 +270,7 @@
   const char *file = strrchr (path, '/');
 #ifdef HAVE_DOS_BASED_FILE_SYSTEM
   {
-    char *bslash = strrchr (path, '\\');
+    char *bslash = strrchr (path, '\\\\');

     if (file == NULL || (bslash != NULL && bslash > file))
       file = bslash;



More information about the Binutils mailing list