GDB-6.5 (beginning with 6.3 IIRC) does not build for SuperH targets unless --target=sh-linux (or sh-linux-elf, ..) is passed to the configure script. A 'crossdev -t sh4 --ex-only --ex-gdb' build fails wtith the following error: i686-pc-linux-gnu-ar: creating libgdb.a i686-pc-linux-gnu-ranlib libgdb.a make[2]: *** No rule to make target `../sim/sh/libsim.a', needed by `gdb'. Stop. make[2]: Leaving directory `/var/tmp/portage/gdb-6.5-r2/work/gdb-6.5/gdb' make[1]: *** [all-gdb] Error 2 make[1]: Leaving directory `/var/tmp/portage/gdb-6.5-r2/work/gdb-6.5' make: *** [all] Error 2 A simple fix is to edit sim/configure.ac and replace sh-*-*) with sh*-*), rerun autoconf and start the top configure script.
Created attachment 99406 [details, diff] fix sh detection in gdb's sim/ directory The patch to fix shX detection. Works with sh-linux-elf, sh-linux sh4-unknown-linux-gnu variants.
added to gdb-6.6-r1, thanks for the fix