Unlike the old dmake build system, solenv/gbuild/platform/unxgcc.mk sets -Wl,--strip-all depending on --enable-symbols only, and ignores --disable-strip altogether. Attached patch fixes that.

(To avoid confusion: I recently switched my git email address, but my contributions are still under the license documented at <http://lists.freedesktop.org/archives/libreoffice/2011-August/017383.html>.)

-Stephan
>From 5b1199602807152777b149cc3c30105c2064baa5 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sberg...@redhat.com>
Date: Tue, 6 Sep 2011 09:39:07 +0200
Subject: [PATCH] Honor --disable-strip in gbuild.

---
 solenv/gbuild/gbuild.mk          |    6 ++++++
 solenv/gbuild/platform/unxgcc.mk |    8 +++++---
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 48bebeb..329eefa 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -87,6 +87,12 @@ else
 gb_SYMBOL := $(false)
 endif
 
+ifeq ($(strip $(DISABLE_STRIP)$(disable_strip)),)
+gb_STRIP := $(true)
+else
+gb_STRIP := $(false)
+endif
+
 gb_DEBUGLEVEL := 0
 ifneq ($(strip $(DEBUG)$(debug)),)
 gb_DEBUGLEVEL := 1
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 4234c71..5c71bd4 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -163,9 +163,11 @@ gb_LinkTarget_LDFLAGS += \
 endif
 
 ifneq ($(gb_SYMBOL),$(true))
-gb_LinkTarget_LDFLAGS += \
-       -Wl,--strip-all \
-
+ifeq ($(gb_STRIP),$(true))
+gb_LinkTarget_LDFLAGS += -Wl,--strip-all
+else
+gb_LinkTarget_LDFLAGS += -Wl,--strip-debug
+endif
 endif
 
 ifneq ($(gb_DEBUGLEVEL),0)
-- 
1.7.6

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to