external/firebird/ExternalProject_firebird.mk |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8ea07101c1613d213fd7cea17f094a947b14cd00
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Thu Feb 16 14:25:15 2017 +0100

    external/firebird: Work around operator new alignment violations
    
    ...causing problems at least when building with recent Clang trunk on
    x86_64-unknown-linux-gnu:
    
    > make[5]: Entering directory 'workdir/UnpackedTarball/firebird/gen'
    > rm -f metadata.fdb
    > core/workdir/UnpackedTarball/firebird/gen/Release/firebird/bin/isql -q -i 
workdir/UnpackedTarball/firebird/src/dbs/metadata.sql
    > Makefile:325: recipe for target 'metadata.fdb' failed
    > make[5]: *** [metadata.fdb] Segmentation fault (core dumped)
    
    See the mail thread starting at
    
<https://sourceforge.net/p/firebird/mailman/firebird-devel/thread/ec7c3bb1-3fef-e9b8-5b23-0d07fc412f95%40redhat.com/#msg35669676>
    "[Firebird-devel] alloc.h global operator new replacement violating 
alignment
    requirements".  With DEBUG_GDS_ALLOC defined, the allocation functions 
defined
    in src/common/classes/alloc.h are no longer replacements of standard 
allocation
    functions, so Clang happens to not make aggressive alignment assumptions, 
see
    the mail thread starting at
    <http://lists.llvm.org/pipermail/cfe-dev/2017-February/052676.html> 
"[cfe-dev]
    operator new alignment assumptions".
    
    (Instead of always defining DEBUG_GDS_ALLOC, I first tried to comment out 
the
    definitions of global operator new/delete replacement functions in alloc.h,
    falling back to the compiler-provided versions.  But many places in Firebird
    allocate via Firebird-specific operator new placement overrides and 
deallocate
    via delete expressions, which happens to work at runtime when the 
replaceable
    operator delete is Firebird's, but not when it is the compiler-provided 
one.)
    
    Change-Id: Ie02adb440fa959b723983d7f5b0246d3634dc06b

diff --git a/external/firebird/ExternalProject_firebird.mk 
b/external/firebird/ExternalProject_firebird.mk
index f76606d..762e94d 100644
--- a/external/firebird/ExternalProject_firebird.mk
+++ b/external/firebird/ExternalProject_firebird.mk
@@ -54,6 +54,8 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
                        " \
                && export CXXFLAGS=" \
                        $(if $(filter MSC,$(COM)),$(if 
$(MSVC_USE_DEBUG_RUNTIME),-DMSVC_USE_DEBUG_RUNTIME)) \
+                       $(if $(filter 
LINUX/X86_64/TRUE,$(OS)/$(CPUNAME)/$(COM_IS_CLANG)), \
+                               -DDEBUG_GDS_ALLOC) \
                        $(if 
$(HAVE_GCC_FNO_SIZED_DEALLOCATION),-fno-sized-deallocation 
-fno-delete-null-pointer-checks) \
                        $(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS), \
                                $(BOOST_CPPFLAGS) \
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to