fix build on android with gcc 4.7
See https://code.google.com/p/android/issues/detail?id=41770 Change-Id: I555c1e9b8b15afd78b07b1c7b12a0b37d1112f9a
This commit is contained in:
parent
5b272379db
commit
d79bdca7e4
3 changed files with 25 additions and 2 deletions
|
@ -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@
|
||||
|
|
22
configure.ac
22
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
|
||||
|
|
|
@ -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) \
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue