[Libreoffice-commits] .: 7 commits - animations/Library_animcore.mk bean/Library_officebean.mk binaryurp/CppunitTest_binaryurp_test-cache.mk binaryurp/CppunitTest_binaryurp_test-unmarshal.mk binaryurp/Library_binaryurp.mk cairo/cairo-1.10.2.android.patch cairo/cairo-1.10.2.patch desktop/Executable_crashrep.com.mk desktop/Executable_officeloader.mk desktop/Executable_oosplash.mk desktop/Executable_quickstart.mk desktop/Executable_sbase.mk desktop/Executable_scalc.mk desktop/Executable_sdraw.mk desktop/Executable_simpress.mk desktop/Executable_smath.mk desktop/Executable_soffice.bin.mk desktop/Executable_soffice.mk desktop/Executable_sweb.mk desktop/Executable_swriter.mk desktop/Executable_unopkg.bin.mk desktop/Library_deploymentgui.mk desktop/Library_deploymentmisc.mk desktop/Library_migrationoo2.mk desktop/Library_migrationoo3.mk desktop/Library_offacc.mk desktop/Library_sofficeapp.mk desktop/Library_spl.mk desktop/Library_spl_unx.mk desktop/Library_unopkgapp.mk eventattacher/Library_evta tt.mk framework/Library_lomenubar.mk i18npool/Library_collator_data.mk i18npool/Library_dict_ja.mk i18npool/Library_dict_zh.mk i18npool/Library_index_data.mk i18npool/Library_localedata_en.mk i18npool/Library_localedata_es.mk i18npool/Library_localedata_euro.mk i18npool/Library_localedata_others.mk i18npool/Library_textconv_dict.mk o3tl/CppunitTest_o3tl_tests.mk officecfg/CppunitTest_officecfg_cppheader_test.mk sal/android sal/Executable_typesconfig.mk sal/Library_lo-bootstrap.mk sal/Library_sal.mk sal/Module_sal.mk sal/osl sal/Package_generated.mk sal/util scaddins/Library_analysis.mk scaddins/Library_date.mk sfx2/Library_qstart.mk solenv/gbuild starmath/Library_sm.mk twain/inc vcl/Library_vclplug_kde4.mk vcl/Library_vclplug_kde.mk writerperfect/Library_cdrimport.mk writerperfect/Library_msworks.mk writerperfect/Library_visioimport.mk writerperfect/Library_wpft.mk writerperfect/Library_wpgimport.mk

Tor Lillqvist tml at kemper.freedesktop.org
Mon Dec 19 15:13:27 PST 2011


 animations/Library_animcore.mk                    |    1 
 bean/Library_officebean.mk                        |    6 +
 binaryurp/CppunitTest_binaryurp_test-cache.mk     |    1 
 binaryurp/CppunitTest_binaryurp_test-unmarshal.mk |    1 
 binaryurp/Library_binaryurp.mk                    |    1 
 cairo/cairo-1.10.2.android.patch                  |    2 
 cairo/cairo-1.10.2.patch                          |   11 ++
 desktop/Executable_crashrep.com.mk                |    4 
 desktop/Executable_officeloader.mk                |    1 
 desktop/Executable_oosplash.mk                    |    1 
 desktop/Executable_quickstart.mk                  |    1 
 desktop/Executable_sbase.mk                       |    4 
 desktop/Executable_scalc.mk                       |    4 
 desktop/Executable_sdraw.mk                       |    4 
 desktop/Executable_simpress.mk                    |    4 
 desktop/Executable_smath.mk                       |    4 
 desktop/Executable_soffice.bin.mk                 |    1 
 desktop/Executable_soffice.mk                     |    1 
 desktop/Executable_sweb.mk                        |    4 
 desktop/Executable_swriter.mk                     |    4 
 desktop/Executable_unopkg.bin.mk                  |    1 
 desktop/Library_deploymentgui.mk                  |    1 
 desktop/Library_deploymentmisc.mk                 |    1 
 desktop/Library_migrationoo2.mk                   |    1 
 desktop/Library_migrationoo3.mk                   |    1 
 desktop/Library_offacc.mk                         |    1 
 desktop/Library_sofficeapp.mk                     |    1 
 desktop/Library_spl.mk                            |    1 
 desktop/Library_spl_unx.mk                        |    1 
 desktop/Library_unopkgapp.mk                      |    1 
 eventattacher/Library_evtatt.mk                   |    4 
 framework/Library_lomenubar.mk                    |    1 
 i18npool/Library_collator_data.mk                 |    4 
 i18npool/Library_dict_ja.mk                       |    4 
 i18npool/Library_dict_zh.mk                       |    4 
 i18npool/Library_index_data.mk                    |    4 
 i18npool/Library_localedata_en.mk                 |    4 
 i18npool/Library_localedata_es.mk                 |    1 
 i18npool/Library_localedata_euro.mk               |    1 
 i18npool/Library_localedata_others.mk             |    1 
 i18npool/Library_textconv_dict.mk                 |    4 
 o3tl/CppunitTest_o3tl_tests.mk                    |    2 
 officecfg/CppunitTest_officecfg_cppheader_test.mk |    7 +
 sal/Executable_typesconfig.mk                     |   38 -------
 sal/Library_lo-bootstrap.mk                       |   14 --
 sal/Library_sal.mk                                |    6 -
 sal/Module_sal.mk                                 |    2 
 sal/Package_generated.mk                          |    6 -
 sal/android/lo-bootstrap.c                        |  105 ++++++++++++++++------
 sal/osl/unx/module.c                              |    5 -
 sal/osl/unx/nlsupport.c                           |   13 --
 sal/osl/unx/thread.c                              |    7 +
 sal/util/Makefile                                 |    6 -
 scaddins/Library_analysis.mk                      |    1 
 scaddins/Library_date.mk                          |    1 
 sfx2/Library_qstart.mk                            |    1 
 solenv/gbuild/platform/ANDROID_ARM_GCC.mk         |   10 +-
 starmath/Library_sm.mk                            |    1 
 twain/inc/twain.h                                 |   37 +++++++
 vcl/Library_vclplug_kde.mk                        |    1 
 vcl/Library_vclplug_kde4.mk                       |    1 
 writerperfect/Library_cdrimport.mk                |    1 
 writerperfect/Library_msworks.mk                  |    1 
 writerperfect/Library_visioimport.mk              |    1 
 writerperfect/Library_wpft.mk                     |    1 
 writerperfect/Library_wpgimport.mk                |    1 
 66 files changed, 265 insertions(+), 106 deletions(-)

New commits:
commit 6e07d605f30dab8ff3cc993245114071654e386a
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Tue Dec 20 00:59:33 2011 +0200

    Use visibility attributes as we get compiled with -fvisibility=hidden

diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index 47438f1..93e0dba 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -188,6 +188,7 @@ free_ptrarray(void **pa)
     free(pa);
 }
 
