[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"
Revert "Fix _STLP_USE_EXCEPTIONS"

This reverts commit 013fff3524b2798e9d45aefcc13236021da234db.
Revert "Fix _STLP_USE_EXCEPTIONS"

This reverts commit 013fff3524b2798e9d45aefcc13236021da234db.
Merge "Revert "Fix _STLP_USE_EXCEPTIONS""
Adopt the new prebuilts/ndk/<number> paths.

Bug: 6932421
Change-Id: I42b62b521222991b372610b26a54ebf6c34bf714
Revert "Unbundle libstlport with NDK r4."

This reverts commit f581c1eaf398e25de8ecae69c46c698604b288f0.
Now unbundled native code should instead use:
LOCAL_NDK_STL_VARIANT := stlport_static
which is the NDK prebuilt version of stlport.

Change-Id: Ib890a8580dedb1f5e89d2889859cc0f0854340d4
Bug: 6932421
Merge remote-tracking branch 'aosp/jb-mr1-release' into HEAD

Conflicts:
	Android.mk

Change-Id: Ibfc81ef9107fbf39563921a9f7334d7b79faefe6