Hi,
On 05/20/2010 02:20 PM, Dmitry Moskalchuk wrote:
At least, top-posting time is over :-)
>> About non-standard 3rd party STL, this is quite ok for me. For
>> instance, the
>> STLPort mentioned by Andrej seems not to need RTTI and exceptions,
>> which is ok
>> for me, especially if it works with the official NDK.
>
> Yes, I know, STLport on Android does not need exceptions. But that mean
> it is not fully standard compatible. There is just no way to get fully
> standard STL implementations without exceptions. I just looked how they
> work around this in STLport - actually is not very good. They just abort
> whole application in case if exception need to be thrown. Application
> will crash and you could not even catch it.
That's not a problem to me, because I can make sure that my code runs fine on
x86, with standard Linux gcc and libstdc++. This way I can squash bugs with gdb,
leaks with valgrind, etc.... Then I compile with the NDK. I am actually already
doing this in C with great success. That's very productive.
But for this method to be more real-world-like, the best would be to compile
with Bionic x86 instead of the GNU libc on my Linux machine. That would be very
cool. Is this feasible?
>> But if your NDK is working great, why aren't RTTI and exceptions
>> enabled in the
>> official NDK?
>>
>> Is it a licensing issue?
>
> Well, this is a question to Android team. As David Turner said, it was
> done due to historical reasons, meaning that GCC generate bad code for
> exceptions when Android project has started. Now GCC has one of the best
> C++ implementation but they are not yet ready to include this to the
> mainstream. Nevertheless, some time ago David promised full C++ will be
> included to the one of the future NDK releases and, citation, "result is
> likely to be very similar to Dmitry's patches"
> (
http://groups.google.com/group/android-ndk/msg/070787784e399ea6).
Great pointer thanks. This is the other point I was worried about: "the GNU
libstdc++ is really *huge* when linked statically". If I understand correctly,
even when it's included mainstream it won't be possible to use it as a shared
library, for backward compatibility...
Then this uSTL mentioned by David looks very interesting, and it's even MIT
licensed. Maybe that I could hack that one to disable exceptions.
Anyway, your work look really good Dmitry and I might take a deeper look at your
NDK in the future. Thanks for all these informations.