[libreoffice] 01/01: add patch from John Paul Adrian Glaubitz to fix m68k alignment
Rene Engelhard
rene at moszumanska.debian.org
Tue Dec 6 20:57:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
rene pushed a commit to branch debian-experimental-5.3
in repository libreoffice.
commit 2e562ae1ad0507f285378e601883ec1898393932
Author: Rene Engelhard <rene at debian.org>
Date: Tue Dec 6 20:25:58 2016 +0100
add patch from John Paul Adrian Glaubitz to fix m68k alignment
---
changelog | 7 ++-
patches/m68k-alignment.diff | 112 ++++++++++++++++++++++++++++++++++++++++++++
patches/series | 1 +
3 files changed, 118 insertions(+), 2 deletions(-)
diff --git a/changelog b/changelog
index 6c4244d..2703c57 100644
--- a/changelog
+++ b/changelog
@@ -1,13 +1,16 @@
-libreoffice (1:5.3.0~beta2~git20161204-1) UNRELEASED; urgency=medium
+libreoffice (1:5.3.0~beta2~git20161205-1) UNRELEASED; urgency=medium
* New upstream snapshot
+ * debian/patches/m68k-alignment.diff: add patch from John Paul Adrian
+ Glaubitz to fix m68k alignment
+
* debian/libreoffice-sdbc-firebird.NEWS: add NEWS entry about the format
incompatibility
* debian/rules: revert ENABLE_GDRIVE=y on arm* as chromium got uploaded
without it to sid and it's gone from experimental again on those
- -- Rene Engelhard <rene at debian.org> Sun, 04 Dec 2016 19:35:24 +0100
+ -- Rene Engelhard <rene at debian.org> Tue, 06 Dec 2016 19:53:58 +0100
libreoffice (1:5.3.0~beta1-1) experimental; urgency=medium
diff --git a/patches/m68k-alignment.diff b/patches/m68k-alignment.diff
new file mode 100644
index 0000000..d8fe5ec
--- /dev/null
+++ b/patches/m68k-alignment.diff
@@ -0,0 +1,112 @@
+Description: Add support for 16-bit alignment of 8-byte types (m68k)
+ Please do not apply upstream yet!
+ .
+
+Index: libreoffice-5.2.4~rc1/cppu/source/uno/check.cxx
+===================================================================
+--- libreoffice-5.2.4~rc1.orig/cppu/source/uno/check.cxx
++++ libreoffice-5.2.4~rc1/cppu/source/uno/check.cxx
+@@ -151,7 +151,10 @@ static_assert( static_cast<sal_Bool>(tru
+ "must be binary compatible" );
+ static_assert( static_cast<sal_Bool>(false) == sal_False,
+ "must be binary compatible" );
+-#if SAL_TYPES_ALIGNMENT8 == 4
++#if SAL_TYPES_ALIGNMENT8 == 2
++static_assert(offsetof(AlignSize_Impl, dDouble) == 2, "offsetof(AlignSize_Impl, dDouble) != 2");
++static_assert(sizeof(AlignSize_Impl) == 10, "sizeof(AlignSize_Impl) != 10");
++#elif SAL_TYPES_ALIGNMENT8 == 4
+ static_assert(offsetof(AlignSize_Impl, dDouble) == 4, "offsetof(AlignSize_Impl, dDouble) != 4");
+ static_assert(sizeof(AlignSize_Impl) == 12, "sizeof(AlignSize_Impl) != 12");
+ #elif SAL_TYPES_ALIGNMENT8 == 8
+@@ -174,29 +177,52 @@ static_assert(offsetof(uno_Any, pReserve
+ // string
+ static_assert(sizeof(OUString) == sizeof(rtl_uString *), "binary compatibility test failed: sizeof(OUString) != sizeof(rtl_uString *)");
+ // struct
++#if SAL_TYPES_ALIGNMENT8 == 2
++static_assert(sizeof(M) == 6, "sizeof(M) != 6");
++static_assert(sizeof(N) == 8, "sizeof(N) != 8");
++static_assert(sizeof(N2) == 8, "sizeof(N2) != 8");
++static_assert(offsetof(N2, p) == 6, "offsetof(N2, p) != 6");
++#else
+ static_assert(sizeof(M) == 8, "sizeof(M) != 8");
+-static_assert(offsetof(M, o) == 4, "offsetof(M, o) != 4");
+ static_assert(sizeof(N) == 12, "sizeof(N) != 12");
+-
+ static_assert(sizeof(N2) == 12, "sizeof(N2) != 12");
+-
+ static_assert(offsetof(N2, p) == 8, "offsetof(N2, p) != 8");
+-#if SAL_TYPES_ALIGNMENT8 == 4
++#endif
++static_assert(offsetof(M, o) == 4, "offsetof(M, o) != 4");
++
++#if SAL_TYPES_ALIGNMENT8 == 2
++static_assert(sizeof(O) == 16, "sizeof(O) != 16");
++#elif SAL_TYPES_ALIGNMENT8 == 4
+ static_assert(sizeof(O) == 20, "sizeof(O) != 20");
+ #elif SAL_TYPES_ALIGNMENT8 == 8
+ static_assert(sizeof(O) == 24, "sizeof(O) != 24");
+ #else
+ # error unexpected alignment of 8 byte types
+ #endif
++
++#if SAL_TYPES_ALIGNMENT8 == 2
++static_assert(sizeof(C2) == 6, "sizeof(C2) != 6");
++static_assert(sizeof(D) == 6, "sizeof(D) != 6");
++static_assert(offsetof(D, e) == 2, "offsetof(D, e) != 2");
++static_assert(offsetof(E, e) == 6, "offsetof(E, e) != 6");
++#else
++static_assert(sizeof(C2) == 8, "sizeof(C2) != 8");
+ static_assert(sizeof(D) == 8, "sizeof(D) != 8");
+ static_assert(offsetof(D, e) == 4, "offsetof(D, e) != 4");
+-static_assert(offsetof(E, d) == 4, "offsetof(E, d) != 4");
+ static_assert(offsetof(E, e) == 8, "offsetof(E, e) != 8");
++#endif
+
+ static_assert(sizeof(C1) == 2, "sizeof(C1) != 2");
+-static_assert(sizeof(C2) == 8, "sizeof(C2) != 8");
++static_assert(offsetof(E, d) == 4, "offsetof(E, d) != 4");
+
+-#if SAL_TYPES_ALIGNMENT8 == 4
++#if SAL_TYPES_ALIGNMENT8 == 2
++static_assert(sizeof(C3) == 18, "sizeof(C3) != 18");
++static_assert(sizeof(C4) == 30, "sizeof(C4) != 30");
++static_assert(sizeof(C5) == 40, "sizeof(C5) != 40");
++static_assert(sizeof(C6) == 44, "sizeof(C6) != 44");
++
++static_assert(sizeof(O2) == 18, "sizeof(O2) != 18");
++#elif SAL_TYPES_ALIGNMENT8 == 4
+ static_assert(sizeof(C3) == 20, "sizeof(C3) != 20");
+ static_assert(sizeof(C4) == 32, "sizeof(C4) != 32");
+ static_assert(sizeof(C5) == 44, "sizeof(C5) != 44");
+@@ -216,7 +242,10 @@ static_assert(sizeof(O2) == 32, "sizeof(
+
+ static_assert(sizeof(Char3) == 3, "sizeof(Char3) != 3");
+
+-#if SAL_TYPES_ALIGNMENT8 == 4
++#if SAL_TYPES_ALIGNMENT8 == 2
++// max alignment is 2
++static_assert(sizeof(P) == 16, "sizeof(P) != 16");
++#elif SAL_TYPES_ALIGNMENT8 == 4
+ // max alignment is 4
+ static_assert(sizeof(P) == 20, "sizeof(P) != 20");
+ #elif SAL_TYPES_ALIGNMENT8 == 8
+@@ -242,7 +271,18 @@ BinaryCompatible_Impl::BinaryCompatible_
+
+ assert(OFFSET_OF(C2, n2) == 4);
+
+-#if SAL_TYPES_ALIGNMENT8 == 4
++#if SAL_TYPES_ALIGNMENT8 == 2
++ assert(OFFSET_OF(C3, d3) == 6);
++ assert(OFFSET_OF(C3, n3) == 14);
++ assert(OFFSET_OF(C4, n4) == 18);
++ assert(OFFSET_OF(C4, d4) == 22);
++ assert(OFFSET_OF(C5, n5) == 30);
++ assert(OFFSET_OF(C5, b5) == 38);
++ assert(OFFSET_OF(C6, c6) == 2);
++ assert(OFFSET_OF(C6, b6) == 42);
++
++ assert(OFFSET_OF(O2, p2) == 16);
++#elif SAL_TYPES_ALIGNMENT8 == 4
+ assert(OFFSET_OF(C3, d3) == 8);
+ assert(OFFSET_OF(C3, n3) == 16);
+ assert(OFFSET_OF(C4, n4) == 20);
diff --git a/patches/series b/patches/series
index 6400d75..a80cf4b 100644
--- a/patches/series
+++ b/patches/series
@@ -30,3 +30,4 @@ debian-branding.diff
no-packagekit-per-default.diff
system-officeotron-and-odfvalidator.diff
no-openssl.diff
+m68k-alignment.diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git
More information about the Pkg-openoffice-commits
mailing list