[Libreoffice-commits] core.git: config_host.mk.in configure.ac liborcus/ExternalProject_liborcus.mk

Peter Foley pefoley2 at verizon.net
Sat Mar 2 10:01:37 PST 2013


 config_host.mk.in                    |    1 +
 configure.ac                         |   22 +++++++++++++++++++++-
 liborcus/ExternalProject_liborcus.mk |    4 +++-
 3 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit d79bdca7e472c25973388daafdae34d49e393180
Author: Peter Foley <pefoley2 at verizon.net>
Date:   Sat Mar 2 12:57:39 2013 -0500

    fix build on android with gcc 4.7
    
    See https://code.google.com/p/android/issues/detail?id=41770
    
    Change-Id: I555c1e9b8b15afd78b07b1c7b12a0b37d1112f9a

diff --git a/config_host.mk.in b/config_host.mk.in
index 8dd533a..11d95cd 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -32,6 +32,7 @@ export ATL_LIB=@ATL_LIB@
 export AWTLIB=@AWTLIB@
 export BARCODE_EXTENSION_PACK=@BARCODE_EXTENSION_PACK@
 export BOOST_CPPFLAGS=@BOOST_CPPFLAGS@
+export BOOST_CXXFLAGS=@BOOST_CXXFLAGS@
 export BOOST_DATE_TIME_LIB=@BOOST_DATE_TIME_LIB@
 export BOOST_LDFLAGS=@BOOST_LDFLAGS@
 export BOOST_SYSTEM_LIB=@BOOST_SYSTEM_LIB@
diff --git a/configure.ac b/configure.ac
index 45980d8..62d2f78 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5005,7 +5005,7 @@ if test "$GXX" = "yes"; then
             fi
         fi
         if test "$_gpp_majmin" -ge "401"; then
-            AC_MSG_ERROR([You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly])
+            AC_MSG_ERROR([You need to use the g++-4.0 compiler (g++ $_gpp_version will not work with the MacOSX10.4u.sdk) - set CXX accordingly])
         else
             AC_MSG_RESULT([implicitly using CXX=$CXX])
         fi
@@ -5036,7 +5036,27 @@ if test "$GXX" = "yes"; then
             }
             ]])],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents LibreOffice from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])],[AC_MSG_RESULT([no])],[])
     fi
+    dnl see https://code.google.com/p/android/issues/detail?id=41770
+    if test "$_gpp_majmin" -ge "407"; then
+            glibcxx_threads=no
+            AC_MSG_CHECKING([whether $CXX is broken with boost.thread])
+            AC_LANG_PUSH([C++])
+            AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+                #include <bits/c++config.h>]],[[
+                #if !defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
+                && !defined(_GLIBCXX__PTHREADS) \
+                && !defined(_GLIBCXX_HAS_GTHREADS)
+                choke me
+                #endif
+            ]])],[AC_MSG_RESULT([yes])
+            glibcxx_threads=yes],[AC_MSG_RESULT([no])])
+            AC_LANG_POP([C++])
+            if test $glibcxx_threads = yes; then
+                  BOOST_CXXFLAGS="-D_GLIBCXX_HAS_GTHREADS"
+            fi
+     fi
 fi
+AC_SUBST(BOOST_CXXFLAGS)
 
 #
 # prefx CXX with ccache if needed
diff --git a/liborcus/ExternalProject_liborcus.mk b/liborcus/ExternalProject_liborcus.mk
index 7b12302..e932648 100644
--- a/liborcus/ExternalProject_liborcus.mk
+++ b/liborcus/ExternalProject_liborcus.mk
@@ -67,7 +67,9 @@ $(call gb_ExternalProject_get_state_target,liborcus,build) :
 			--disable-spreadsheet-model \
 			--disable-werror \
 			$(if $(filter LINUX FREEBSD OPENBSD NETBSD DRAGONFLY ANDROID,$(OS)),$(if $(gb_ENABLE_DBGUTIL),CPPFLAGS=-D_GLIBCXX_DEBUG)) \
-			$(if $(filter NO,$(SYSTEM_BOOST)),CXXFLAGS=-I$(call gb_UnpackedTarball_get_dir,boost),CXXFLAGS=$(BOOST_CPPFLAGS) LDFLAGS=$(BOOST_LDFLAGS)) \
+			CXXFLAGS="$(BOOST_CXXFLAGS) $(if $(filter NO,$(SYSTEM_BOOST)),\
+			-I$(call gb_UnpackedTarball_get_dir,boost),$(BOOST_CPPFLAGS))" \
+			$(if $(filter YES,$(SYSTEM_BOOST)),LDFLAGS=$(BOOST_LDFLAGS)) \
 			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
 		&& $(MAKE) \
 	)


More information about the Libreoffice-commits mailing list