Menu

#257 Build fails for 32-bit Mips compilers

5.2
open
nobody
5
2012-07-09
2012-07-09
Duane Sand
No

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.

Discussion

  • Duane Sand

    Duane Sand - 2012-07-09

    This build failure happens when doing Mips 32-bit builds for Android, so that _STLP_USE_EXCEPTIONS is false.

     
  • Duane Sand

    Duane Sand - 2012-07-09

    Suggested patch

     
  • Duane Sand

    Duane Sand - 2012-07-09

    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).

     
  • Duane Sand

    Duane Sand - 2012-07-09

    The related patch to 5.2.1 STLport as used in Android is at

    https://android-review.googlesource.com/#/c/38940/

     

Log in to post a comment.