[Converted from Gnats 2533] Canadian cross build of build gdb-6.8 for build=x86_64-linux host=i586-mingw32 target=powerpc-linux, is broken. It was reported first time back in 14 Jul 2007: http://sourceware.org/ml/gdb/2007-07/msg00123.html The problem is that config.h is generated for $(CC), which for the above mentioned canadian cross is my 586-mingw32-gcc, and included in a number of .c and .h files i sim/ppc, ending up in both $(CC) and $(CC_FOR_BUILD) builds. To fix this, I have added #ifdef HAVE_CONFIG_H in all places and patched the Makefile.in to define HAVE_CONFIG_H for all $(CC) build. Release: unknown Environment: Build machine: Linux dore-server 2.6.24-19-server #1 SMP Wed Aug 20 18:43:06 UTC 2008 x86_64 GNU/Linux Native gcc: Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) Cross gcc: Reading specs from /home/eha/src/gallega/oe/tmp/cross/lib/gcc/i586-mingw32/3.4.5/specs Configured with: /home/eha/src/gallega/oe/tmp/work/i586-mingw32/mingw-gcc-canadian-cross-3.4.5-20060117-2-r1/gcc-3.4.5-20060117-2/configure --build=x86_64-linux --host=x86_64-linux --target=i586-mingw32 --prefix=/home/eha/src/gallega/oe/tmp/cross --exec_prefix=/home/eha/src/gallega/oe/tmp/cross --bindir=/home/eha/src/gallega/oe/tmp/cross/bin --sbindir=/home/eha/src/gallega/oe/tmp/cross/bin --libexecdir=/home/eha/src/gallega/oe/tmp/cross/libexec --datadir=/home/eha/src/gallega/oe/tmp/cross/share --sysconfdir=/home/eha/src/gallega/oe/tmp/cross/etc --sharedstatedir=/home/eha/src/gallega/oe/tmp/cross/com --localstatedir=/home/eha/src/gallega/oe/tmp/cross/var --libdir=/home/eha/src/gallega/oe/tmp/cross/lib --includedir=/home/eha/src/gallega/oe/tmp/cross/include --oldincludedir=/home/eha/src/gallega/oe/tmp/cross/include --infodir=/home/eha/src/gallega/oe/tmp/cross/share/info --mandir=/home/eha/src/gallega/oe/tmp/cross/share/man --enable-mainainer-mode --disable-maintainer-mode --disable-bootstrap --enable-target-optspace --enable-languages=c,c++ --enable-threads --enable-c99 --enable-long-long --disable-win32-registry --without-x --disable-shared --program-prefix=i586-mingw32- --with-local-prefix=/home/eha/src/gallega/oe/tmp/staging/i586-mingw32 --with-gxx-include-dir=/home/eha/src/gallega/oe/tmp/staging/i586-mingw32/include/c++ Thread model: win32 gcc version 3.4.5 (mingw-vista special r2) $ /home/eha/oe/tmp/work/i586-mingw32-sdk-ppc603e-linux/gdb-canadian-sdk-6.8-r0/gdb-6.8/configure --build=x86_64-linux --host=i586-mingw32 --target=powerpc-linux --prefix=/OpenEmbedded/powerpc --exec_prefix=/OpenEmbedded/powerpc --bindir=/OpenEmbedded/powerpc/bin --sbindir=/OpenEmbedded/powerpc/bin --libexecdir=/OpenEmbedded/powerpc/libexec --datadir=/OpenEmbedded/powerpc/share --sysconfdir=/OpenEmbedded/powerpc/etc --sharedstatedir=/OpenEmbedded/powerpc/share/com --localstatedir=/OpenEmbedded/powerpc/var --libdir=/OpenEmbedded/powerpc/lib --includedir=/OpenEmbedded/powerpc/include --oldincludedir=/OpenEmbedded/powerpc/include --infodir=/OpenEmbedded/powerpc/share/info --mandir=/OpenEmbedded/powerpc/share/man --enable-mainainer-mode --with-curses --with-readline --enable-sim-hostendian=little --program-prefix=powerpc-linux- --with-sysroot=/OpenEmbedded/powerpc/powerpc-linux
Fix: See attached patch.
i've made a lot of changes in the build system, and i think this is fixed now. at least, my setup is working: build=x86_64-linux host=i686-w64-mingw32 target=ppc-elf