On Tuesday 12 of April 2011, Bjoern Michaelsen wrote:
Hi Lubos,
On Tue, 12 Apr 2011 16:25:58 +0200
Lubos Lunak <l.lunak@suse.cz> wrote:
solenv/inc/unxgcc.mk:LINKFLAGSOPTIMIZE*=-Wl,-O1
No, I forgot to mention, that's not the one:
[...]
This is because of the way the migration to gbuild started: By
"emulating" the compile/link commands of the old build system as a
first step.
As vbaswobj.uno.so was using the LINKFLAGSOPTIMIZE it had the same link
flags explicitly added in Library_vbaswobj.mk.
No, I dont think it makes sense to link libs different. But it seems
to me that the old build system did it just as incomsistent:
LINKFLAGSOPTIMIZE is only used in LINKERVERSIONMAPFLAG, so libs
without a version map would not use the optimizations.
I see. Is the attached patch the right way to implement (not) using -Wl,-O1
in gbuild globally based on the debuglevel?
--
Lubos Lunak
l.lunak@suse.cz
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index c0d2e84..5f0cdc5 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -391,7 +391,7 @@ $(call gb_LinkTarget_get_headers_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : INCLUDE := $$(gb_LinkTarget_INCLUDE)
$(call gb_LinkTarget_get_headers_target,$(1)) \
$(call gb_LinkTarget_get_target,$(1)) : INCLUDE_STL := $$(gb_LinkTarget_INCLUDE_STL)
-$(call gb_LinkTarget_get_target,$(1)) : LDFLAGS := $$(gb_LinkTarget_LDFLAGS)
+$(call gb_LinkTarget_get_target,$(1)) : LDFLAGS := $$(gb_LinkTarget_LDFLAGS) $(gb_LINKEROPTFLAGS)
$(call gb_LinkTarget_get_target,$(1)) : LINKED_LIBS :=
$(call gb_LinkTarget_get_target,$(1)) : LINKED_STATIC_LIBS :=
$(call gb_LinkTarget_get_target,$(1)) : TARGETTYPE :=
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index b1eb050..11a0205 100755
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -148,8 +148,10 @@ endif
ifneq ($(gb_DEBUGLEVEL),0)
gb_COMPILEROPTFLAGS := -O0
+gb_LINKEROPTFLAGS :=
else
gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
+gb_LINKEROPTFLAGS := -Wl,-O1
endif
gb_COMPILERNOOPTFLAGS := -O0
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.