config_host.mk.in                             |    1 +
 configure.ac                                  |   17 +++++++++++++++++
 external/firebird/ExternalProject_firebird.mk |    2 +-
 3 files changed, 19 insertions(+), 1 deletion(-)

New commits:
commit 6782d9991c942042c9a959b57355b4bbce5cb314
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Thu Aug 18 11:48:26 2016 +0200

    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 <c...@libreoffice.org>
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/config_host.mk.in b/config_host.mk.in
index f85bf53..3e5b286 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 75b28b2..6e14836 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 b30fe92..f3e6c9c 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 \
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to