Build fails with missing full declaration of __Named_exception, when compiled with gnu or llvm Mips compilers targeting the o32 ABI.
In _stdexcept_base.h and _stdexcept.h, the preprocessor symbols _MIPS_SIM and _ABIO32 are used to decide whether to override _STLP_USE_EXCEPTIONS and generate except-support code anyway. This check dates from when STLport was an SGI-only project, where it gave special treatment to certain SGI compilers and libraries. This check now interferes with using modern Mips compilers, which should not get special treatment here.
The combined check of _STLP_USE_EXCEPTIONS and the Mips compiler check was also coded incorrectly as an || rather than as the intended &&. The result was that _STLP_USE_EXCEPTIONS was ignored here, with the following code being unconditionally included for all non-Mips compilers.
This build failure happens when doing Mips 32-bit builds for Android, so that _STLP_USE_EXCEPTIONS is false.
Suggested patch
The attached patch is my suggested fix for both the Android build failure affecting Mips builds only, and the mismatched conditionals around the definitions and uses of __Named_exception (harmlessly including unused exception code in all Android builds).
The related patch to 5.2.1 STLport as used in Android is at
https://android-review.googlesource.com/#/c/38940/