diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-08-16 21:04:10 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-08-16 21:05:14 +0300 |
commit | 8b5cf7fb57c0f68ee312d7f7b404533807349318 (patch) | |
tree | 225332a33d0ae93aaf57dc0c2fcaa273012a49ab /bridges | |
parent | 2eb39893df0fa008da0f863caa65d8aea7eb107b (diff) |
For kicks, enable cross-building for Android on MIPS
Change-Id: I6fa2b9a50c525fb2d8666a144409eb9a3ad2698a
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx | 19 | ||||
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk | 2 |
2 files changed, 18 insertions, 3 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx index e62c779bbb4b..0e94144c0ef3 100644 --- a/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx @@ -51,7 +51,14 @@ using namespace ::std; using namespace ::osl; using namespace ::rtl; #endif + +#ifndef ANDROID #include <sys/sysmips.h> +#endif + +#ifdef ANDROID +#include <unistd.h> +#endif #ifdef OSL_BIGENDIAN #define IS_BIG_ENDIAN 1 @@ -619,7 +626,9 @@ namespace case typelib_TypeClass_DOUBLE: { register double dret asm("$f0"); - dret = (*((double*)nRegReturn)); } + dret = (*((double*)nRegReturn)); + (void) dret; + } break; case typelib_TypeClass_HYPER: @@ -710,9 +719,15 @@ namespace } -void bridges::cpp_uno::shared::VtableFactory::flushCode(unsigned char const * /*bptr*/, unsigned char const * /*eptr*/) +void bridges::cpp_uno::shared::VtableFactory::flushCode(unsigned char const *bptr, unsigned char const *eptr) { +#ifndef ANDROID + (void) bptr; + (void) eptr; sysmips(FLUSH_CACHE,0,0,0); +#else + cacheflush((long) bptr, (long) eptr, 0); +#endif } struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; }; diff --git a/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk index ddb481781437..3c6ab816ee09 100644 --- a/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk +++ b/bridges/source/cpp_uno/gcc3_linux_mips/makefile.mk @@ -37,7 +37,7 @@ ENABLE_EXCEPTIONS=TRUE # --- Files -------------------------------------------------------- -.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXM" +.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXM" || "$(COM)$(OS)$(CPU)" == "GCCANDROIDM" # In case someone enabled the non-standard -fomit-frame-pointer which does not # work with the .cxx sources in this directory: |