I have Ubuntu 12.01 with gcc 4.8.2 and would like to cross compile for the Vortex86DX CPU running an old 2.6.23 kernel.
I´m trying the following testing code:
<I think the problem is the order of the command switches, i.e. the linker first discovers the dependencies (libgcc, libstdc++) and only then resolves them. If you give it -static-libgcc before it found the dependency then it will simply ignore it.
the following works for me:
$ g++ -m32 -march=i586 test.cpp -o test586 -static -static-libgcc -static-libstdc++
$ ./test586
Hello world
$ ldd test586
not a dynamic executable