I've built a GCC cross-compiler for arm, and I can prove it works in both trivial cases (Hello World), and in more serious uses (I've successfully cross compiled several libraries, most recently libjpeg).
However, I'm trying to compile a particular file into an object file, which compiles fine using my x86 GCC, but yields the following error when cross compiled:
[greg@iLab3 Ice]$ overo-g++ -I/home/greg/ilab-includes -I/opt/IceE-1.2.0/include -c IceImageDecompressor.C
In file included from /opt/IceE-1.2.0/include/IceE/Proxy.h:25, from /home/greg/ilab-includes/Ice/ImageIce.h:22, from /home/greg/ilab-includes/Ice/IceImageDecompressor.H:8, from IceImageDecompressor.C:4: /opt/IceE-1.2.0/include/IceE/Outgoing.h:54: error: ISO C++ forbids declaration of ‘auto_ptr’ with no type /opt/IceE-1.2.0/include/IceE/Outgoing.h:54: error: invalid use of ‘::’ /opt/IceE-1.2.0/include/IceE/Outgoing.h:54: error: expected ‘;’ before ‘<’ token /opt/IceE-1.2.0/include/IceE/Outgoing.h:92: error: ISO C++ forbids declaration of ‘auto_ptr’ with no type /opt/IceE-1.2.0/include/IceE/Outgoing.h:92: error: invalid use of ‘::’ /opt/IceE-1.2.0/include/IceE/Outgoing.h:92: error: expected ‘;’ before ‘<’ token IceImageDecompressor.C: In function ‘boolean IIDC_NS::fill_input_buffer(jpeg_decompress_struct*)’: IceImageDecompressor.C:50: error: no matching function for call to ‘min(long unsigned int, unsigned int)’
Using the -M flag to get a list of all the files included by the compiler, I can see that the header is included when I fun this with x86 g++, and pulls in files for std::auto_ptr. When run on the cross compiler, this header is not included, and the error persists even when I add manually to the header files I've written myself.
If it makes a difference (I suspect this might be the problem), the x86 g++ on my machine is version 4.2.3 and its headers don't include anything referring to TR1 or C++0x, while the arm cross compiler is version 4.3.3 and its headers make reference to TR1 and C++0x and are thus laid out significantly differently.