Hi Jim,
On 2016/4/7 2:39, Jim Wilson wrote:
On Wed, Apr 6, 2016 at 9:13 AM, Jim Wilson jim.wilson@linaro.org wrote:
gcc 5.x implements C++ 2011 by default. gcc 4.9.x implements C++ 2003 by default. There were some ABI changes required to implement C++ 2011. If the android loader has knowledge of the gcc C++ ABI, maybe it needs to be updated to understand the new C++ 2011 ABI. You could try forcing the old ABI to see if that solves the problem. https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
And/or try using the older language standard with -std=c++03 or -std=gnu++03 to see if maybe that helps.
I only got this partly right. In gcc-5.x, libstdc++ is using the new C++ 2011 ABI, but g++ is still defaulting to c++98. The new libstdc++ ABI has caused trouble for a few people, so it might be relevant.
I checked the cmdline which are same for gcc 4.9 and gc 5.3. It's like: -mandroid -fno-short-enums -fno-exceptions -Wno-psabi -DMOZ_ENABLE_JS_DUMP -include /opt/work/acadine/toolchain-update/B2G-v2.5/gonk-misc/Unicode.h -I/opt/work/acadine/toolchain-update/B2G-v2.5/external/libcxx/include -D_USING_LIBCXX -march=armv7-a -mthumb -mfpu=vfp -mfloat-abi=softfp -mno-unaligned-access -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pipe -DNDEBUG -DTRIMMED -g -freorder-blocks -Os -fno-reorder-functions -funwind-tables
And a bug for gcc was created to track this issue: https://bugs.linaro.org/show_bug.cgi?id=2169
Regards Yin, Fengwei
Jim