View Single Post
Posts: 14 | Thanked: 36 times | Joined on Dec 2009 @ Adelaide, Australia
#1
I've recently dusted off my N800 which had been sitting idle for several years. I want to write a new program for it, but having recently learned C++11, I don't want to have to work with the older C++ standard if I can avoid it.

So I've packaged up a GCC 4.9 (and modern binutils) cross compiler toolchain.

If anyone else is interested in this, you can grab the diablo-gcc-4.9 package from http://www.users.on.net/~toojays/mae...opment/wheezy/. It's compiled for Debian 7 / amd64, so should work on Ubuntu systems as well. The source package is there as well, so can be easily rebuilt for other Debian-based systems if needed.

More details (copied from the README.Debian which is installed by the package):

This package contains updated C and C++ cross-compilers for Maemo 4.1
(Diablo). These install under /opt/diablo-gcc-4.9. They are configured for
maximum compatibility with the original Diablo toolchain.

The intent is that binaries produced using this toolchain can be installed on a
Diablo system with no additional dependencies. This is largely achieved by
replacing libgcc_s.so and libstdc++.so with linker scripts which cause the
desired symbols to be looked for first in the original (i.e. GCC 3.4) versions
of those libraries. If the desired symbols are not found there, they are linked
statically.

The debug version of libstdc++.so does not use the same linker script trick,
since it seemed like that would be more confusing than useful. If you want to
link against this library, add "-L
/opt/diablo-gcc-4.9/arm-none-linux-gnueabi/lib/debug/" to your g++ link command
line, and ensure that library is accessible when running the compiled program.

There are some ABI compatibility corner cases (see
<http://gcc.gnu.org/wiki/Cxx11AbiCompatibility>) to be aware of if mixing
objects compiled for C++11 and C++98, but most things should just work. I was
able to build a simple gtkmm application using C++11, and run it against the
gtkmm libraries from diablo extras with no problem.
 

The Following 8 Users Say Thank You to toojays For This Useful Post: