From 1531df0d49476114002711a830a5656787e91e2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Tue, 3 Jul 2018 19:24:48 +0200 Subject: [PATCH] libreoffice: fix build with gcc8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- ...e-virtual-ScValidationDlg-non-inline.patch | 60 +++++++++++++++++++ .../libreoffice/libreoffice.inc | 1 + 2 files changed, 61 insertions(+) create mode 100644 recipes-libreoffice/libreoffice/files/0008-Make-virtual-ScValidationDlg-non-inline.patch diff --git a/recipes-libreoffice/libreoffice/files/0008-Make-virtual-ScValidationDlg-non-inline.patch b/recipes-libreoffice/libreoffice/files/0008-Make-virtual-ScValidationDlg-non-inline.patch new file mode 100644 index 0000000..3c34bd6 --- /dev/null +++ b/recipes-libreoffice/libreoffice/files/0008-Make-virtual-ScValidationDlg-non-inline.patch @@ -0,0 +1,60 @@ +From a6a65ecdef3a577b537b5d9fccb9d41e585b9f14 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 19 Jan 2016 10:58:44 +0100 +Subject: [PATCH] Make virtual ~ScValidationDlg non-inline + +...otherwise, GCC 6 would aggressively inline ScValidationDlg destruction of the +VclPtr in ScValidityRefChildWin::ScValidityRefChildWin +(sc/source/ui/view/reffact.cxx, in sc library), checking whether the vtable +points at ~ScValidationDlg (instead of a derived class dtor) to directly inline +the ~ScValidationDlg code, which requires the ScValidateionDlg vtable (to store +it in the object's vtable during destruction), which requires the code of inline +virtual ScValidationDlg::dispose and ScValidationDlg::Close, which in turn need +the addresses of (non-inline) ScValidationDlg::RemoveRefDlg and +ScTPValidationValue::RemoveRefDlg, both defined in the scui library and not +exported from there. + +Change-Id: I7eb96f42deb5edd844d91e999aa5511679302c01 +(cherry picked from commit 8d1a24dae03690b576310e3539369916f31ac475) +Reviewed-on: https://gerrit.libreoffice.org/21637 +Reviewed-by: Eike Rathke +Tested-by: Eike Rathke + +Upstream-Status: Backported +--- + sc/source/ui/dbgui/validate.cxx | 5 +++++ + sc/source/ui/inc/validate.hxx | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx +index 459c5d731fc7..db7301280b1e 100644 +--- a/sc/source/ui/dbgui/validate.cxx ++++ b/sc/source/ui/dbgui/validate.cxx +@@ -96,6 +96,11 @@ ScValidationDlg::ScValidationDlg(vcl::Window* pParent, const SfxItemSet* pArgSet + get(m_pHBox, "refinputbox"); + } + ++ScValidationDlg::~ScValidationDlg() ++{ ++ disposeOnce(); ++} ++ + void ScTPValidationValue::SetReferenceHdl( const ScRange&rRange , ScDocument* pDoc ) + { + if ( rRange.aStart != rRange.aEnd ) +diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx +index d39b99b12bac..1e785b7942de 100644 +--- a/sc/source/ui/inc/validate.hxx ++++ b/sc/source/ui/inc/validate.hxx +@@ -182,7 +182,7 @@ class ScValidationDlg + + public: + explicit ScValidationDlg( vcl::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = NULL ); +- virtual ~ScValidationDlg() { disposeOnce(); } ++ virtual ~ScValidationDlg(); + virtual void dispose() SAL_OVERRIDE + { + if( m_bOwnRefHdlr ) +-- +2.14.4 + diff --git a/recipes-libreoffice/libreoffice/libreoffice.inc b/recipes-libreoffice/libreoffice/libreoffice.inc index 43bd492..9c61f8a 100644 --- a/recipes-libreoffice/libreoffice/libreoffice.inc +++ b/recipes-libreoffice/libreoffice/libreoffice.inc @@ -17,6 +17,7 @@ SRC_URI += " \ file://0005-packedpixeliterator.hxx-fix-typo-detected-by-gcc7.patch \ file://0006-Fix-build-with-recent-icu.patch \ file://0007-fix-build-with-poppler-0.64.patch \ + file://0008-Make-virtual-ScValidationDlg-non-inline.patch \ " SRCREV_unoconv = "260b815bf2c57118df439f381974f3f0987222a1"