summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-08-18 11:48:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-08-18 12:52:23 +0000
commit6782d9991c942042c9a959b57355b4bbce5cb314 (patch)
tree4f7d6ad94612fd24d8d11943d78b8881abbce5b4
parented815a242ef962afa52033a0d94ba6aa4539dd07 (diff)
external/firebird: Make GCC check work for Clang, too
Randomly approximate that HAVE_GXX_FNO_SIZED_DEALLOCATION also implies support for -fno-delete-null-pointer-checks, and hope that approximation matches the various versions of GCC and Clang that are relevant for us. Change-Id: I265bf3432a852a094318a54975403eac60721ab4 Reviewed-on: https://gerrit.libreoffice.org/28211 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac17
-rw-r--r--external/firebird/ExternalProject_firebird.mk2
3 files changed, 19 insertions, 1 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index f85bf53ceabc..3e5b286878fb 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -250,6 +250,7 @@ export HAVE_GCC_FINLINE_LIMIT=@HAVE_GCC_FINLINE_LIMIT@
export HAVE_GCC_FNO_DEFAULT_INLINE=@HAVE_GCC_FNO_DEFAULT_INLINE@
export HAVE_GCC_FNO_ENFORCE_EH_SPECS=@HAVE_GCC_FNO_ENFORCE_EH_SPECS@
export HAVE_GCC_FNO_INLINE=@HAVE_GCC_FNO_INLINE@
+export HAVE_GCC_FNO_SIZED_DEALLOCATION=@HAVE_GCC_FNO_SIZED_DEALLOCATION@
export HAVE_GCC_GGDB2=@HAVE_GCC_GGDB2@
export HAVE_GCC_PRAGMA_OPERATOR=@HAVE_GCC_PRAGMA_OPERATOR@
export HAVE_GCC_VISIBILITY_BROKEN=@HAVE_GCC_VISIBILITY_BROKEN@
diff --git a/configure.ac b/configure.ac
index 75b28b249271..6e1483688783 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6449,6 +6449,23 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
fi
AC_SUBST(HAVE_GCC_PRAGMA_OPERATOR)
+HAVE_GCC_FNO_FNO_SIZED_DEALLOCATION=
+if test "$GCC" = yes; then
+ AC_MSG_CHECKING([whether $CXX supports -fno-sized-deallocation])
+ AC_LANG_PUSH([C++])
+ save_CXXFLAGS=$CXXFLAGS
+ CXXFLAGS="$CXXFLAGS -fno-sized-deallocation"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM()],[HAVE_GCC_FNO_SIZED_DEALLOCATION=TRUE])
+ CXXFLAGS=$save_CXXFLAGS
+ AC_LANG_POP([C++])
+ if test "$HAVE_GCC_FNO_SIZED_DEALLOCATION" = TRUE; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+fi
+AC_SUBST([HAVE_GCC_FNO_SIZED_DEALLOCATION])
+
dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================
diff --git a/external/firebird/ExternalProject_firebird.mk b/external/firebird/ExternalProject_firebird.mk
index b30fe9235330..f3e6c9c60e60 100644
--- a/external/firebird/ExternalProject_firebird.mk
+++ b/external/firebird/ExternalProject_firebird.mk
@@ -56,7 +56,7 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
" \
&& export CXXFLAGS=" \
$(if $(filter MSC,$(COM)),$(if $(MSVC_USE_DEBUG_RUNTIME),-DMSVC_USE_DEBUG_RUNTIME)) \
- $(if $(shell test '$(GCC_VERSION)' -ge 600 && echo yes),-fno-sized-deallocation -fno-delete-null-pointer-checks,) \
+ $(if $(HAVE_GCC_FNO_SIZED_DEALLOCATION),-fno-sized-deallocation -fno-delete-null-pointer-checks) \
$(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS), \
$(BOOST_CPPFLAGS) \
-L$(call gb_UnpackedTarball_get_dir,boost)/source/lib \