This is an automated email from the git hooks/post-receive script. rene pushed a commit to branch debian-experimental-5.1 in repository libreoffice.
commit 4d0c964951697d437c6d12a70e64d73bae6b81a4 Author: Rene Engelhard <r...@debian.org> Date: Wed Jan 20 14:34:45 2016 +0100 fix gcc6 build --- changelog | 5 + patches/GCC-6-PR69273-workaround.diff | 50 +++++++++ patches/gcc-6.diff | 187 ++++++++++++++++++++++++++++++++++ patches/series | 2 + 4 files changed, 244 insertions(+) diff --git a/changelog b/changelog index 390ba7b..2950a6f 100644 --- a/changelog +++ b/changelog @@ -1,5 +1,10 @@ libreoffice (1:5.1.0~rc2-2) UNRELEASED; urgency=medium + * debian/patches/gcc-6.diff: backport gcc 6 compile/test fixes from master + (closes: #811686) + * debian/patches/GCC-6-PR69273-workaround.diff: add gcc 6 ICE workaround + from Stephan Bergmann + * debian/rules: - -officebean is a arch-dep package, move pom generation and mh_* calls for it to install-arch... diff --git a/patches/GCC-6-PR69273-workaround.diff b/patches/GCC-6-PR69273-workaround.diff new file mode 100644 index 0000000..7297a4c --- /dev/null +++ b/patches/GCC-6-PR69273-workaround.diff @@ -0,0 +1,50 @@ +From 772ae03e1e680106dcdd08fae51d15d9df7c7931 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sberg...@redhat.com> +Date: Wed, 20 Jan 2016 09:34:57 +0100 +Subject: [PATCH 1/2] GCC 6 PR69273 workaround + +see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69273> + +Change-Id: I4a9ba50f68f3f08f878c530f05a18b2b63f29b2a +--- + sc/source/filter/oox/autofiltercontext.cxx | 3 ++- + sc/source/filter/oox/pivottablefragment.cxx | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/sc/source/filter/oox/autofiltercontext.cxx b/sc/source/filter/oox/autofiltercontext.cxx +index 11f0da8..671de7e 100644 +--- a/sc/source/filter/oox/autofiltercontext.cxx ++++ b/sc/source/filter/oox/autofiltercontext.cxx +@@ -35,10 +35,11 @@ FilterSettingsContext::FilterSettingsContext( WorksheetContextBase& rParent, Fil + + ContextHandlerRef FilterSettingsContext::onCreateContext( sal_Int32 nElement, const AttributeList& /*rAttribs*/ ) + { ++ ContextHandlerRef gcc_pr69273_workaround(this); + switch( getCurrentElement() ) + { + case XLS_TOKEN( filters ): +- if( nElement == XLS_TOKEN( filter ) ) return this; ++ if( nElement == XLS_TOKEN( filter ) ) return gcc_pr69273_workaround; + break; + case XLS_TOKEN( customFilters ): + if( nElement == XLS_TOKEN( customFilter ) ) return this; +diff --git a/sc/source/filter/oox/pivottablefragment.cxx b/sc/source/filter/oox/pivottablefragment.cxx +index ca26708..fc4817d 100644 +--- a/sc/source/filter/oox/pivottablefragment.cxx ++++ b/sc/source/filter/oox/pivottablefragment.cxx +@@ -113,10 +113,11 @@ PivotTableFilterContext::PivotTableFilterContext( WorksheetFragmentBase& rFragme + + ContextHandlerRef PivotTableFilterContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) + { ++ ContextHandlerRef gcc_pr69273_workaround(this); + switch( getCurrentElement() ) + { + case XLS_TOKEN( filter ): +- if( nElement == XLS_TOKEN( autoFilter ) ) return this; ++ if( nElement == XLS_TOKEN( autoFilter ) ) return gcc_pr69273_workaround; + break; + case XLS_TOKEN( autoFilter ): + if( nElement == XLS_TOKEN( filterColumn ) ) return this; +-- +2.4.3 + diff --git a/patches/gcc-6.diff b/patches/gcc-6.diff new file mode 100644 index 0000000..d69e11b --- /dev/null +++ b/patches/gcc-6.diff @@ -0,0 +1,187 @@ +From 352f9fdff619b5a0a1414c29cfc47068165a599c Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sberg...@redhat.com> +Date: Tue, 19 Jan 2016 10:43:21 +0100 +Subject: -Werror=shift-negative-value (GCC 6) + +Change-Id: Ifc7b1d6675a8e8fb41dd47cc1282059c3790736f + +diff --git a/basebmp/inc/packedpixeliterator.hxx b/basebmp/inc/packedpixeliterator.hxx +index 776a45e..693f59b 100644 +--- a/basebmp/inc/packedpixeliterator.hxx ++++ b/basebmp/inc/packedpixeliterator.hxx +@@ -78,7 +78,7 @@ public: + num_intraword_positions=sizeof(value_type)*8/bits_per_pixel, + /** Bit mask for one pixel (least significant bits) + */ +- bit_mask=~(~0 << bits_per_pixel) ++ bit_mask=~(~0u << bits_per_pixel) + }; + + private: +@@ -238,7 +238,7 @@ public: + num_intraword_positions=sizeof(value_type)*8/bits_per_pixel, + /** Bit mask for one pixel (least significant bits) + */ +- bit_mask=~(~0 << bits_per_pixel) ++ bit_mask=~(~0u << bits_per_pixel) + }; + + private: +@@ -477,7 +477,7 @@ public: + num_intraword_positions=sizeof(value_type)*8/bits_per_pixel, + /** Bit mask for one pixel (least significant bits) + */ +- bit_mask=~(~0 << bits_per_pixel) ++ bit_mask=~(~0u << bits_per_pixel) + }; + + // TODO(F2): direction of iteration (ImageIterator can be made to +-- +cgit v0.10.2 + +From 4a5dda084a8257bde6d89f7657a54def9e286c21 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sberg...@redhat.com> +Date: Tue, 19 Jan 2016 11:30:12 +0100 +Subject: Make sure desktop under LOK does not see osl_setCommandArgs + CommandLineArgs + +Our sal/cppunittester/cppunittester.cxx uses SAL_IMPLEMENT_MAIN, so forwards the +cmd line args to osl_setCommandArgs. CppunitTest_libreofficekit_tiledrendering +(run via that cppunittester) starts LOK, which starts SVMain on a lo_startmain +thread, which calls deskopt::DispatchWatcher::executeDispatchRequests to process +any cmd line arg requests to open documents. It sees the +libtest_libreofficekit_tiledrendering.so (or .dylib/.dll) passed to +cppunittester, and tries to open it as a LO document. Type detection will +typically determine it is plain text that should be opened with Writer, which +will succeed. But when the .so is built with GCC 6, it happens to be detected +as a MacPaint document, loading which fails, so that executeDispatchRequests +(desktop/source/app/dispatchwatcher.cxx) will call xDesktop->terminate(), which +unwinds that lo_startmain thread (DeInitVCL etc.). But the main cppunittester +thread is still calling into LOK, which is under the assumption that VCL etc. is +still functional, and somewhat random crashes will happen. + +Change-Id: Ie7b00e797a0f3223b3942bb63a31aa9c44370247 + +diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx +index aa65234..b2b1ba8 100644 +--- a/desktop/source/app/cmdlineargs.cxx ++++ b/desktop/source/app/cmdlineargs.cxx +@@ -30,6 +30,7 @@ + #include <rtl/uri.hxx> + #include <rtl/ustring.hxx> + #include <rtl/process.h> ++#include <comphelper/lok.hxx> + #include <comphelper/processfactory.hxx> + #include <com/sun/star/uri/ExternalUriReferenceTranslator.hpp> + #include <tools/getprocessworkingdir.hxx> +@@ -70,7 +71,9 @@ std::vector< OUString > translateExternalUris( + class ExtCommandLineSupplier: public CommandLineArgs::Supplier { + public: + explicit ExtCommandLineSupplier(): +- m_count(rtl_getAppCommandArgCount()), ++ m_count( ++ comphelper::LibreOfficeKit::isActive() ++ ? 0 : rtl_getAppCommandArgCount()), + m_index(0) + { + OUString url; +-- +cgit v0.10.2 + +From 96fea1a05d2cfb0173f292f59018c997d2f63c89 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sberg...@redhat.com> +Date: Tue, 19 Jan 2016 10:46:13 +0100 +Subject: Make enumarray_iterator adhere to iterator requirements + +...or else using it with GCC 6 libstdc++ std::find causes compilation failures + +Change-Id: I95e674922348f72fab6da8f049b2b4fcbdc74d07 + +diff --git a/include/o3tl/enumarray.hxx b/include/o3tl/enumarray.hxx +index a6861c1..c264c2f 100644 +--- a/include/o3tl/enumarray.hxx ++++ b/include/o3tl/enumarray.hxx +@@ -22,6 +22,7 @@ + + #include <sal/config.h> + #include <iterator> ++#include <type_traits> + + namespace o3tl { + +@@ -86,7 +87,10 @@ public: + typedef typename EA::value_type value_type; + typedef typename EA::key_type key_type; + typedef std::bidirectional_iterator_tag iterator_category; //should be random access, but that would require define subtraction operators on the enums +- typedef typename EA::key_type difference_type; ++ typedef ++ typename std::make_signed< ++ typename std::underlying_type<typename EA::key_type>::type>::type ++ difference_type; + typedef typename EA::value_type* pointer; + typedef typename EA::value_type& reference; + +@@ -95,8 +99,8 @@ public: + value_type &operator*() { return (*m_buf)[static_cast<key_type>(m_pos)]; } + value_type *operator->() { return &(operator*()); } + self_type &operator++() { ++m_pos; return *this; } +- bool operator!=(const self_type& other) { return m_buf != other.m_buf || m_pos != other.m_pos; } +- bool operator==(const self_type& other) { return m_buf == other.m_buf && m_pos == other.m_pos; } ++ bool operator!=(const self_type& other) const { return m_buf != other.m_buf || m_pos != other.m_pos; } ++ bool operator==(const self_type& other) const { return m_buf == other.m_buf && m_pos == other.m_pos; } + }; + + }; // namespace o3tl +-- +cgit v0.10.2 + +From 8d1a24dae03690b576310e3539369916f31ac475 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann <sberg...@redhat.com> +Date: Tue, 19 Jan 2016 10:58:44 +0100 +Subject: Make virtual ~ScValidationDlg non-inline + +...otherwise, GCC 6 would aggressively inline ScValidationDlg destruction of the +VclPtr<ScValidationDlg> 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 + +diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx +index 459c5d7..db73012 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 2ef7738..8849557 100644 +--- a/sc/source/ui/inc/validate.hxx ++++ b/sc/source/ui/inc/validate.hxx +@@ -176,7 +176,7 @@ class ScValidationDlg + + public: + explicit ScValidationDlg( vcl::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = nullptr ); +- virtual ~ScValidationDlg() { disposeOnce(); } ++ virtual ~ScValidationDlg(); + virtual void dispose() override + { + if( m_bOwnRefHdlr ) +-- +cgit v0.10.2 + diff --git a/patches/series b/patches/series index d387e3c..fcbe8ce 100644 --- a/patches/series +++ b/patches/series @@ -29,3 +29,5 @@ gcj-no-bitness-check.diff rsc-no-error-about-unknown-switch.diff debian-branding.diff disable-npapi-plugin-support.diff +gcc-6.diff +GCC-6-PR69273-workaround.diff -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git