+__attribute__ ((visibility("default")))
 jobjectArray
 Java_org_libreoffice_android_Bootstrap_dlneeds(JNIEnv* env,
                                                jobject clazz,
@@ -238,6 +239,7 @@ Java_org_libreoffice_android_Bootstrap_dlneeds(JNIEnv* env,
     return result;
 }
 
+__attribute__ ((visibility("default")))
 jint
 Java_org_libreoffice_android_Bootstrap_dlopen(JNIEnv* env,
                                               jobject clazz,
@@ -255,6 +257,7 @@ Java_org_libreoffice_android_Bootstrap_dlopen(JNIEnv* env,
     return (jint) p;
 }
 
+__attribute__ ((visibility("default")))
 jint
 Java_org_libreoffice_android_Bootstrap_dlsym(JNIEnv* env,
                                              jobject clazz,
@@ -273,6 +276,7 @@ Java_org_libreoffice_android_Bootstrap_dlsym(JNIEnv* env,
     return (jint) p;
 }
 
+__attribute__ ((visibility("default")))
 jint
 Java_org_libreoffice_android_Bootstrap_dlcall(JNIEnv* env,
                                               jobject clazz,
@@ -315,6 +319,7 @@ Java_org_libreoffice_android_Bootstrap_dlcall(JNIEnv* env,
 //                                    String apkFile,
 //                                    String[] ld_library_path);
 
+__attribute__ ((visibility("default")))
 jboolean
 Java_org_libreoffice_android_Bootstrap_setup__Ljava_lang_String_2Ljava_lang_String_2_3Ljava_lang_String_2
     (JNIEnv* env,
@@ -389,6 +394,7 @@ Java_org_libreoffice_android_Bootstrap_setup__Ljava_lang_String_2Ljava_lang_Stri
 //                                    Object lo_main_argument,
 //                                    int lo_main_delay);
 
+__attribute__ ((visibility("default")))
 jboolean
 Java_org_libreoffice_android_Bootstrap_setup__ILjava_lang_Object_2I(JNIEnv* env,
                                                                     jobject clazz,
@@ -432,6 +438,7 @@ Java_org_libreoffice_android_Bootstrap_setup__ILjava_lang_Object_2I(JNIEnv* env,
 
 // public static native int getpid();
 
+__attribute__ ((visibility("default")))
 jint
 Java_org_libreoffice_android_Bootstrap_getpid(JNIEnv* env,
                                               jobject clazz)
@@ -445,6 +452,7 @@ Java_org_libreoffice_android_Bootstrap_getpid(JNIEnv* env,
 
 // public static native void system(String cmdline);
 
+__attribute__ ((visibility("default")))
 void
 Java_org_libreoffice_android_Bootstrap_system(JNIEnv* env,
                                               jobject clazz,
@@ -465,6 +473,7 @@ Java_org_libreoffice_android_Bootstrap_system(JNIEnv* env,
 
 // public static native void putenv(String string);
 
+__attribute__ ((visibility("default")))
 void
 Java_org_libreoffice_android_Bootstrap_putenv(JNIEnv* env,
                                               jobject clazz,
@@ -483,6 +492,7 @@ Java_org_libreoffice_android_Bootstrap_putenv(JNIEnv* env,
     (*env)->ReleaseStringUTFChars(env, string, s);
 }
 
+__attribute__ ((visibility("default")))
 char **
 lo_dlneeds(const char *library)
 {
@@ -627,6 +637,7 @@ lo_dlneeds(const char *library)
     return NULL;
 }
 
+__attribute__ ((visibility("default")))
 void *
 lo_dlopen(const char *library)
 {
@@ -730,6 +741,7 @@ lo_dlopen(const char *library)
     return p;
 }
 
+__attribute__ ((visibility("default")))
 void *
 lo_dlsym(void *handle,
          const char *symbol)
@@ -741,6 +753,7 @@ lo_dlsym(void *handle,
     return p;
 }
 
+__attribute__ ((visibility("default")))
 int
 lo_dladdr(void *addr,
           Dl_info *info)
@@ -815,6 +828,7 @@ find_cdir_entry (struct cdir_entry *entry, int count, const char *name)
     return NULL;
 }
 
+__attribute__ ((visibility("default")))
 void *
 lo_apkentry(const char *filename,
             size_t *size)
@@ -863,6 +877,7 @@ lo_apkentry(const char *filename,
     return data;
 }
 
+__attribute__ ((visibility("default")))
 int
 lo_dlcall_argc_argv(void *function,
                     int argc,
@@ -1047,6 +1062,7 @@ patch_libgnustl_shared(void)
           &replacement_method_before_arm);
 }
 
+__attribute__ ((visibility("default")))
 void
 Java_org_libreoffice_android_Bootstrap_patch_libgnustl_shared(JNIEnv* env,
                                                               jobject clazz)
@@ -1057,12 +1073,14 @@ Java_org_libreoffice_android_Bootstrap_patch_libgnustl_shared(JNIEnv* env,
     patch_libgnustl_shared();
 }
 
+__attribute__ ((visibility("default")))
 JavaVM *
 lo_get_javavm(void)
 {
     return app->activity->vm;
 }
 
+__attribute__ ((visibility("default")))
 void
 android_main(struct android_app* state)
 {
commit 0edebb4f7984aab8778835e9d74474668ff06bf5
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Tue Dec 20 00:44:06 2011 +0200

    Fix cairo build for Android again

diff --git a/cairo/cairo-1.10.2.android.patch b/cairo/cairo-1.10.2.android.patch
index bd4438b..e894063 100644
--- a/cairo/cairo-1.10.2.android.patch
+++ b/cairo/cairo-1.10.2.android.patch
@@ -1,7 +1,7 @@
 --- misc/cairo-1.10.2/build/ltmain.sh
 +++ misc/build/cairo-1.10.2/build/ltmain.sh
 @@ -3228,6 +3228,10 @@
- 	fi
+ 	  func_warning "\`-release' is ignored for convenience libraries"
        else
  
 +	# Force no versioning suffix for Android
diff --git a/cairo/cairo-1.10.2.patch b/cairo/cairo-1.10.2.patch
index 6bc44c9..eb0885e 100644
--- a/cairo/cairo-1.10.2.patch
+++ b/cairo/cairo-1.10.2.patch
@@ -42,12 +42,21 @@
  	@mkdir -p $(CFG)
 --- misc/cairo-1.10.2/build/config.sub	2009-08-14 23:33:32.000000000 +0200
 +++ misc/build/cairo-1.10.2/build/config.sub	2009-08-14 23:33:32.000000000 +0200
+@@ -120,7 +120,7 @@
+ # Here we must recognize all the valid KERNEL-OS combinations.
+ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+ case $maybe_os in
+-  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
++  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+   kopensolaris*-gnu* | \
+   storm-chaos* | os2-emx* | rtmk-nova*)
 @@ -1272,7 +1272,7 @@
  	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
  	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
 -	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-+	      | -udi* | -androideabi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
++	      | -udi* | -linux-androideabi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  	      | -chorusos* | -chorusrdb* | -cegcc* \
  	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
commit 3fbac5c1c0d787a7ad5775e0f62872e117564c90
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Tue Dec 20 00:18:53 2011 +0200

    Add TWAIN License text
    
    Note that it is already included in our
    readlicense_oo/txt/license.txt, so we presumably have fulfilled the
    license's requirements. Just adding the text in twain.h, too, for
    helpfulness.

diff --git a/twain/inc/twain.h b/twain/inc/twain.h
index a9643e6..7b2376d 100644
--- a/twain/inc/twain.h
+++ b/twain/inc/twain.h
@@ -1,3 +1,40 @@
+/* This comment added at LibrOffice:
+
+   This file is covered by the "TWAIN License", at the time of this
+   writing in http://www.twain.org/devfiles/readme.txt, which says:
+
+   The TWAIN Working Group grants customer ("Customer") the worldwide,
+   royalty-free, non-exclusive license to reproduce and distribute the
+   software and documentation of the TWAIN toolkit ("TWAIN
+   Toolkit"). The TWAIN Toolkit was designed to be used by third
+   parties to assist them in becoming compliant with the TWAIN
+   standard, but it has not been developed to the standards of a
+   commercial product. Consequently, the TWAIN toolkit is provided AS
+   IS without any warranty. THE TWAIN Working Group disclaims all
+   warranties in the TWAIN toolkit whether implied, express or
+   statutory, including, without limitation, the implied warranties of
+   merchantability, noninfringement of third party rights and fitness
+   for a particular purpose. The TWAIN Working Group disclaims all
+   liability for damages, whether direct, indirect, special,
+   incidental, or consequential, arising from the reproduction,
+   distribution, modification, or other use of the TWAIN Toolkit.
+
+   As a condition of this license, Customer agrees to include in
+   software programs based in whole or in part on the TWAIN Toolkit
+   the following provisions in (i) the header or similar file in such
+   software and (ii) prominently in its documentation and to require
+   its sublicensees to include these provisions in similar locations:
+   The TWAIN Toolkit is distributed as is. The developer and
+   distributors of the TWAIN Toolkit expressly disclaim all implied,
+   express or statutory warranties including, without limitation, the
+   implied warranties of merchantability, noninfringement of third
+   party rights and fitness for a particular purpose. Neither the
+   developers nor the distributors will be liable for damages, whether
+   direct, indirect, special, incidental, or consequential, as a
+   result of the reproduction, modification, distribution or other use
+   of the TWAIN Toolkit.
+*/
+
 /* ======================================================================== *\
 
   Copyright (C) 1991, 1992 TWAIN Working Group: Aldus, Caere, Eastman-Kodak,
commit 25e10370feb4d62b953c317169516737fe982a34
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Dec 19 19:30:31 2011 +0200

    Link most libs and executables with gb_STDLIBS as presumably is intended

diff --git a/animations/Library_animcore.mk b/animations/Library_animcore.mk
index cbc702b..2dc3abf 100644
--- a/animations/Library_animcore.mk
+++ b/animations/Library_animcore.mk
@@ -47,6 +47,7 @@ $(eval $(call gb_Library_add_linked_libs,animcore,\
     cppu \
 	cppuhelper \
     sal \
+	$(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,animcore,\
diff --git a/bean/Library_officebean.mk b/bean/Library_officebean.mk
index bcc1ae6..bef4ac2 100644
--- a/bean/Library_officebean.mk
+++ b/bean/Library_officebean.mk
@@ -1,3 +1,4 @@
+# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
 #
 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
 #
@@ -62,3 +63,8 @@ $(eval $(call gb_Library_add_ldflags,officebean,\
 
 endif
 
+$(eval $(call gb_Library_add_linked_libs,officebean,\
+    $(gb_STDLIBS) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/binaryurp/CppunitTest_binaryurp_test-cache.mk b/binaryurp/CppunitTest_binaryurp_test-cache.mk
index 51b5e83..b78a9b4 100644
--- a/binaryurp/CppunitTest_binaryurp_test-cache.mk
+++ b/binaryurp/CppunitTest_binaryurp_test-cache.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_CppunitTest_CppunitTest,binaryurp_test-cache))
 
 $(eval $(call gb_CppunitTest_add_linked_libs,binaryurp_test-cache,\
 	sal \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,binaryurp_test-cache,\
diff --git a/binaryurp/CppunitTest_binaryurp_test-unmarshal.mk b/binaryurp/CppunitTest_binaryurp_test-unmarshal.mk
index 0e0b769..4b6cc3c 100644
--- a/binaryurp/CppunitTest_binaryurp_test-unmarshal.mk
+++ b/binaryurp/CppunitTest_binaryurp_test-unmarshal.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_CppunitTest_add_linked_libs,binaryurp_test-unmarshal,\
 	cppuhelper \
 	sal \
 	salhelper \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_CppunitTest_add_library_objects,binaryurp_test-unmarshal,\
diff --git a/binaryurp/Library_binaryurp.mk b/binaryurp/Library_binaryurp.mk
index ff06941..c86febe 100644
--- a/binaryurp/Library_binaryurp.mk
+++ b/binaryurp/Library_binaryurp.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_Library_add_linked_libs,binaryurp,\
 	cppuhelper \
 	sal \
 	salhelper \
+	$(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,binaryurp,\
diff --git a/desktop/Executable_crashrep.com.mk b/desktop/Executable_crashrep.com.mk
index 1db3483..d7f4d73 100644
--- a/desktop/Executable_crashrep.com.mk
+++ b/desktop/Executable_crashrep.com.mk
@@ -37,6 +37,10 @@ $(eval $(call gb_Executable_add_defs,crashrep_com,\
     $(LFS_CFLAGS) \
 ))
 
+$(eval $(call gb_Executable_add_linked_libs,crashrep_com,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Executable_add_exception_objects,crashrep_com,\
     desktop/win32/source/guistdio/guistdio \
 ))
diff --git a/desktop/Executable_officeloader.mk b/desktop/Executable_officeloader.mk
index c05d4a4..f1801e6 100644
--- a/desktop/Executable_officeloader.mk
+++ b/desktop/Executable_officeloader.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Executable_set_include,officeloader,\
 
 $(eval $(call gb_Executable_add_linked_libs,officeloader,\
     sal \
+    $(gb_STDLIBS) \
 ))
 
 # I'm not suer wht was the intent, but that break the link
diff --git a/desktop/Executable_oosplash.mk b/desktop/Executable_oosplash.mk
index d18cfcc..698b58a 100644
--- a/desktop/Executable_oosplash.mk
+++ b/desktop/Executable_oosplash.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_Executable_set_include,oosplash,\
 
 $(eval $(call gb_Executable_add_linked_libs,oosplash,\
     sal \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Executable_add_cobjects,oosplash,\
diff --git a/desktop/Executable_quickstart.mk b/desktop/Executable_quickstart.mk
index 470497d..7da5066 100644
--- a/desktop/Executable_quickstart.mk
+++ b/desktop/Executable_quickstart.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_Executable_add_linked_libs,quickstart,\
     ole32 \
     oleaut32 \
     shell32 \
+    $(gb_STDLIBS) \
 ))
 
 ifeq ($(COM),GCC)
diff --git a/desktop/Executable_sbase.mk b/desktop/Executable_sbase.mk
index 1d6ff38..37738a0 100644
--- a/desktop/Executable_sbase.mk
+++ b/desktop/Executable_sbase.mk
@@ -37,6 +37,10 @@ $(eval $(call gb_Executable_add_defs,sbase,\
     -DUNICODE \
 ))
 
+$(eval $(call gb_Executable_add_linked_libs,sbase,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Executable_add_noexception_objects,sbase,\
     desktop/win32/source/applauncher/launcher \
     desktop/win32/source/applauncher/sbase \
diff --git a/desktop/Executable_scalc.mk b/desktop/Executable_scalc.mk
index 47dc397..ec72742 100644
--- a/desktop/Executable_scalc.mk
+++ b/desktop/Executable_scalc.mk
@@ -37,6 +37,10 @@ $(eval $(call gb_Executable_add_defs,scalc,\
     -DUNICODE \
 ))
 
+$(eval $(call gb_Executable_add_linked_libs,scalc,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Executable_add_noexception_objects,scalc,\
     desktop/win32/source/applauncher/launcher \
     desktop/win32/source/applauncher/scalc \
diff --git a/desktop/Executable_sdraw.mk b/desktop/Executable_sdraw.mk
index 87de0eb..24fec0e 100644
--- a/desktop/Executable_sdraw.mk
+++ b/desktop/Executable_sdraw.mk
@@ -37,6 +37,10 @@ $(eval $(call gb_Executable_add_defs,sdraw,\
     -DUNICODE \
 ))
 
+$(eval $(call gb_Executable_add_linked_libs,sdraw,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Executable_add_noexception_objects,sdraw,\
     desktop/win32/source/applauncher/launcher \
     desktop/win32/source/applauncher/sdraw \
diff --git a/desktop/Executable_simpress.mk b/desktop/Executable_simpress.mk
index d698df2..f0b7241 100644
--- a/desktop/Executable_simpress.mk
+++ b/desktop/Executable_simpress.mk
@@ -37,6 +37,10 @@ $(eval $(call gb_Executable_add_defs,simpress,\
     -DUNICODE \
 ))
 
+$(eval $(call gb_Executable_add_linked_libs,simpress,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Executable_add_noexception_objects,simpress,\
     desktop/win32/source/applauncher/launcher \
     desktop/win32/source/applauncher/simpress \
diff --git a/desktop/Executable_smath.mk b/desktop/Executable_smath.mk
index a7b69e5..ff73c2a 100644
--- a/desktop/Executable_smath.mk
+++ b/desktop/Executable_smath.mk
@@ -37,6 +37,10 @@ $(eval $(call gb_Executable_add_defs,smath,\
     -DUNICODE \
 ))
 
+$(eval $(call gb_Executable_add_linked_libs,smath,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Executable_add_noexception_objects,smath,\
     desktop/win32/source/applauncher/launcher \
     desktop/win32/source/applauncher/smath \
diff --git a/desktop/Executable_soffice.bin.mk b/desktop/Executable_soffice.bin.mk
index a4aa573..456171d 100644
--- a/desktop/Executable_soffice.bin.mk
+++ b/desktop/Executable_soffice.bin.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_Executable_set_include,$(sofficebin),\
 $(eval $(call gb_Executable_add_linked_libs,$(sofficebin),\
     sal \
     sofficeapp \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Executable_add_cobjects,$(sofficebin),\
diff --git a/desktop/Executable_soffice.mk b/desktop/Executable_soffice.mk
index 115ecb7..f768d99 100644
--- a/desktop/Executable_soffice.mk
+++ b/desktop/Executable_soffice.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_Executable_add_linked_libs,soffice,\
     advapi32 \
     shell32 \
     shlwapi \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Executable_add_linked_static_libs,soffice,\
diff --git a/desktop/Executable_sweb.mk b/desktop/Executable_sweb.mk
index 3a87a31..00d0852 100644
--- a/desktop/Executable_sweb.mk
+++ b/desktop/Executable_sweb.mk
@@ -37,6 +37,10 @@ $(eval $(call gb_Executable_add_defs,sweb,\
     -DUNICODE \
 ))
 
+$(eval $(call gb_Executable_add_linked_libs,sweb,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Executable_add_noexception_objects,sweb,\
     desktop/win32/source/applauncher/launcher \
     desktop/win32/source/applauncher/sweb \
diff --git a/desktop/Executable_swriter.mk b/desktop/Executable_swriter.mk
index 04624d6..7f5e8d9 100644
--- a/desktop/Executable_swriter.mk
+++ b/desktop/Executable_swriter.mk
@@ -37,6 +37,10 @@ $(eval $(call gb_Executable_add_defs,swriter,\
     -DUNICODE \
 ))
 
+$(eval $(call gb_Executable_add_linked_libs,swriter,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Executable_add_noexception_objects,swriter,\
     desktop/win32/source/applauncher/launcher \
     desktop/win32/source/applauncher/swriter \
diff --git a/desktop/Executable_unopkg.bin.mk b/desktop/Executable_unopkg.bin.mk
index 759a4e9..464824f 100644
--- a/desktop/Executable_unopkg.bin.mk
+++ b/desktop/Executable_unopkg.bin.mk
@@ -45,6 +45,7 @@ $(eval $(call gb_Executable_add_linked_libs,$(unopkgbin),\
     sal \
     tl \
     unopkgapp \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Executable_add_cobjects,$(unopkgbin),\
diff --git a/desktop/Library_deploymentgui.mk b/desktop/Library_deploymentgui.mk
index 28b9b4a..2ce8622 100644
--- a/desktop/Library_deploymentgui.mk
+++ b/desktop/Library_deploymentgui.mk
@@ -56,6 +56,7 @@ $(eval $(call gb_Library_add_linked_libs,deploymentgui,\
     ucbhelper \
     utl \
     vcl \
+    $(gb_STDLIBS) \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/desktop/Library_deploymentmisc.mk b/desktop/Library_deploymentmisc.mk
index fc1a175..d4bf211 100644
--- a/desktop/Library_deploymentmisc.mk
+++ b/desktop/Library_deploymentmisc.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_Library_add_linked_libs,deploymentmisc,\
     ucbhelper \
     utl \
     xcr \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_use_externals,deploymentmisc,\
diff --git a/desktop/Library_migrationoo2.mk b/desktop/Library_migrationoo2.mk
index 6bdf926..43a860b 100644
--- a/desktop/Library_migrationoo2.mk
+++ b/desktop/Library_migrationoo2.mk
@@ -44,6 +44,7 @@ $(eval $(call gb_Library_add_linked_libs,migrationoo2,\
     sal \
     tl \
     utl \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_use_externals,migrationoo2,\
diff --git a/desktop/Library_migrationoo3.mk b/desktop/Library_migrationoo3.mk
index a500677..e315a84 100644
--- a/desktop/Library_migrationoo3.mk
+++ b/desktop/Library_migrationoo3.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Library_add_linked_libs,migrationoo3,\
     sal \
     tl \
     utl \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_use_externals,migrationoo3,\
diff --git a/desktop/Library_offacc.mk b/desktop/Library_offacc.mk
index c60db25..e556cb7 100644
--- a/desktop/Library_offacc.mk
+++ b/desktop/Library_offacc.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_Library_add_linked_libs,offacc,\
     cppu \
     cppuhelper \
     sal \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_set_componentfile,offacc,desktop/source/offacc/offacc))
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index a0f65b4..cd57646 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -65,6 +65,7 @@ $(eval $(call gb_Library_add_linked_libs,sofficeapp,\
     ucbhelper \
     utl \
     vcl \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,sofficeapp,\
diff --git a/desktop/Library_spl.mk b/desktop/Library_spl.mk
index da9dc48..be7de6d 100644
--- a/desktop/Library_spl.mk
+++ b/desktop/Library_spl.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Library_add_linked_libs,spl,\
     ucbhelper \
     utl \
     vcl \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_set_componentfile,spl,desktop/source/splash/spl))
diff --git a/desktop/Library_spl_unx.mk b/desktop/Library_spl_unx.mk
index e549a3e..82b1ecc 100644
--- a/desktop/Library_spl_unx.mk
+++ b/desktop/Library_spl_unx.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_Library_add_linked_libs,spl_unx,\
     cppu \
     cppuhelper \
     sal \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_set_componentfile,spl_unx,desktop/unx/splash/splash))
diff --git a/desktop/Library_unopkgapp.mk b/desktop/Library_unopkgapp.mk
index f2233ec..d2f9abb 100644
--- a/desktop/Library_unopkgapp.mk
+++ b/desktop/Library_unopkgapp.mk
@@ -53,6 +53,7 @@ $(eval $(call gb_Library_add_linked_libs,unopkgapp,\
     ucbhelper \
     utl \
     vcl \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,unopkgapp,\
diff --git a/eventattacher/Library_evtatt.mk b/eventattacher/Library_evtatt.mk
index 7c3f9ef..8a1ca73 100644
--- a/eventattacher/Library_evtatt.mk
+++ b/eventattacher/Library_evtatt.mk
@@ -1,3 +1,4 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
 #
 # Version: MPL 1.1 / GPLv3+ / LGPLv3+
 #
@@ -35,6 +36,7 @@ $(eval $(call gb_Library_add_linked_libs,evtatt,\
 	cppuhelper \
 	cppu \
 	sal \
+	$(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,evtatt,\
@@ -44,3 +46,5 @@ $(eval $(call gb_Library_add_exception_objects,evtatt,\
 $(eval $(call gb_Library_add_api,evtatt,\
 	udkapi \
 ))
+
+# vim: set ts=4 sw=4 et:
diff --git a/framework/Library_lomenubar.mk b/framework/Library_lomenubar.mk
index 45df847..153b991 100644
--- a/framework/Library_lomenubar.mk
+++ b/framework/Library_lomenubar.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Library_add_linked_libs,lomenubar,\
 	cppu \
 	cppuhelper \
 	X11 \
+	$(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,lomenubar,\
diff --git a/i18npool/Library_collator_data.mk b/i18npool/Library_collator_data.mk
index 7f00e8b..cbf147b 100644
--- a/i18npool/Library_collator_data.mk
+++ b/i18npool/Library_collator_data.mk
@@ -30,6 +30,10 @@ $(eval $(call gb_Library_Library,collator_data))
 
 $(eval $(call gb_Library_add_package_headers,collator_data,i18npool_generated))
 
+$(eval $(call gb_Library_add_linked_libs,collator_data,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Library_add_generated_exception_objects,collator_data,\
 	$(subst $(WORKDIR)/,,$(basename $(wildcard $(WORKDIR)/CustomTarget/i18npool/source/collator/collator_*.cxx))) \
 ))
diff --git a/i18npool/Library_dict_ja.mk b/i18npool/Library_dict_ja.mk
index be52e0f..9c38812 100644
--- a/i18npool/Library_dict_ja.mk
+++ b/i18npool/Library_dict_ja.mk
@@ -30,6 +30,10 @@ $(eval $(call gb_Library_Library,dict_ja))
 
 $(eval $(call gb_Library_add_package_headers,dict_ja,i18npool_generated))
 
+$(eval $(call gb_Library_add_linked_libs,dict_ja,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Library_add_generated_exception_objects,dict_ja,\
 	CustomTarget/i18npool/source/breakiterator/data/dict_ja \
 ))
diff --git a/i18npool/Library_dict_zh.mk b/i18npool/Library_dict_zh.mk
index a29b278..5567780 100644
--- a/i18npool/Library_dict_zh.mk
+++ b/i18npool/Library_dict_zh.mk
@@ -30,6 +30,10 @@ $(eval $(call gb_Library_Library,dict_zh))
 
 $(eval $(call gb_Library_add_package_headers,dict_zh,i18npool_generated))
 
+$(eval $(call gb_Library_add_linked_libs,dict_zh,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Library_add_generated_exception_objects,dict_zh,\
 	CustomTarget/i18npool/source/breakiterator/data/dict_zh \
 ))
diff --git a/i18npool/Library_index_data.mk b/i18npool/Library_index_data.mk
index 43d4c52..dd057d3 100644
--- a/i18npool/Library_index_data.mk
+++ b/i18npool/Library_index_data.mk
@@ -30,6 +30,10 @@ $(eval $(call gb_Library_Library,index_data))
 
 $(eval $(call gb_Library_add_package_headers,index_data,i18npool_generated))
 
+$(eval $(call gb_Library_add_linked_libs,index_data,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Library_add_generated_exception_objects,index_data,\
 	$(subst $(WORKDIR)/,,$(basename $(wildcard $(WORKDIR)/CustomTarget/i18npool/source/indexentry/*.cxx))) \
 ))
diff --git a/i18npool/Library_localedata_en.mk b/i18npool/Library_localedata_en.mk
index 2a09257..89534ed 100644
--- a/i18npool/Library_localedata_en.mk
+++ b/i18npool/Library_localedata_en.mk
@@ -30,6 +30,10 @@ $(eval $(call gb_Library_Library,localedata_en))
 
 $(eval $(call gb_Library_add_package_headers,localedata_en,i18npool_generated))
 
+$(eval $(call gb_Library_add_linked_libs,localedata_en,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Library_add_generated_exception_objects,localedata_en,\
 	CustomTarget/i18npool/source/localedata/localedata_en_AU \
 	CustomTarget/i18npool/source/localedata/localedata_en_BZ \
diff --git a/i18npool/Library_localedata_es.mk b/i18npool/Library_localedata_es.mk
index c429fc8..a15db63 100644
--- a/i18npool/Library_localedata_es.mk
+++ b/i18npool/Library_localedata_es.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Library_Library,localedata_es))
 
 $(eval $(call gb_Library_add_linked_libs,localedata_es,\
 	localedata_en \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_generated_exception_objects,localedata_es,\
diff --git a/i18npool/Library_localedata_euro.mk b/i18npool/Library_localedata_euro.mk
index fecdcec..d879dc2 100644
--- a/i18npool/Library_localedata_euro.mk
+++ b/i18npool/Library_localedata_euro.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Library_Library,localedata_euro))
 
 $(eval $(call gb_Library_add_linked_libs,localedata_euro,\
 	localedata_en \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_generated_exception_objects,localedata_euro,\
diff --git a/i18npool/Library_localedata_others.mk b/i18npool/Library_localedata_others.mk
index a4c5bc7..6ab62a5 100644
--- a/i18npool/Library_localedata_others.mk
+++ b/i18npool/Library_localedata_others.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Library_Library,localedata_others))
 
 $(eval $(call gb_Library_add_linked_libs,localedata_others,\
 	localedata_en \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_generated_exception_objects,localedata_others,\
diff --git a/i18npool/Library_textconv_dict.mk b/i18npool/Library_textconv_dict.mk
index 3b9213c..45ae317 100644
--- a/i18npool/Library_textconv_dict.mk
+++ b/i18npool/Library_textconv_dict.mk
@@ -40,6 +40,10 @@ $(eval $(call gb_Library_add_api,textconv_dict,\
 	offapi \
 ))
 
+$(eval $(call gb_Library_add_linked_libs,textconv_dict,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_Library_add_generated_exception_objects,textconv_dict,\
 	$(subst $(WORKDIR)/,,$(basename $(wildcard $(WORKDIR)/CustomTarget/i18npool/source/textconversion/*.cxx))) \
 ))
diff --git a/o3tl/CppunitTest_o3tl_tests.mk b/o3tl/CppunitTest_o3tl_tests.mk
index dc3127c..8657c60 100644
--- a/o3tl/CppunitTest_o3tl_tests.mk
+++ b/o3tl/CppunitTest_o3tl_tests.mk
@@ -1,3 +1,4 @@
+# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
 #*************************************************************************
 #
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,6 +32,7 @@ $(eval $(call gb_CppunitTest_add_package_headers,o3tl_tests,o3tl_inc))
 
 $(eval $(call gb_CppunitTest_add_linked_libs,o3tl_tests,\
 	sal \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,o3tl_tests,\
diff --git a/officecfg/CppunitTest_officecfg_cppheader_test.mk b/officecfg/CppunitTest_officecfg_cppheader_test.mk
index 65f0682..2498071 100644
--- a/officecfg/CppunitTest_officecfg_cppheader_test.mk
+++ b/officecfg/CppunitTest_officecfg_cppheader_test.mk
@@ -1,3 +1,4 @@
+## -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
 ##
 ## Version: MPL 1.1 / GPLv3+ / LGPLv3+
 ##
@@ -28,6 +29,10 @@
 
 $(eval $(call gb_CppunitTest_CppunitTest,officecfg_cppheader_test))
 
+$(eval $(call gb_CppunitTest_add_linked_libs,officecfg_cppheader_test,\
+    $(gb_STDLIBS) \
+))
+
 $(eval $(call gb_CppunitTest_add_exception_objects,officecfg_cppheader_test, \
     officecfg/qa/cppheader \
 ))
@@ -37,3 +42,5 @@ $(eval $(call gb_CppunitTest_add_api,officecfg_cppheader_test, \
 ))
 
 $(eval $(call gb_CppunitTest_add_package_headers,officecfg_cppheader_test,officecfg_cppheader))
+
+## vim: set noet sw=4 ts=4:
diff --git a/sal/Library_lo-bootstrap.mk b/sal/Library_lo-bootstrap.mk
index f334eed..a59ad5b 100644
--- a/sal/Library_lo-bootstrap.mk
+++ b/sal/Library_lo-bootstrap.mk
@@ -25,18 +25,12 @@
 # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
 # instead of those above.
 
-# Too many warnings from android_native_app_glue.[ch]
-EXTERNAL_WARNINGS_NOT_ERRORS = TRUE
-
 $(eval $(call gb_Library_Library,lo-bootstrap))
 
-# We don't want to link liblo-bootstrap.so against
-# libgnustl_shared.so. The Android dynamic linker won't find it
-# anyway. One very point of liblo-bootstrap is its wrapper for
-# dlopen() that searches also in the app's lib folder for needed
-# shared libraries.
-$(eval $(call gb_Library_add_libs,lo-bootstrap,\
-	-llog -landroid \
+# We explicitly *don't* want gb_STDLIBS to be linked here
+$(eval $(call gb_Library_add_linked_libs,lo-bootstrap,\
+	log \
+	android \
 ))
 
 $(eval $(call gb_Library_add_cobjects,lo-bootstrap,\
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index 4bf8df1..93bc646 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -55,8 +55,10 @@ $(eval $(call gb_Library_add_defs,sal,\
 
 $(eval $(call gb_Library_add_linked_libs,sal,\
 	$(if $(filter $(GUI),UNX), \
-		dl \
-		pthread \
+		$(if $(filter $(OS),ANDROID),, \
+			dl \
+			pthread \
+		) \
 	) \
 	$(if $(filter $(OS),SOLARIS), \
 		nsl \
diff --git a/scaddins/Library_analysis.mk b/scaddins/Library_analysis.mk
index eecfc7f..8c5e1ac 100644
--- a/scaddins/Library_analysis.mk
+++ b/scaddins/Library_analysis.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Library_add_linked_libs,analysis,\
 	cppuhelper \
 	sal \
 	tl \
+    $(gb_STDLIBS) \
 ))
 
 ifeq ($(GUI),WNT)
diff --git a/scaddins/Library_date.mk b/scaddins/Library_date.mk
index 6e4b11d..6366dcd 100644
--- a/scaddins/Library_date.mk
+++ b/scaddins/Library_date.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Library_add_linked_libs,date,\
 	cppuhelper \
 	sal \
 	tl \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,date,\
diff --git a/sfx2/Library_qstart.mk b/sfx2/Library_qstart.mk
index e5239f8..9b3b1be 100644
--- a/sfx2/Library_qstart.mk
+++ b/sfx2/Library_qstart.mk
@@ -70,6 +70,7 @@ $(eval $(call gb_Library_add_linked_libs,qstart_gtk,\
     utl \
     vcl \
     sfx \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_use_externals,qstart_gtk,\
diff --git a/starmath/Library_sm.mk b/starmath/Library_sm.mk
index c63aa5a..3ccf552 100644
--- a/starmath/Library_sm.mk
+++ b/starmath/Library_sm.mk
@@ -59,6 +59,7 @@ $(eval $(call gb_Library_add_linked_libs,sm,\
         utl \
         vcl \
 	xo \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,sm,\
diff --git a/vcl/Library_vclplug_kde.mk b/vcl/Library_vclplug_kde.mk
index 857d769..260dce2 100644
--- a/vcl/Library_vclplug_kde.mk
+++ b/vcl/Library_vclplug_kde.mk
@@ -73,6 +73,7 @@ $(eval $(call gb_Library_add_linked_libs,vclplug_kde,\
     Xext \
     SM \
     ICE \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_use_externals,vclplug_kde,\
diff --git a/vcl/Library_vclplug_kde4.mk b/vcl/Library_vclplug_kde4.mk
index a6ab359..6828936 100644
--- a/vcl/Library_vclplug_kde4.mk
+++ b/vcl/Library_vclplug_kde4.mk
@@ -76,6 +76,7 @@ $(eval $(call gb_Library_add_linked_libs,vclplug_kde4,\
     Xext \
     SM \
     ICE \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_use_externals,vclplug_kde4,\
diff --git a/writerperfect/Library_cdrimport.mk b/writerperfect/Library_cdrimport.mk
index b1511f8..f05990d 100644
--- a/writerperfect/Library_cdrimport.mk
+++ b/writerperfect/Library_cdrimport.mk
@@ -48,6 +48,7 @@ $(eval $(call gb_Library_add_linked_libs,cdrimport,\
 	tl \
 	utl \
 	xo \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_linked_static_libs,cdrimport,\
diff --git a/writerperfect/Library_msworks.mk b/writerperfect/Library_msworks.mk
index a00106c..5b1007f 100644
--- a/writerperfect/Library_msworks.mk
+++ b/writerperfect/Library_msworks.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_Library_add_linked_libs,msworks,\
 	tl \
 	utl \
 	xo \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_linked_static_libs,msworks,\
diff --git a/writerperfect/Library_visioimport.mk b/writerperfect/Library_visioimport.mk
index e32ea32..0036110 100644
--- a/writerperfect/Library_visioimport.mk
+++ b/writerperfect/Library_visioimport.mk
@@ -48,6 +48,7 @@ $(eval $(call gb_Library_add_linked_libs,visioimport,\
 	tl \
 	utl \
 	xo \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_linked_static_libs,visioimport,\
diff --git a/writerperfect/Library_wpft.mk b/writerperfect/Library_wpft.mk
index ecc4386..51c188d 100644
--- a/writerperfect/Library_wpft.mk
+++ b/writerperfect/Library_wpft.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_Library_add_linked_libs,wpft,\
 	ucbhelper \
 	utl \
 	xo \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_linked_static_libs,wpft,\
diff --git a/writerperfect/Library_wpgimport.mk b/writerperfect/Library_wpgimport.mk
index d83cc98..7d7883b 100644
--- a/writerperfect/Library_wpgimport.mk
+++ b/writerperfect/Library_wpgimport.mk
@@ -48,6 +48,7 @@ $(eval $(call gb_Library_add_linked_libs,wpgimport,\
 	tl \
 	utl \
 	xo \
+    $(gb_STDLIBS) \
 ))
 
 $(eval $(call gb_Library_add_linked_static_libs,wpgimport,\
commit a3c01095c0bb8c37fd8ddb9ec7f4e2df5085a81a
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Dec 19 19:27:31 2011 +0200

    Add gb_STDLIBS and override gb_Library_PLAINLIBS_NONE

diff --git a/solenv/gbuild/platform/ANDROID_ARM_GCC.mk b/solenv/gbuild/platform/ANDROID_ARM_GCC.mk
index b9235d2..309dc6a 100644
--- a/solenv/gbuild/platform/ANDROID_ARM_GCC.mk
+++ b/solenv/gbuild/platform/ANDROID_ARM_GCC.mk
@@ -33,6 +33,15 @@ gb_CFLAGS += -fno-omit-frame-pointer
 
 include $(GBUILDDIR)/platform/unxgcc.mk
 
+# Link almost everything with -lgnustl_shared
+gb_STDLIBS := \
+	gnustl_shared
+
+gb_Library_PLAINLIBS_NONE := \
+	android \
+	gnustl_shared \
+	log \
+
 # No unit testing can be run
 gb_CppunitTest_CPPTESTPRECOMMAND := :
 
@@ -58,7 +67,6 @@ $(call gb_Helper_abbreviate_dirs,\
 		-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
 		$(LIBS) \
 		$(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib))))) \
-		-llog -landroid -lgnustl_shared \
 		-o $(1))
 endef
 
commit a6eb07b239339bae9969ce294d5b98407ced5273
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Dec 19 16:53:26 2011 +0200

    Fix compiler warnings for Android

diff --git a/sal/android/lo-bootstrap.c b/sal/android/lo-bootstrap.c
index 6ac285d..47438f1 100644
--- a/sal/android/lo-bootstrap.c
+++ b/sal/android/lo-bootstrap.c
@@ -48,8 +48,12 @@
 
 #include "lo-bootstrap.h"
 
+#pragma GCC diagnostic ignored "-Wdeclaration-after-statement"
+
 #include "android_native_app_glue.c"
 
+#pragma GCC diagnostic warning "-Wdeclaration-after-statement"
+
 #undef LOGI
 #undef LOGW
 
@@ -133,10 +137,11 @@ struct cdir_end {
 /* End of Zip data structures */
 
 static void
-engine_handle_cmd(struct android_app* app,
+engine_handle_cmd(struct android_app* state,
                   int32_t cmd)
 {
-    struct engine* engine = (struct engine*)app->userData;
+    (void) state;
+
     switch (cmd) {
     case APP_CMD_SAVE_STATE:
         break;
@@ -163,7 +168,7 @@ read_section(int fd,
         free(result);
         return NULL;
     }
-    if (read(fd, result, shdr->sh_size) < shdr->sh_size) {
+    if (read(fd, result, shdr->sh_size) < (int) shdr->sh_size) {
         close(fd);
         free(result);
         return NULL;
@@ -190,10 +195,12 @@ Java_org_libreoffice_android_Bootstrap_dlneeds(JNIEnv* env,
 {
     char **needed;
     int n_needed;
-    const jbyte *libName;
+    const char *libName;
     jclass String;
     jobjectArray result;
 
+    (void) clazz;
+
     libName = (*env)->GetStringUTFChars(env, library, NULL);
 
     needed = lo_dlneeds(libName);
@@ -236,9 +243,13 @@ Java_org_libreoffice_android_Bootstrap_dlopen(JNIEnv* env,
                                               jobject clazz,
                                               jstring library)
 {
-    const jbyte *libName = (*env)->GetStringUTFChars(env, library, NULL);
-    void *p = lo_dlopen (libName);
+    const char *libName;
+    void *p;
+
+    (void) clazz;
 
+    libName = (*env)->GetStringUTFChars(env, library, NULL);
+    p = lo_dlopen (libName);
     (*env)->ReleaseStringUTFChars(env, library, libName);
 
     return (jint) p;
@@ -250,9 +261,13 @@ Java_org_libreoffice_android_Bootstrap_dlsym(JNIEnv* env,
                                              jint handle,
                                              jstring symbol)
 {
-    const jbyte *symName = (*env)->GetStringUTFChars(env, symbol, NULL);
-    void *p = lo_dlsym ((void *) handle, symName);
+    const char *symName;
+    void *p;
+
+    (void) clazz;
 
+    symName = (*env)->GetStringUTFChars(env, symbol, NULL);
+    p = lo_dlsym ((void *) handle, symName);
     (*env)->ReleaseStringUTFChars(env, symbol, symName);
 
     return (jint) p;
@@ -264,8 +279,11 @@ Java_org_libreoffice_android_Bootstrap_dlcall(JNIEnv* env,
                                               jint function,
                                               jobject argument)
 {
-    jclass StringArray = (*env)->FindClass(env, "[Ljava/lang/String;");
+    jclass StringArray;
+
+    (void) clazz;
 
+    StringArray = (*env)->FindClass(env, "[Ljava/lang/String;");
     if (StringArray == NULL) {
         LOGE("Could not find String[] class");
         return 0;
@@ -307,10 +325,12 @@ Java_org_libreoffice_android_Bootstrap_setup__Ljava_lang_String_2Ljava_lang_Stri
 {
     struct stat st;
     int i, n, fd;
-    const jbyte *dataDirPath;
-    const jbyte *apkFilePath;
+    const char *dataDirPath;
+    const char *apkFilePath;
     char *lib_dir;
 
+    (void) clazz;
+
     n = (*env)->GetArrayLength(env, ld_library_path);
 
     library_locations = malloc((n+2) * sizeof(char *));
@@ -326,7 +346,7 @@ Java_org_libreoffice_android_Bootstrap_setup__Ljava_lang_String_2Ljava_lang_Stri
     library_locations[0] = lib_dir;
 
     for (i = 0; i < n; i++) {
-        const jbyte *s = (*env)->GetStringUTFChars(env, (*env)->GetObjectArrayElement(env, ld_library_path, i), NULL);
+        const char *s = (*env)->GetStringUTFChars(env, (*env)->GetObjectArrayElement(env, ld_library_path, i), NULL);
         library_locations[i+1] = strdup(s);
         (*env)->ReleaseStringUTFChars(env, (*env)->GetObjectArrayElement(env, ld_library_path, i), s);
     }
@@ -379,6 +399,8 @@ Java_org_libreoffice_android_Bootstrap_setup__ILjava_lang_Object_2I(JNIEnv* env,
     jclass StringArray;
     int i;
 
+    (void) clazz;
+
     lo_main = lo_main_ptr;
 
     StringArray = (*env)->FindClass(env, "[Ljava/lang/String;");
@@ -396,7 +418,7 @@ Java_org_libreoffice_android_Bootstrap_setup__ILjava_lang_Object_2I(JNIEnv* env,
     lo_main_argv = malloc(sizeof(char *) * (lo_main_argc+1));
 
     for (i = 0; i < lo_main_argc; i++) {
-        const jbyte *s = (*env)->GetStringUTFChars(env, (*env)->GetObjectArrayElement(env, lo_main_argument, i), NULL);
+        const char *s = (*env)->GetStringUTFChars(env, (*env)->GetObjectArrayElement(env, lo_main_argument, i), NULL);
         lo_main_argv[i] = strdup(s);
         (*env)->ReleaseStringUTFChars(env, (*env)->GetObjectArrayElement(env, lo_main_argument, i), s);
         /* LOGI("argv[%d] = %s", i, lo_main_argv[i]); */
@@ -414,18 +436,25 @@ jint
 Java_org_libreoffice_android_Bootstrap_getpid(JNIEnv* env,
                                               jobject clazz)
 {
+    (void) env;
+    (void) clazz;
+
     return getpid();
 }
 
 
 // public static native void system(String cmdline);
 
-jint
+void
 Java_org_libreoffice_android_Bootstrap_system(JNIEnv* env,
                                               jobject clazz,
                                               jstring cmdline)
 {
-    const jbyte *s = (*env)->GetStringUTFChars(env, cmdline, NULL);
+    const char *s;
+
+    (void) clazz;
+
+    s = (*env)->GetStringUTFChars(env, cmdline, NULL);
 
     LOGI("system(%s)", s);
 
@@ -441,7 +470,11 @@ Java_org_libreoffice_android_Bootstrap_putenv(JNIEnv* env,
                                               jobject clazz,
                                               jstring string)
 {
-    const jbyte *s = (*env)->GetStringUTFChars(env, string, NULL);
+    const char *s;
+
+    (void) clazz;
+
+    s = (*env)->GetStringUTFChars(env, string, NULL);
 
     LOGI("putenv(%s)", s);
 
@@ -470,7 +503,7 @@ lo_dlneeds(const char *library)
         return NULL;
     }
 
-    if (read(fd, &hdr, sizeof(hdr)) < sizeof(hdr)) {
+    if (read(fd, &hdr, sizeof(hdr)) < (int) sizeof(hdr)) {
         LOGE("lo_dlneeds: Could not read ELF header of %s", library);
         close(fd);
         return NULL;
@@ -483,7 +516,7 @@ lo_dlneeds(const char *library)
         close(fd);
         return NULL;
     }
-    if (read(fd, &shdr, sizeof(shdr)) < sizeof(shdr)) {
+    if (read(fd, &shdr, sizeof(shdr)) < (int) sizeof(shdr)) {
         LOGE("lo_dlneeds: Could not read section header of %s", library);
         close(fd);
         return NULL;
@@ -501,7 +534,7 @@ lo_dlneeds(const char *library)
         return NULL;
     }
     for (i = 0; i < hdr.e_shnum; i++) {
-        if (read(fd, &shdr, sizeof(shdr)) < sizeof(shdr)) {
+        if (read(fd, &shdr, sizeof(shdr)) < (int) sizeof(shdr)) {
             LOGE("lo_dlneeds: Could not read section header of %s", library);
             close(fd);
             return NULL;
@@ -531,14 +564,13 @@ lo_dlneeds(const char *library)
         return NULL;
     }
     for (i = 0; i < hdr.e_shnum; i++) {
-        if (read(fd, &shdr, sizeof(shdr)) < sizeof(shdr)) {
+        if (read(fd, &shdr, sizeof(shdr)) < (int) sizeof(shdr)) {
             LOGE("lo_dlneeds: Could not read section header of %s", library);
             close(fd);
             return NULL;
         }
         if (shdr.sh_type == SHT_DYNAMIC) {
-            int dynoff;
-            int *libnames;
+            size_t dynoff;
 
             /* Count number of DT_NEEDED entries */
             n_needed = 0;
@@ -548,7 +580,7 @@ lo_dlneeds(const char *library)
                 return NULL;
             }
             for (dynoff = 0; dynoff < shdr.sh_size; dynoff += sizeof(dyn)) {
-                if (read(fd, &dyn, sizeof(dyn)) < sizeof(dyn)) {
+                if (read(fd, &dyn, sizeof(dyn)) < (int) sizeof(dyn)) {
                     LOGE("lo_dlneeds: Could not read .dynamic entry of %s", library);
                     close(fd);
                     return NULL;
@@ -569,7 +601,7 @@ lo_dlneeds(const char *library)
                 return NULL;
             }
             for (dynoff = 0; dynoff < shdr.sh_size; dynoff += sizeof(dyn)) {
-                if (read(fd, &dyn, sizeof(dyn)) < sizeof(dyn)) {
+                if (read(fd, &dyn, sizeof(dyn)) < (int) sizeof(dyn)) {
                     LOGE("lo_dlneeds: Could not read .dynamic entry in %s", library);
                     close(fd);
                     free(result);
@@ -736,7 +768,7 @@ lo_dladdr(void *addr,
         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) {
+        if (sscanf(line, "%x-%x %*s %*x %*x:%*x %*d %[^\n]", (unsigned *) &lo, (unsigned *) &hi, file) == 3) {
             /* LOGI("got %p-%p: %s", lo, hi, file); */
             if (addr >= lo && addr < hi) {
                 if (info->dli_fbase != lo) {
@@ -800,7 +832,7 @@ lo_apkentry(const char *filename,
         dirend = (struct cdir_end *)((char *)dirend - 1);
     if (letoh32(dirend->signature) != CDIR_END_SIG) {
         LOGE("lo_apkentry: Could not find end of central directory record");
-        return;
+        return NULL;
     }
 
     cdir_offset = letoh32(dirend->cdir_offset);
@@ -1019,6 +1051,9 @@ void
 Java_org_libreoffice_android_Bootstrap_patch_libgnustl_shared(JNIEnv* env,
                                                               jobject clazz)
 {
+    (void) env;
+    (void) clazz;
+
     patch_libgnustl_shared();
 }
 
diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c
index 38a49b7..2889a77 100644
--- a/sal/osl/unx/module.c
+++ b/sal/osl/unx/module.c
@@ -162,11 +162,8 @@ oslModule SAL_CALL osl_loadModuleAscii(const sal_Char *pModuleName, sal_Int32 nR
     {
 #ifndef NO_DL_FUNCTIONS
 #ifdef ANDROID
-        void *(*lo_dlopen)(const char *) = dlsym(RTLD_DEFAULT, "lo_dlopen");
-        void *pLib;
+        void *pLib = lo_dlopen(pModuleName);
         (void) nRtldMode;
-        OSL_ASSERT(lo_dlopen != NULL);
-        pLib = (*lo_dlopen)(pModuleName);
 #else
         int rtld_mode =
             ((nRtldMode & SAL_LOADMODULE_NOW) ? RTLD_NOW : RTLD_LAZY) |
diff --git a/sal/osl/unx/nlsupport.c b/sal/osl/unx/nlsupport.c
index efd68dd..da25a38 100644
--- a/sal/osl/unx/nlsupport.c
+++ b/sal/osl/unx/nlsupport.c
@@ -632,8 +632,7 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
     /* search the codeset in our language list */
     if ( codeset != NULL )
     {
-        const unsigned int members = sizeof(_nl_language_list) / sizeof(_pair);
-        language = _pair_search (codeset, _nl_language_list, members);
+        language = _pair_search (codeset, _nl_language_list, SAL_N_ELEMENTS( _nl_language_list ) );
     }
 
     OSL_ASSERT( language && ( RTL_TEXTENCODING_DONTKNOW != language->value ) );
@@ -816,8 +815,7 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
     if( _compose_locale( pLocale, locale_buf, 64 ) )
     {
         /* check special handling list (EUC) first */
-        const unsigned int members = sizeof( _full_locale_list ) / sizeof( _pair );
-        language = _pair_search( locale_buf, _full_locale_list, members);
+        language = _pair_search( locale_buf, _full_locale_list, SAL_N_ELEMENTS( _full_locale_list ) );
 
         if( NULL == language )
         {
@@ -830,20 +828,17 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
 
             if( NULL != cp )
             {
-                const unsigned int members = sizeof( _locale_extension_list ) / sizeof( _pair );
-                language = _pair_search( cp + 1, _locale_extension_list, members);
+                language = _pair_search( cp + 1, _locale_extension_list, SAL_N_ELEMENTS( _locale_extension_list ) );
             }
         }
 
         /* use iso language code to determine the charset */
         if( NULL == language )
         {
-            const unsigned int members = sizeof( _iso_language_list ) / sizeof( _pair );
-
             /* iso lang codes have 2 charaters */
             locale_buf[2] = '\0';
 
-            language = _pair_search( locale_buf, _iso_language_list, members);
+            language = _pair_search( locale_buf, _iso_language_list, SAL_N_ELEMENTS( _iso_language_list ) );
         }
     }
 
diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c
index b5d80f1..4128d08 100644
--- a/sal/osl/unx/thread.c
+++ b/sal/osl/unx/thread.c
@@ -268,10 +268,17 @@ static void* osl_thread_start_Impl (void* pData)
     /* Check if thread is started in SUSPENDED state */
     while (pImpl->m_Flags & THREADIMPL_FLAGS_SUSPENDED)
     {
+#ifdef ANDROID
+/* Avoid compiler warning: declaration of '__cleanup' shadows a previous local */
+#define __cleanup __cleanup_2
+#endif
         /* wait until SUSPENDED flag is cleared */
         pthread_cleanup_push (osl_thread_wait_cleanup_Impl, &(pImpl->m_Lock));
         pthread_cond_wait (&(pImpl->m_Cond), &(pImpl->m_Lock));
         pthread_cleanup_pop (0);
+#ifdef ANDROID
+#undef __cleanup
+#endif
     }
 
     /* check for SUSPENDED to TERMINATE state change */
commit 74b9ddd6aba2adfb43a0993306853e2fed821533
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Dec 19 15:45:17 2011 +0200

    Always use the autoconfed sizes and alignments, not only when cross-compiling

diff --git a/sal/Executable_typesconfig.mk b/sal/Executable_typesconfig.mk
deleted file mode 100644
index db0cc3a..0000000
--- a/sal/Executable_typesconfig.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
-#
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2011 Matúš Kukan <matus.kukan at gmail.com> (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Executable_Executable,typesconfig))
-
-$(eval $(call gb_Executable_add_defs,typesconfig,\
-	$(LFS_CFLAGS) \
-))
-
-$(eval $(call gb_Executable_add_cobjects,typesconfig,\
-	sal/typesconfig/typesconfig \
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk
index a1e442d..b4f27b2 100644
--- a/sal/Module_sal.mk
+++ b/sal/Module_sal.mk
@@ -30,8 +30,6 @@ $(eval $(call gb_Module_Module,sal))
 
 $(eval $(call gb_Module_add_targets,sal,\
 	Executable_cppunittester \
-	$(if $(filter $(CROSS_COMPILING),YES)$(filter $(COM),MSC),, \
-		Executable_typesconfig) \
 	$(if $(filter $(OS),ANDROID), \
 		Library_lo-bootstrap) \
 	Library_sal \
diff --git a/sal/Package_generated.mk b/sal/Package_generated.mk
index e2cad8e..6c946ff 100644
--- a/sal/Package_generated.mk
+++ b/sal/Package_generated.mk
@@ -29,12 +29,6 @@ $(eval $(call gb_Package_Package,sal_generated,$(WORKDIR)/CustomTarget/sal/util)
 
 $(eval $(call gb_Package_add_customtarget,sal_generated,sal/util))
 
-ifneq ($(OS),WNT)
-$(eval $(call gb_CustomTarget_add_outdir_dependencies,sal/util,\
-	$(call gb_Executable_get_target,typesconfig) \
-))
-endif
-
 $(eval $(call gb_Package_add_file,sal_generated,inc/rtlbootstrap.mk,rtlbootstrap.mk))
 $(eval $(call gb_Package_add_file,sal_generated,inc/sal/udkversion.h,sal/udkversion.h))
 
diff --git a/sal/util/Makefile b/sal/util/Makefile
index ad39b24..87b3e29 100644
--- a/sal/util/Makefile
+++ b/sal/util/Makefile
@@ -38,10 +38,6 @@ rtlbootstrap.mk: sal/typesizes.h
 	$(CXX) -E $(gb_OSDEFS) $(gb_CXXFLAGS) -D$(CPUNAME) -I. -I$(SRCDIR)/sal/rtl/source -I$(SRCDIR)/sal/inc bootstrap.cxx | grep '^RTL_' | sed -e 's/"//g' > $@
 
 sal/typesizes.h: sal
-ifneq ($(CROSS_COMPILING),YES)
-	$(gb_Helper_execute)typesconfig $@ > /dev/null
-
-else
 	echo '/* This file is autogenerated from configure script data */' > $@
 	echo >> $@
 	echo "#define SAL_TYPES_ALIGNMENT2	$(ALIGNOF_SHORT)" >> $@
@@ -59,8 +55,6 @@ endif
 	echo "#define SAL_TYPES_SIZEOFLONGLONG	$(SIZEOF_LONGLONG)" >> $@
 	echo "#define SAL_TYPES_SIZEOFPOINTER	$(SIZEOF_POINTER)" >> $@
 
-endif
-
 include $(SRCDIR)/solenv/inc/udkversion.mk
 
 sal/udkversion.h: sal


More information about the Libreoffice-commits mailing list