[MIPS] Use NDK libs for ARM builds only

Signed-off-by: Chris Dearman <chris@mips.com>
Back-port NDK STLport template fix.

This is a back-port of NDK patch afba0d11e83793cb472bef0fafba207857875239

    Avoid instantiating the pointed-to type in _StorageType

    _StorageType<_Tp*> instantiates _Tp to perform argument dependent lookup of
    _UseVoidPtrStorageType. This is (a) unneeded, and (b) will result in a
    compilation failure if instantiation of _Tp references other fields of
    _StorageType<_Tp*> (which is incomplete at this time).

    This change references the function by its fully-qualified name, thus disabling
    argument dependent lookup.

    Upstream bug:
    https://sourceforge.net/tracker/index.php?func=detail&aid=3497008&group_id=146814&atid=766244

Change-Id: Ic097ad0e413d9f82cbcd5de4379f5a39e395501f
Merge "Back-port NDK STLport template fix."
am 12a79bbd: Merge "Back-port NDK STLport template fix."

* commit '12a79bbd8afb69b4221a541be1c8ad37e96e3330':
  Back-port NDK STLport template fix.
am ec42173e: Replaced one exit() call with abort()

* commit 'ec42173ef0955aa1844e0be303363c7e5dc98fb7':
  Replaced one exit() call with abort()
[MIPS] enable STL build for Android

Signed-off-by: Chris Dearman <chris@mips.com>

The conditional compilation of __Named_exception has been broken since
STLport release 5.1.0 in Nov 2005.  This class has been unconditionally
included for all non-Mips compilers on all platforms, which was not the
original intent.  Since then, changes elsewhere in _ios_base.h and _exception.h
have (unintentionally?) required __Named_exception in all uses, but this
went unnoticed until the Mips port of Android.

The current change has the same treatment of __Named_exception on all
platforms and compilers, including Mips Android gcc, and also the
SGI o32 Ugen compiler.  An identical (unexplained) change by Mips is
in the NDK copy of STLport.

The conditional compilation checks around definitions and use of
__Named_exception should someday be made identical, by the STLport designer.

The condition
   !(defined(_MIPS_SIM) && defined(_ABIO32) && (_MIPS_SIM == _ABIO32))
is not obvious.  This dates from v3.11 in July 1998 when this STL
library was only for SGI machines.  It was then a test of whether the
code was being compiled by Mips' original 32-bit-ABI Ugen compier,
or instead SGI's second-generation MIPSpro compiler.  The reason
for handling these compilers differently is not documented anywhere,
but was likely a workaround for some issue in one compiler.
These same flags are now defined by gcc compilers for Mips.

It is safe to now eliminate the ABIO32 check, because no active STLport
users have tried building with the Ugen compiler for many years
(otherwise they would have encountered build errors).

Change-Id: I38474a6b6616714fe3a611100adacf418cc3ae1d
Merge "[MIPS] enable STL build for Android"
am 2ee723b6: Merge "[MIPS] enable STL build for Android"

* commit '2ee723b69a4538f5b7c77bb95294e27655778633':
  [MIPS] enable STL build for Android
Merge "[MIPS] Use NDK libs for ARM builds only"
am fe81d3d7: Merge "[MIPS] Use NDK libs for ARM builds only"

* commit 'fe81d3d78891b3b5025a6ca24736cad8d5bf9f25':
  [MIPS] Use NDK libs for ARM builds only
Fix _STLP_USE_EXCEPTIONS

When _STLP_USE_EXCEPTIONS is not defined, omit all declarations
and uses of __Named_exception.  Compile and use __Named_exception
only when STLport is being allowed to use exceptions, but not the
host compiler's native version.

Change-Id: I71963ca15d535d3ae1717c5bb22fe5fa3add41cb
Merge "Fix _STLP_USE_EXCEPTIONS"
stlport: Force building PIC code

Required for gcc 4.7

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
stlport: Don't force use of the prebuilt compiler

Using the prebuilt compiler doesn't make sense and actually breaks
the build with gcc 4.7. (This should provide a little speedup on
4.6 builds as well)

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
stlport: Fix strict aliasing violations

This patch fixes strict aliasing violations.
Forward-ported from Chao Yang <chao.yang@linaro.org>'s
patch for 2.3.5.

Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
stlport: Fix incompatibility with clang++ (used by llvm) in ISO C++11 mode

clang++ has a strange idea about wchar_t

Change-Id: I9f73e88cc06c35e988b33576ea235046ea51d546
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>