I downloaded GDB source code and ned to compile for PowerPC platform, I have all powerpc compilers (ppc_85xx-gcc, ppc_85xx-ar) under /opt/montavista/pro/devkit/ppc/85xx/bin, it built "gdb" file, but it did for INTEL platform using gcc, I configured using below commnd, then issues "make to compile, but it didn't built for target processor, any idea? I can see it compiling C code with "gcc"
# ./configure -target=powerpc-linux -prefix=/opt/montavista/pro/devkit/ppc/85xx/bin
# make
# file gdb/gdb
gdb/gdb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
linux:~/sandbox/gdb-7.0.1
#
gcc -c -g -O2 -DDEFAULT_INLINE=PSIM_INLINE_LOCALS -DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN -DWITH_SMP=5 -DHAVE_TERMIOS_STRUCTURE -DHAVE_TERMIOS_CLINE -DHAVE_DEVZERO -I. -I. -I./../../include -I../../bfd -I./../../bfd -I../../gdb -I./../../gdb -I./../../gdb/config -DHAVE_COMMON_FPU -I../common -I./../common version.c