[libreoffice] 01/01: go sure that we build gcc3_linux_aarch64/cpp2uno.cxx only with -fstack-protector

Rene Engelhard rene at moszumanska.debian.org
Thu Oct 19 13:45:10 UTC 2017


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch debian-experimental-5.4
in repository libreoffice.

commit 3fdd59393f3e3b98b1f66903c866f3b8cb33861d
Author: Rene Engelhard <rene at rene-engelhard.de>
Date:   Thu Oct 19 15:44:58 2017 +0200

    go sure that we build gcc3_linux_aarch64/cpp2uno.cxx only with -fstack-protector
---
 changelog                                          |  4 ++
 .../arm64-bridges-no-stack-protector-strong.diff   | 43 ++++++++++++++++++++++
 patches/series                                     |  1 +
 3 files changed, 48 insertions(+)

diff --git a/changelog b/changelog
index 7579d66..1b64356 100644
--- a/changelog
+++ b/changelog
@@ -10,6 +10,10 @@ libreoffice (1:5.4.3~rc1-1) UNRELEASED; urgency=medium
     into the CPPFLAGS part here ..
   * debian/patches/debian-hardened-buildflags-no-LO-fstack-protector-strong.diff:
     and the removal of the explicit default -fstack-protector-strong here.
+  * debian/patches/arm64-bridges-no-stack-protector-strong.diff: add from master:
+    go sure that we build gcc3_linux_aarch64/cpp2uno.cxx only with
+    -fstack-protector. Works for us by chance because of above
+    debian-hardened-buildflags-no-LO-fstack-protector-strong.diff
 
   * debian/rules:
     - make armhf test failures fatal now that above test is fixed which
diff --git a/patches/arm64-bridges-no-stack-protector-strong.diff b/patches/arm64-bridges-no-stack-protector-strong.diff
new file mode 100644
index 0000000..d3f7f9f
--- /dev/null
+++ b/patches/arm64-bridges-no-stack-protector-strong.diff
@@ -0,0 +1,43 @@
+From dddb527db1562f30a2a2b20338dfc8458086a4a9 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Thu, 19 Oct 2017 15:29:38 +0200
+Subject: Again, no -fstack-protector-strong for gcc3_linux_aarch64/cpp2uno.cxx
+
+8d12e4ec8b843d59661a12a7a92bfec7e4473e0f "No -fstack-protect-strong for
+gcc3_linux_aarch64/cpp2uno.cxx vtableSlotCall" had done that in the past (so
+that setting up the x0/x1 return registers in vtableSlotCall is not clobbered
+by the stack protector code), but gbuild details have apparently changed in the
+meantime, so that gb_CXXFLAGS_COMMON's -fstack-protector-strong now ends up on
+the compiler command line before what is covered by gb_Library_add_cxxobjects's
+argument, so didn't get subst'ed to -fstack-protector.  That caused Flathub
+aarch64 builds to fail in CustomTarget_testtools/uno_test.
+
+However, if both -fstack-protector-strong and -fstack-protector are present on
+the command line, the second apparently wins, so use that hack for now.
+(-fstack-protector-strong is only available since GCC 4.9, but -fstack-protector
+is already available in our current baseline GCC 4.8.1, and even for a build on
+that baseline it wouldn't hurt if cpp2uno.cxx was explicitly built with
+-fstack-protector even if none of the other files were built with
+-fstack-protector-strong.)
+
+Change-Id: I9d78d2e5b08b7c0a4adb1531b482cd43617886f7
+
+diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
+index 8016677..22ce084 100644
+--- a/bridges/Library_cpp_uno.mk
++++ b/bridges/Library_cpp_uno.mk
+@@ -34,9 +34,8 @@ bridge_exception_objects := abi callvirtualfunction uno2cpp
+ 
+ $(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno, \
+     bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/cpp2uno, \
+-    $(subst -fstack-protector-strong,-fstack-protector, \
+-        $(gb_LinkTarget_EXCEPTIONFLAGS) \
+-        $(call gb_LinkTarget__get_cxxflags,$(gb_CPPU_ENV)_uno)) \
++    $(gb_LinkTarget_EXCEPTIONFLAGS) \
++    $(call gb_LinkTarget__get_cxxflags,$(gb_CPPU_ENV)_uno) -fstack-protector \
+ ))
+ endif
+ 
+-- 
+cgit v0.10.2
+
diff --git a/patches/series b/patches/series
index 847e31a..2342c33 100644
--- a/patches/series
+++ b/patches/series
@@ -36,3 +36,4 @@ stop-shipping-mimelnk-desktop-files.diff
 icu-no-icu-config.diff
 ww8export-HAVE_MORE_FONTS.diff
 avoid-throwing-cpp-exceptions-across-libgpeg-c-frames.diff
+arm64-bridges-no-stack-protector-strong.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