bridges/test/java_uno/acquire/makefile.mk | 2 bridges/test/java_uno/equals/makefile.mk | 2 bridges/test/java_uno/nativethreadpool/makefile.mk | 4 - configmgr/prj/d.lst | 6 - configmgr/source/makefile.mk | 2 cppcanvas/source/uno/makefile.mk | 2 cppuhelper/qa/propertysetmixin/makefile.mk | 2 cppuhelper/source/shlib.cxx | 9 ++ cppunit/android.patch | 18 +++++ io/source/TextInputStream/makefile.mk | 2 io/source/TextOutputStream/makefile.mk | 2 io/source/acceptor/makefile.mk | 2 io/source/connector/makefile.mk | 2 io/source/stm/makefile.mk | 2 pyuno/source/loader/makefile.mk | 2 remotebridges/source/unourl_resolver/makefile.mk | 2 sal/osl/android/Makefile | 58 +++++++++++++--- sal/osl/android/jni/lo-bootstrap.c | 75 ++++++++++++++------- sal/osl/android/jni/lo-bootstrap.h | 5 + sal/osl/unx/module.c | 12 +++ sal/osl/unx/process_impl.cxx | 8 ++ sdext/source/pdfimport/makefile.mk | 2 sdext/source/presenter/makefile.mk | 2 solenv/inc/unxandr.mk | 4 + stoc/source/corereflection/makefile.mk | 2 stoc/source/inspect/makefile.mk | 2 stoc/source/invocation/makefile.mk | 2 stoc/source/invocation_adapterfactory/makefile.mk | 2 stoc/source/javaloader/makefile.mk | 2 stoc/source/javavm/makefile.mk | 2 stoc/source/namingservice/makefile.mk | 2 stoc/source/proxy_factory/makefile.mk | 2 stoc/test/registry_tdprovider/makefile.mk | 2 stoc/test/tdmanager/makefile.mk | 2 stoc/util/makefile.mk | 4 - testtools/source/bridgetest/cli/makefile.mk | 2 testtools/source/bridgetest/makefile.mk | 6 - testtools/source/performance/makefile.mk | 4 - ucb/source/ucp/expand/makefile.mk | 2 ucb/source/ucp/ext/makefile.mk | 2 ucb/source/ucp/tdoc/makefile.mk | 2 41 files changed, 193 insertions(+), 76 deletions(-)
New commits: commit 480a380a7284d5d59f39aad15fd1a299ba704a2f Author: Tor Lillqvist <tlillqv...@suse.com> Date: Thu Nov 17 15:16:30 2011 +0200 Look for libboostrap.uno.so and not bootstrap.uno.so on Android Not sure if we need to be more generic here, and always add a "lib" prefix if not present. Or do the changes to the makefilery take care of it, so that for other UNO components than bootstrap, the name as stored wherever it is stored does contain the "lib" prefix we are forces to use on Android? diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx index 9414e34..8bce73d 100644 --- a/cppuhelper/source/shlib.cxx +++ b/cppuhelper/source/shlib.cxx @@ -464,7 +464,14 @@ Reference< XInterface > SAL_CALL loadSharedLibComponentFactory( SAL_THROW( (loader::CannotActivateFactoryException) ) { #ifndef IOS - OUString aModulePath( makeComponentPath( rLibName, rPath ) ); + OUString sLibName(rLibName); + +#ifdef ANDROID + if ( rLibName.equals( OUSTR("bootstrap.uno" SAL_DLLEXTENSION) ) ) + sLibName = OUSTR("libbootstrap.uno" SAL_DLLEXTENSION); +#endif + + OUString aModulePath( makeComponentPath( sLibName, rPath ) ); if (! checkAccessPath( &aModulePath )) { throw loader::CannotActivateFactoryException( commit f95c3e0ee255ecb56879c3c8ae7ba185fae861ab Author: Tor Lillqvist <tlillqv...@suse.com> Date: Thu Nov 17 15:16:10 2011 +0200 Look for lo_main() and not main() on Android diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index 003e136..b795bbc 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -130,8 +130,16 @@ oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl ( { oslProcessError result = osl_Process_E_NotFound; +#ifdef ANDROID + /* On Android we want the address of the "lo_main()" function, as + * that is what corresponds to "main()" in LibreOffice programs on + * normal desktop OSes. + */ + void * addr = dlsym (RTLD_DEFAULT, "lo_main"); +#else /* Determine address of "main()" function. */ void * addr = dlsym (RTLD_DEFAULT, "main"); +#endif if (addr != 0) { /* Determine module URL. */ commit 21c0c69ddf128f748bd2c294cb1a348a797bb70f Author: Tor Lillqvist <tlillqv...@suse.com> Date: Thu Nov 17 15:15:14 2011 +0200 Use lo_dladdr() on Android diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c index 824a629..b79dfbc 100644 --- a/sal/osl/unx/module.c +++ b/sal/osl/unx/module.c @@ -95,9 +95,19 @@ static sal_Bool getModulePathFromAddress(void * address, rtl_String ** path) { #else Dl_info dl_info; - if ((result = dladdr(address, &dl_info)) != 0) +#ifdef ANDROID + int (*lo_dladdr)(void *, Dl_info *) = dlsym(RTLD_DEFAULT, "lo_dladdr"); + result = (*lo_dladdr)(address, &dl_info); +#else + result = dladdr(address, &dl_info) +#endif + + if (result != 0) { rtl_string_newFromStr(path, dl_info.dli_fname); +#ifdef ANDROID + free((void *) dl_info.dli_fname); +#endif result = sal_True; } else commit 232ad7dac680a654217ff38bea86791bba250ee4 Author: Tor Lillqvist <tlillqv...@suse.com> Date: Thu Nov 17 15:04:28 2011 +0200 Add more libraries diff --git a/sal/osl/android/Makefile b/sal/osl/android/Makefile index 510580a..ac28f1b 100644 --- a/sal/osl/android/Makefile +++ b/sal/osl/android/Makefile @@ -31,11 +31,14 @@ all: # # Then libs and UNO components that the tests from other modules need. # - -for F in libuno_cppu \ - libuno_salhelpergcc3 \ - libuno_cppuhelpergcc3 \ - libbootstrap.uno; do \ - test -f $(OUTDIR)/lib/$${F}.so && cp $(OUTDIR)/lib/$${F}.so $(SODEST); \ + -for F in uno_cppu \ + uno_salhelpergcc3 \ + uno_cppuhelpergcc3 \ + reg \ + store \ + xmlreader \ + bootstrap.uno; do \ + test -f $(OUTDIR)/lib/lib$${F}.so && cp $(OUTDIR)/lib/lib$${F}.so $(SODEST); \ done # # Then the shared GNU C++ library commit 4b49b7305852a1c21b131203ecfcfde3b9ee32f1 Author: Tor Lillqvist <tlillqv...@suse.com> Date: Thu Nov 17 14:03:59 2011 +0200 Add lo_dladdr(), a wrapper for Android's dladdr() Android's dladdr() stores just the basename of a shared object in Dl_info::dli_fname. LibreOffice expects either a complete absolute pathname or a relative path from the current directory to be returned there. So look up the full pathname of the library from /proc/self/maps. Also remove the fallback message loop after lo_main() returns, instead just exit. diff --git a/sal/osl/android/jni/lo-bootstrap.c b/sal/osl/android/jni/lo-bootstrap.c index c5e1905..04540a9 100644 --- a/sal/osl/android/jni/lo-bootstrap.c +++ b/sal/osl/android/jni/lo-bootstrap.c @@ -29,6 +29,7 @@ #include <string.h> #include <stdlib.h> +#include <stdio.h> #include <sys/stat.h> #include <unistd.h> @@ -562,6 +563,53 @@ lo_dlsym(void *handle, } int +lo_dladdr(void *addr, + Dl_info *info) +{ + FILE *maps; + char line[200]; + int result; + + result = dladdr(addr, info); + if (result != 0) + LOGI("dladdr(%p) = { %s:%p, %s:%p ]", + addr, + info->dli_fname, info->dli_fbase, + info->dli_sname ? info->dli_sname : "(none)", info->dli_saddr); + else { + LOGI("dladdr(%p) = 0", addr); + return 0; + } + + maps = fopen("/proc/self/maps", "r"); + if (maps == NULL) { + LOGI("lo_dladdr: Could not open /proc/self/maps: %s", strerror(errno)); + return 0; + } + while (fgets(line, sizeof(line), maps) != NULL && + line[strlen(line)-1] == '\n') { + void *lo, *hi; + char file[sizeof(line)]; + file[0] = '\0'; + if (sscanf(line, "%x-%x %*s %*x %*x:%*x %*d %[^\n]", &lo, &hi, file) == 3) { + /* LOGI("got %p-%p: %s", lo, hi, file); */ + if (addr >= lo && addr < hi) { + if (info->dli_fbase != lo) { + LOGI("lo_dladdr: Base for %s in /proc/self/maps %p doesn't match what dladdr() said", file, lo); + fclose(maps); + return 0; + } + info->dli_fname = strdup(file); + break; + } + } + } + fclose(maps); + + return result; +} + +int lo_dlcall_argc_argv(void *function, int argc, const char **argv) @@ -584,27 +632,7 @@ void android_main(struct android_app* state) lo_main(lo_main_argc, lo_main_argv); - while (1) { - // Read all pending events. - int ident; - int events; - struct android_poll_source* source; - - while ((ident=ALooper_pollAll(-1, NULL, &events, - (void**)&source)) >= 0) { - LOGI("got an event ident=%d", ident); - - // Process this event. - if (source != NULL) { - source->process(state, source); - } - - // Check if we are exiting. - if (state->destroyRequested != 0) { - return; - } - } - } + exit(0); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sal/osl/android/jni/lo-bootstrap.h b/sal/osl/android/jni/lo-bootstrap.h index a46094c..523ba99 100644 --- a/sal/osl/android/jni/lo-bootstrap.h +++ b/sal/osl/android/jni/lo-bootstrap.h @@ -29,6 +29,8 @@ #if defined(ANDROID) +#include <dlfcn.h> + char **lo_dlneeds(const char *library); void *lo_dlopen(const char *library); @@ -37,6 +39,9 @@ void *lo_dlopen(const char *library); void *lo_dlsym(void *handle, const char *symbol); +int lo_dladdr(void *addr, + Dl_info *info); + int lo_dlcall_argc_argv(void *function, int argc, const char **argv); commit 9c6c39b62de5bab6d20c65a6040c74fbe943ce04 Author: Tor Lillqvist <tlillqv...@suse.com> Date: Thu Nov 17 14:02:45 2011 +0200 Include also the boostrap UNO component diff --git a/sal/osl/android/Makefile b/sal/osl/android/Makefile index 1fb7aa1..510580a 100644 --- a/sal/osl/android/Makefile +++ b/sal/osl/android/Makefile @@ -29,9 +29,12 @@ all: test -f $(WORKDIR)/LinkTarget/CppunitTest/libtest_$${F}.so && cp $(WORKDIR)/LinkTarget/CppunitTest/libtest_$${F}.so $(SODEST); \ done # -# Then libs that the tests from other modules need. +# Then libs and UNO components that the tests from other modules need. # - -for F in libuno_cppu libuno_salhelpergcc3 libuno_cppuhelpergcc3; do \ + -for F in libuno_cppu \ + libuno_salhelpergcc3 \ + libuno_cppuhelpergcc3 \ + libbootstrap.uno; do \ test -f $(OUTDIR)/lib/$${F}.so && cp $(OUTDIR)/lib/$${F}.so $(SODEST); \ done # commit 469c9ac2f9da6743e2e6944895c577df490abda5 Author: Tor Lillqvist <tlillqv...@suse.com> Date: Wed Nov 16 22:18:23 2011 +0200 Enforce a "lib" prefix for UNO components for Android This commit for the old build system. (Don't bother for components not relevant for Android.) The Android package installer (as invoked through "adb install", from "ant debug install") silently ignores native libraries in app packages (.apk files) whose names don't start with "lib" and end with ".so". The package builder (as invoked through "ant debug") in the SDK gladly includes also thusly named native libraries in the .apk, though. Yay for consistency. diff --git a/bridges/test/java_uno/acquire/makefile.mk b/bridges/test/java_uno/acquire/makefile.mk index def12dd..bdcf6d1 100644 --- a/bridges/test/java_uno/acquire/makefile.mk +++ b/bridges/test/java_uno/acquire/makefile.mk @@ -40,7 +40,7 @@ INCPRE += $(MISC)$/$(TARGET)$/inc SLOFILES = $(SLO)$/testacquire.obj -SHL1TARGET = testacquire.uno +SHL1TARGET = $(ENFORCEDSHLPREFIX)testacquire.uno SHL1OBJS = $(SLOFILES) SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) SHL1VERSIONMAP = $(SOLARENV)/src/component.map diff --git a/bridges/test/java_uno/equals/makefile.mk b/bridges/test/java_uno/equals/makefile.mk index 9ac266f..1da99e4 100644 --- a/bridges/test/java_uno/equals/makefile.mk +++ b/bridges/test/java_uno/equals/makefile.mk @@ -47,7 +47,7 @@ INCPRE += $(MISC)$/$(TARGET)$/inc SLOFILES = $(SLO)$/testequals.obj -SHL1TARGET = testequals.uno +SHL1TARGET = $(ENFORCEDSHLPREFIX)testequals.uno SHL1OBJS = $(SLOFILES) SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) SHL1VERSIONMAP = $(SOLARENV)/src/component.map diff --git a/bridges/test/java_uno/nativethreadpool/makefile.mk b/bridges/test/java_uno/nativethreadpool/makefile.mk index d4926e0..6e481b1 100644 --- a/bridges/test/java_uno/nativethreadpool/makefile.mk +++ b/bridges/test/java_uno/nativethreadpool/makefile.mk @@ -45,13 +45,13 @@ ERROR -- missing platform DLLPRE = # no leading "lib" on .so files INCPRE += $(MISC)$/$(TARGET)$/inc -SHL1TARGET = $(TARGET)_client.uno +SHL1TARGET = $(ENFORCEDSHLPREFIX)$(TARGET)_client.uno SHL1OBJS = $(SLO)$/testnativethreadpoolclient.obj SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(TARGET)_client -SHL2TARGET = $(TARGET)_server.uno +SHL2TARGET = $(ENFORCEDSHLPREFIX)$(TARGET)_server.uno SHL2OBJS = $(SLO)$/testnativethreadpoolserver.obj SHL2STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) SHL2VERSIONMAP = version.map diff --git a/configmgr/prj/d.lst b/configmgr/prj/d.lst index e2eac0f..eb33e57 100644 --- a/configmgr/prj/d.lst +++ b/configmgr/prj/d.lst @@ -1,4 +1,4 @@ -..\%__SRC%\bin\configmgr.uno.dll %_DEST%\bin\configmgr.uno.dll -..\%__SRC%\lib\configmgr.uno.dylib %_DEST%\lib\configmgr.uno.dylib -..\%__SRC%\lib\configmgr.uno.so %_DEST%\lib\configmgr.uno.so +..\%__SRC%\bin\*.uno.dll %_DEST%\bin\*.uno.dll +..\%__SRC%\lib\*.uno.dylib %_DEST%\lib\*.uno.dylib +..\%__SRC%\lib\*.uno.so %_DEST%\lib\*.uno.so ..\%__SRC%\misc\configmgr.component %_DEST%\xml\configmgr.component diff --git a/configmgr/source/makefile.mk b/configmgr/source/makefile.mk old mode 100755 new mode 100644 index 94747d9..e75af0d --- a/configmgr/source/makefile.mk +++ b/configmgr/source/makefile.mk @@ -76,7 +76,7 @@ SHL1STDLIBS = \ $(SALHELPERLIB) \ $(SALLIB) \ $(XMLREADERLIB) -SHL1TARGET = configmgr.uno +SHL1TARGET = $(ENFORCEDSHLPREFIX)configmgr.uno SHL1USE_EXPORTS = name DEF1NAME = $(SHL1TARGET) diff --git a/cppcanvas/source/uno/makefile.mk b/cppcanvas/source/uno/makefile.mk index 5e06f4f..589728c 100644 --- a/cppcanvas/source/uno/makefile.mk +++ b/cppcanvas/source/uno/makefile.mk @@ -44,7 +44,7 @@ CDEFS+= -DVERBOSE SLOFILES = $(SLO)$/uno_mtfrenderer.obj -SHL1TARGET=$(TARGET).uno +SHL1TARGET=$(ENFORCEDSHLPREFIX)$(TARGET).uno SHL1STDLIBS= $(SALLIB) $(CPPULIB) $(CPPUHELPERLIB) $(COMPHELPERLIB) $(CPPCANVASLIB) $(BASEGFXLIB) diff --git a/cppuhelper/qa/propertysetmixin/makefile.mk b/cppuhelper/qa/propertysetmixin/makefile.mk index 02bb629..7290ec4 100644 --- a/cppuhelper/qa/propertysetmixin/makefile.mk +++ b/cppuhelper/qa/propertysetmixin/makefile.mk @@ -60,7 +60,7 @@ SHL1IMPLIB = i$(SHL1TARGET) SHL1RPATH = NONE DEF1NAME = $(SHL1TARGET) -SHL2TARGET = $(TARGET).uno +SHL2TARGET = $(ENFORCEDSHLPREFIX)$(TARGET).uno SHL2OBJS = $(SLO)/comp_propertysetmixin.obj SHL2USE_EXPORTS = name SHL2STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) diff --git a/io/source/TextInputStream/makefile.mk b/io/source/TextInputStream/makefile.mk index ea476c5..3c7ed2b 100644 --- a/io/source/TextInputStream/makefile.mk +++ b/io/source/TextInputStream/makefile.mk @@ -28,7 +28,7 @@ PRJ=..$/.. PRJNAME=io -TARGET = textinstream.uno +TARGET = $(ENFORCEDSHLPREFIX)textinstream.uno ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- diff --git a/io/source/TextOutputStream/makefile.mk b/io/source/TextOutputStream/makefile.mk index 2c9d4eb..37c913c 100644 --- a/io/source/TextOutputStream/makefile.mk +++ b/io/source/TextOutputStream/makefile.mk @@ -28,7 +28,7 @@ PRJ=..$/.. PRJNAME=io -TARGET = textoutstream.uno +TARGET = $(ENFORCEDSHLPREFIX)textoutstream.uno ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- diff --git a/io/source/acceptor/makefile.mk b/io/source/acceptor/makefile.mk index bbc7ac6..cfa6f5f 100644 --- a/io/source/acceptor/makefile.mk +++ b/io/source/acceptor/makefile.mk @@ -28,7 +28,7 @@ PRJ=..$/.. PRJNAME=io -TARGET = acceptor.uno +TARGET = $(ENFORCEDSHLPREFIX)acceptor.uno ENABLE_EXCEPTIONS=TRUE NO_BSYMBOLIC=TRUE COMP1TYPELIST = acceptor diff --git a/io/source/connector/makefile.mk b/io/source/connector/makefile.mk index e3a67ab..dbd0ff2 100644 --- a/io/source/connector/makefile.mk +++ b/io/source/connector/makefile.mk @@ -28,7 +28,7 @@ PRJ=..$/.. PRJNAME=io -TARGET = connector.uno +TARGET = $(ENFORCEDSHLPREFIX)connector.uno ENABLE_EXCEPTIONS=TRUE NO_BSYMBOLIC=TRUE COMP1TYPELIST = connectr diff --git a/io/source/stm/makefile.mk b/io/source/stm/makefile.mk index 52dd0c4..5a6c78a 100644 --- a/io/source/stm/makefile.mk +++ b/io/source/stm/makefile.mk @@ -27,7 +27,7 @@ PRJ=..$/.. PRJNAME=io -TARGET = streams.uno +TARGET = $(ENFORCEDSHLPREFIX)streams.uno ENABLE_EXCEPTIONS=TRUE NO_BSYMBOLIC=TRUE diff --git a/pyuno/source/loader/makefile.mk b/pyuno/source/loader/makefile.mk index 4c779cc..1760a88 100644 --- a/pyuno/source/loader/makefile.mk +++ b/pyuno/source/loader/makefile.mk @@ -27,7 +27,7 @@ PRJ=../.. PRJNAME=pyuno -TARGET=pythonloader.uno +TARGET=$(ENFORCEDSHLPREFIX)pythonloader.uno ENABLE_EXCEPTIONS=TRUE # --- Settings ----------------------------------------------------- diff --git a/remotebridges/source/unourl_resolver/makefile.mk b/remotebridges/source/unourl_resolver/makefile.mk index edf5aa7..8e7e8f7 100644 --- a/remotebridges/source/unourl_resolver/makefile.mk +++ b/remotebridges/source/unourl_resolver/makefile.mk @@ -27,7 +27,7 @@ PRJ=..$/.. PRJNAME=remotebridges -TARGET = uuresolver.uno +TARGET = $(ENFORCEDSHLPREFIX)uuresolver.uno ENABLE_EXCEPTIONS=TRUE COMP1TYPELIST = uuresolver diff --git a/sdext/source/pdfimport/makefile.mk b/sdext/source/pdfimport/makefile.mk index 64fc1af..9262ef6 100644 --- a/sdext/source/pdfimport/makefile.mk +++ b/sdext/source/pdfimport/makefile.mk @@ -58,7 +58,7 @@ SLOFILES=\ $(SLO)$/services.obj SHL1DLLPRE= -SHL1TARGET=$(TARGET).uno +SHL1TARGET=$(ENFORCEDSHLPREFIX)$(TARGET).uno SHL1LIBS=\ $(SLB)$/pdfmisc.lib \ diff --git a/sdext/source/presenter/makefile.mk b/sdext/source/presenter/makefile.mk index a085439..e1d15a5 100644 --- a/sdext/source/presenter/makefile.mk +++ b/sdext/source/presenter/makefile.mk @@ -99,7 +99,7 @@ SLOFILES= \ # --- Library ----------------------------------- -SHL1TARGET= $(TARGET).uno +SHL1TARGET=$(ENFORCEDSHLPREFIX)$(TARGET).uno SHL1STDLIBS= $(CPPUHELPERLIB) \ $(CPPULIB) \ diff --git a/solenv/inc/unxandr.mk b/solenv/inc/unxandr.mk index 52c92da..49b481a 100644 --- a/solenv/inc/unxandr.mk +++ b/solenv/inc/unxandr.mk @@ -50,3 +50,7 @@ STDLIBCUIMT+=-llog -landroid -lgnustl_shared STDSHLGUIMT+=-llog -landroid -lgnustl_shared STDSHLCUIMT+=-llog -landroid -lgnustl_shared +# All shared libraries we build must start with "lib" because +# otherwise the Android package installer will not unpack them from +# the .apk into the app's lib directory +ENFORCEDSHLPREFIX=lib diff --git a/stoc/source/corereflection/makefile.mk b/stoc/source/corereflection/makefile.mk index a546a8a..1f4b4a5 100644 --- a/stoc/source/corereflection/makefile.mk +++ b/stoc/source/corereflection/makefile.mk @@ -27,7 +27,7 @@ PRJ=..$/.. PRJNAME= stoc -TARGET = reflection.uno +TARGET = $(ENFORCEDSHLPREFIX)reflection.uno ENABLE_EXCEPTIONS=TRUE COMP1TYPELIST = corefl diff --git a/stoc/source/inspect/makefile.mk b/stoc/source/inspect/makefile.mk index 60864ee..62bf365 100644 --- a/stoc/source/inspect/makefile.mk +++ b/stoc/source/inspect/makefile.mk @@ -27,7 +27,7 @@ PRJ=..$/.. PRJNAME= stoc -TARGET = introspection.uno +TARGET = $(ENFORCEDSHLPREFIX)introspection.uno ENABLE_EXCEPTIONS=TRUE COMP1TYPELIST = insp diff --git a/stoc/source/invocation/makefile.mk b/stoc/source/invocation/makefile.mk index 72eeea3..214873d 100644 --- a/stoc/source/invocation/makefile.mk +++ b/stoc/source/invocation/makefile.mk @@ -27,7 +27,7 @@ PRJ=..$/.. PRJNAME= stoc -TARGET = invocation.uno +TARGET = $(ENFORCEDSHLPREFIX)invocation.uno ENABLE_EXCEPTIONS=TRUE COMP1TYPELIST = inv diff --git a/stoc/source/invocation_adapterfactory/makefile.mk b/stoc/source/invocation_adapterfactory/makefile.mk index 4c3450a..49bbc1a 100644 --- a/stoc/source/invocation_adapterfactory/makefile.mk +++ b/stoc/source/invocation_adapterfactory/makefile.mk @@ -27,7 +27,7 @@ PRJ=..$/.. PRJNAME=stoc -TARGET = invocadapt.uno +TARGET = $(ENFORCEDSHLPREFIX)invocadapt.uno ENABLE_EXCEPTIONS=TRUE COMP1TYPELIST = invadp diff --git a/stoc/source/javaloader/makefile.mk b/stoc/source/javaloader/makefile.mk index e53b90d..1df3b6c 100644 --- a/stoc/source/javaloader/makefile.mk +++ b/stoc/source/javaloader/makefile.mk @@ -28,7 +28,7 @@ PRJ=..$/.. PRJNAME=stoc -TARGET = javaloader.uno +TARGET = $(ENFORCEDSHLPREFIX)javaloader.uno ENABLE_EXCEPTIONS=TRUE COMP1TYPELIST = javaloader diff --git a/stoc/source/javavm/makefile.mk b/stoc/source/javavm/makefile.mk index bcd36e6..6c38f60 100644 --- a/stoc/source/javavm/makefile.mk +++ b/stoc/source/javavm/makefile.mk @@ -27,7 +27,7 @@ PRJ=..$/.. PRJNAME=stoc -TARGET = javavm.uno +TARGET = $(ENFORCEDSHLPREFIX)javavm.uno ENABLE_EXCEPTIONS=TRUE COMP1TYPELIST = jen diff --git a/stoc/source/namingservice/makefile.mk b/stoc/source/namingservice/makefile.mk index cc98cdf..149874c 100644 --- a/stoc/source/namingservice/makefile.mk +++ b/stoc/source/namingservice/makefile.mk @@ -27,7 +27,7 @@ PRJ=..$/.. PRJNAME= stoc -TARGET = namingservice.uno +TARGET = $(ENFORCEDSHLPREFIX)namingservice.uno ENABLE_EXCEPTIONS=TRUE COMP1TYPELIST = namingservice diff --git a/stoc/source/proxy_factory/makefile.mk b/stoc/source/proxy_factory/makefile.mk index 23146e6..0a8a923 100644 --- a/stoc/source/proxy_factory/makefile.mk +++ b/stoc/source/proxy_factory/makefile.mk @@ -28,7 +28,7 @@ PRJ=..$/.. PRJNAME=stoc -TARGET = proxyfac.uno +TARGET = $(ENFORCEDSHLPREFIX)proxyfac.uno ENABLE_EXCEPTIONS=TRUE COMP1TYPELIST = proxyfac diff --git a/stoc/test/registry_tdprovider/makefile.mk b/stoc/test/registry_tdprovider/makefile.mk index f258963..f4d5d7b 100644 --- a/stoc/test/registry_tdprovider/makefile.mk +++ b/stoc/test/registry_tdprovider/makefile.mk @@ -38,7 +38,7 @@ DLLPRE = # no leading "lib" on .so files SLOFILES = $(SLO)$/testregistrytdprovider.obj -SHL1TARGET = testregistrytdprovider.uno +SHL1TARGET = $(ENFORCEDSHLPREFIX)testregistrytdprovider.uno SHL1OBJS = $(SLOFILES) SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) diff --git a/stoc/test/tdmanager/makefile.mk b/stoc/test/tdmanager/makefile.mk index 8f39ac5..488378f 100644 --- a/stoc/test/tdmanager/makefile.mk +++ b/stoc/test/tdmanager/makefile.mk @@ -38,7 +38,7 @@ DLLPRE = # no leading "lib" on .so files SLOFILES = $(SLO)$/testtdmanager.obj -SHL1TARGET = testtdmanager.uno +SHL1TARGET = $(ENFORCEDSHLPREFIX)testtdmanager.uno SHL1OBJS = $(SLOFILES) SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) diff --git a/stoc/util/makefile.mk b/stoc/util/makefile.mk index 32f229c..8f58e09 100644 --- a/stoc/util/makefile.mk +++ b/stoc/util/makefile.mk @@ -37,7 +37,7 @@ DLLPRE = # ------------------------------------------------------------------ -SHL1TARGET= $(TARGET) +SHL1TARGET= $(ENFORCEDSHLPREFIX)$(TARGET) LIB1TARGET= $(SLB)$/$(TARGET).lib LIB1FILES= $(SLB)$/bootstrap.lib \ @@ -68,7 +68,7 @@ SHL1RPATH= URELIB DEF1NAME= $(SHL1TARGET) -SHL2TARGET= stocservices.uno +SHL2TARGET= $(ENFORCEDSHLPREFIX)stocservices.uno LIB2TARGET= $(SLB)$/stocservices.uno.lib LIB2FILES= \ diff --git a/testtools/source/bridgetest/cli/makefile.mk b/testtools/source/bridgetest/cli/makefile.mk index 3e5fd43..a8c7cb3 100644 --- a/testtools/source/bridgetest/cli/makefile.mk +++ b/testtools/source/bridgetest/cli/makefile.mk @@ -28,7 +28,7 @@ PRJ=..$/..$/.. PRJNAME=testtools -TARGET=cli_cpp_bridgetest.uno +TARGET=$(ENFORCEDSHLPREFIX)cli_cpp_bridgetest.uno USE_DEFFILE=TRUE NO_BSYMBOLIC=TRUE ENABLE_EXCEPTIONS=TRUE diff --git a/testtools/source/bridgetest/makefile.mk b/testtools/source/bridgetest/makefile.mk index 31c5b7e..a798b50 100644 --- a/testtools/source/bridgetest/makefile.mk +++ b/testtools/source/bridgetest/makefile.mk @@ -79,7 +79,7 @@ LIB1TARGET=$(SLB)$/cppobj.lib LIB1OBJFILES= \ $(SLO)$/cppobj.obj $(SLO)$/currentcontextchecker.obj $(SLO)$/multi.obj -SHL1TARGET = cppobj.uno +SHL1TARGET = $(ENFORCEDSHLPREFIX)$(ENFORCEDSHLPREFIX)$(ENFORCEDSHLPREFIX)cppobj.uno SHL1STDLIBS= \ $(CPPULIB) \ $(CPPUHELPERLIB) \ @@ -98,7 +98,7 @@ LIB2OBJFILES= \ $(SLO)$/currentcontextchecker.obj \ $(SLO)$/multi.obj -SHL2TARGET = bridgetest.uno +SHL2TARGET = $(ENFORCEDSHLPREFIX)$(ENFORCEDSHLPREFIX)$(ENFORCEDSHLPREFIX)bridgetest.uno SHL2STDLIBS= \ $(CPPULIB) \ $(CPPUHELPERLIB) \ @@ -109,7 +109,7 @@ SHL2DEF= $(MISC)$/$(SHL2TARGET).def DEF2NAME= $(SHL2TARGET) SHL2VERSIONMAP = $(SOLARENV)/src/component.map -SHL3TARGET = constructors.uno +SHL3TARGET = $(ENFORCEDSHLPREFIX)$(ENFORCEDSHLPREFIX)$(ENFORCEDSHLPREFIX)constructors.uno SHL3OBJS = $(SLO)$/constructors.obj SHL3STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(SALLIB) SHL3VERSIONMAP = $(SOLARENV)/src/component.map diff --git a/testtools/source/performance/makefile.mk b/testtools/source/performance/makefile.mk index a4b179b..a7f2d6b 100644 --- a/testtools/source/performance/makefile.mk +++ b/testtools/source/performance/makefile.mk @@ -43,7 +43,7 @@ LIB1TARGET=$(SLB)$/perftest.lib LIB1OBJFILES= \ $(SLO)$/ubtest.obj -SHL1TARGET = perftest.uno +SHL1TARGET = $(ENFORCEDSHLPREFIX)$(ENFORCEDSHLPREFIX)perftest.uno SHL1VERSIONMAP = $(SOLARENV)$/src$/component.map @@ -62,7 +62,7 @@ LIB2TARGET=$(SLB)$/perfobj.lib LIB2OBJFILES= \ $(SLO)$/ubobject.obj -SHL2TARGET = perfobj.uno +SHL2TARGET = $(ENFORCEDSHLPREFIX)$(ENFORCEDSHLPREFIX)perfobj.uno SHL2VERSIONMAP = $(SOLARENV)$/src$/component.map diff --git a/ucb/source/ucp/expand/makefile.mk b/ucb/source/ucp/expand/makefile.mk index 70e4411..9182517 100644 --- a/ucb/source/ucp/expand/makefile.mk +++ b/ucb/source/ucp/expand/makefile.mk @@ -28,7 +28,7 @@ PRJ = ..$/..$/.. PRJNAME = ucb UCPEXPAND_MAJOR = 1 -TARGET = ucpexpand$(UCPEXPAND_MAJOR).uno +TARGET = $(ENFORCEDSHLPREFIX)ucpexpand$(UCPEXPAND_MAJOR).uno ENABLE_EXCEPTIONS = TRUE NO_BSYMBOLIC = TRUE diff --git a/ucb/source/ucp/ext/makefile.mk b/ucb/source/ucp/ext/makefile.mk index b5f2734..b9e9a11 100644 --- a/ucb/source/ucp/ext/makefile.mk +++ b/ucb/source/ucp/ext/makefile.mk @@ -27,7 +27,7 @@ PRJ = ..$/..$/.. PRJNAME = ucb -TARGET = ucpext.uno +TARGET = $(ENFORCEDSHLPREFIX)ucpext.uno ENABLE_EXCEPTIONS = TRUE .INCLUDE : settings.mk diff --git a/ucb/source/ucp/tdoc/makefile.mk b/ucb/source/ucp/tdoc/makefile.mk index 82c76b3..611a269 100644 --- a/ucb/source/ucp/tdoc/makefile.mk +++ b/ucb/source/ucp/tdoc/makefile.mk @@ -29,7 +29,7 @@ PRJ=..$/..$/.. PRJNAME=ucb # Version UCPTDOC_MAJOR=1 -TARGET=ucptdoc$(UCPTDOC_MAJOR).uno +TARGET=$(ENFORCEDSHLPREFIX)ucptdoc$(UCPTDOC_MAJOR).uno ENABLE_EXCEPTIONS=TRUE USE_DEFFILE=TRUE NO_BSYMBOLIC=TRUE commit 49a6efd9d9d0c700651d90b20559f3ceeeb7c8ce Author: Tor Lillqvist <tlillqv...@suse.com> Date: Wed Nov 16 17:39:23 2011 +0200 Copy more shared objects for unit testing diff --git a/sal/osl/android/Makefile b/sal/osl/android/Makefile index 2a606c4..1fb7aa1 100644 --- a/sal/osl/android/Makefile +++ b/sal/osl/android/Makefile @@ -1,21 +1,51 @@ NDK_HOME:=$(shell type -p ndk-build) NDK_HOME:=$(shell dirname $(NDK_HOME)) +SODEST=libs/armeabi-v7a + all: ndk-build V=1 +# # Copy shared libraries we need to libs/armeabi-v7a so that ant will -# include them in the .apk - cp ../../unxandr.pro/bin/cppunittester libs/armeabi-v7a/libcppunittester.so - cp ../../../solver/unxandr.pro/lib/libcppunit-1.12.so libs/armeabi-v7a - cp ../../unxandr.pro/lib/*.so libs/armeabi-v7a - cp $(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so libs/armeabi-v7a +# include them in the .apk. +# First ones from here, sal + cp ../../$(INPATH)/bin/cppunittester $(SODEST)/libcppunittester.so +# +# Then the cppunit library + cp $(OUTDIR)/lib/libcppunit-1.12.so $(SODEST) +# +# Then cppunit "plug-ins", first ones from sal +# + cp ../../$(INPATH)/lib/*.so $(SODEST) +# +# Then ones from other modules. Note that depending on when you try +# this, these might not have been built yet. +# + -for F in $(SRC_ROOT)/cppu/$(INPATH)/lib/qa_*.so; do \ + test -f $${F} && cp $${F} $(SODEST); \ + done +# + -for F in i18npool_test_breakiterator; do \ + test -f $(WORKDIR)/LinkTarget/CppunitTest/libtest_$${F}.so && cp $(WORKDIR)/LinkTarget/CppunitTest/libtest_$${F}.so $(SODEST); \ + done +# +# Then libs that the tests from other modules need. +# + -for F in libuno_cppu libuno_salhelpergcc3 libuno_cppuhelpergcc3; do \ + test -f $(OUTDIR)/lib/$${F}.so && cp $(OUTDIR)/lib/$${F}.so $(SODEST); \ + done +# +# Then the shared GNU C++ library + cp $(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so $(SODEST) +# # Copy them to obj/local/armeabi-v7a, too, where gdb will look for -# them. Not sure if this is useful or not; I have great problems with -# ndk-gdb. - cp ../../unxandr.pro/bin/cppunittester obj/local/armeabi-v7a/libcppunittester.so - cp ../../../solver/unxandr.pro/lib/libcppunit-1.12.so obj/local/armeabi-v7a - cp ../../unxandr.pro/lib/*.so obj/local/armeabi-v7a - cp $(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so obj/local/armeabi-v7a +# them. Not sure if this is useful or not; I have great problems with +# ndk-gdb. Actually, commenting out this part for now... +# +# cp ../../$(INPATH)/bin/cppunittester obj/local/armeabi-v7a/libcppunittester.so +# cp $(OUTPATH)/lib/libcppunit-1.12.so obj/local/armeabi-v7a +# cp ../../$(INPATH)/lib/*.so obj/local/armeabi-v7a +# cp $(NDK_HOME)/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a/libgnustl_shared.so obj/local/armeabi-v7a unset JAVA_HOME && ant debug @echo 'Install it on the device with ant debug install' @echo 'Then run it with something like what "make run" does (see Makefile)' commit 73ee896b61ab4e67fb951aab92ee247916ee5b76 Author: Tor Lillqvist <tlillqv...@suse.com> Date: Wed Nov 16 17:38:52 2011 +0200 Improve a diagnostic log message diff --git a/sal/osl/android/jni/lo-bootstrap.c b/sal/osl/android/jni/lo-bootstrap.c index ad35568..c5e1905 100644 --- a/sal/osl/android/jni/lo-bootstrap.c +++ b/sal/osl/android/jni/lo-bootstrap.c @@ -479,7 +479,7 @@ lo_dlopen(const char *library) char *full_name; char **needed; int i; - int found = 0; + int found; rover = loaded_libraries; while (rover != NULL && @@ -491,6 +491,7 @@ lo_dlopen(const char *library) /* LOGI("lo_dlopen(%s)", library); */ + found = 0; if (library[0] == '/') { full_name = strdup(library); @@ -537,7 +538,7 @@ lo_dlopen(const char *library) LOGI("dlopen(%s) = %p", full_name, p); free(full_name); if (p == NULL) - LOGI("lo_dlopen: %s", dlerror()); + LOGI("lo_dlopen: Error from dlopen(%s): %s", library, dlerror()); new_loaded_lib = malloc(sizeof(*new_loaded_lib)); new_loaded_lib->name = strdup(library); commit 9a52bf1d5cfdd01c6d5ce6e41bf1a432f9a29e7f Author: Tor Lillqvist <tlillqv...@suse.com> Date: Wed Nov 16 17:18:45 2011 +0200 Use lo_dlopen() on Android diff --git a/cppunit/android.patch b/cppunit/android.patch index 7d88a82..7628f5f 100644 --- a/cppunit/android.patch +++ b/cppunit/android.patch @@ -33,3 +33,21 @@ # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 +--- misc/cppunit-1.12.1/src/cppunit/UnixDynamicLibraryManager.cpp ++++ misc/build/cppunit-1.12.1/src/cppunit/UnixDynamicLibraryManager.cpp +@@ -13,7 +13,15 @@ + DynamicLibraryManager::LibraryHandle + DynamicLibraryManager::doLoadLibrary( const std::string &libraryName ) + { ++#ifdef __ANDROID__ ++ // Use our enhanced dlopen() wrapper, see sal/osl/android/jni/lo-wrapper.c ++ void *(*lo_dlopen)(const char *) = (void *(*)(const char *)) dlsym( RTLD_DEFAULT, "lo_dlopen" ); ++ if (lo_dlopen == NULL) ++ return NULL; ++ return (*lo_dlopen)( libraryName.c_str() ); ++#else + return ::dlopen( libraryName.c_str(), RTLD_NOW | RTLD_GLOBAL ); ++#endif + } + + _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits