summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2013-03-03 14:36:34 -0500
committerPeter Foley <pefoley2@verizon.net>2013-03-04 17:58:53 -0500
commitb00254ab2af5115b1a4deaaf7593d287925ebc64 (patch)
treee0dc72dd20870c9743ff754b37530227fc95d187
parent6cd8e92402746a193e4a19a5f31e9ac16318352e (diff)
make lto work
Change-Id: Iab6892368c6ba6bb5b83132cdcd6aa959c3b0e1f
-rw-r--r--connectivity/Library_hsqldb.mk1
-rw-r--r--connectivity/Library_mysql.mk1
-rw-r--r--dbaccess/Library_sdbt.mk1
-rw-r--r--extensions/Library_bib.mk1
-rw-r--r--extensions/Library_dbp.mk1
-rw-r--r--reportdesign/Library_rpt.mk1
-rw-r--r--reportdesign/Library_rptui.mk1
-rw-r--r--reportdesign/Library_rptxml.mk3
-rw-r--r--solenv/gbuild/platform/com_GCC_class.mk5
-rw-r--r--solenv/gbuild/platform/com_GCC_defs.mk2
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk4
-rw-r--r--solenv/gbuild/platform/com_MSC_defs.mk2
-rw-r--r--solenv/gbuild/platform/unxgcc.mk13
-rw-r--r--svtools/Executable_g2g.mk1
-rw-r--r--svx/Executable_gengal.bin.mk3
15 files changed, 26 insertions, 14 deletions
diff --git a/connectivity/Library_hsqldb.mk b/connectivity/Library_hsqldb.mk
index 3c26517e16d4..7c0fe61bddf8 100644
--- a/connectivity/Library_hsqldb.mk
+++ b/connectivity/Library_hsqldb.mk
@@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_libraries,hsqldb,\
dbtools \
jvmfwk \
sal \
+ salhelper \
tl \
utl \
i18nisolang1 \
diff --git a/connectivity/Library_mysql.mk b/connectivity/Library_mysql.mk
index 9d2d09589b9e..e5f9fd11bb50 100644
--- a/connectivity/Library_mysql.mk
+++ b/connectivity/Library_mysql.mk
@@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,mysql,\
cppu \
cppuhelper \
sal \
+ salhelper \
dbtools \
comphelper \
$(gb_UWINAPI) \
diff --git a/dbaccess/Library_sdbt.mk b/dbaccess/Library_sdbt.mk
index 2ff4dd01baa4..50e44539a8de 100644
--- a/dbaccess/Library_sdbt.mk
+++ b/dbaccess/Library_sdbt.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,sdbt,\
cppuhelper \
dbtools \
sal \
+ salhelper \
tl \
utl \
$(gb_UWINAPI) \
diff --git a/extensions/Library_bib.mk b/extensions/Library_bib.mk
index 599dbdcff4b6..6de36bc9ba2e 100644
--- a/extensions/Library_bib.mk
+++ b/extensions/Library_bib.mk
@@ -75,6 +75,7 @@ $(eval $(call gb_Library_use_libraries,bib,\
cppuhelper \
cppu \
sal \
+ salhelper \
$(gb_UWINAPI) \
))
diff --git a/extensions/Library_dbp.mk b/extensions/Library_dbp.mk
index 25a727140b43..07674449c31f 100644
--- a/extensions/Library_dbp.mk
+++ b/extensions/Library_dbp.mk
@@ -71,6 +71,7 @@ $(eval $(call gb_Library_use_libraries,dbp,\
cppuhelper \
cppu \
sal \
+ salhelper \
$(gb_UWINAPI) \
))
diff --git a/reportdesign/Library_rpt.mk b/reportdesign/Library_rpt.mk
index 511da92a2d4b..3520536b1d88 100644
--- a/reportdesign/Library_rpt.mk
+++ b/reportdesign/Library_rpt.mk
@@ -52,6 +52,7 @@ $(eval $(call gb_Library_use_libraries,rpt,\
fwe \
i18nisolang1 \
sal \
+ salhelper \
sfx \
svl \
svt \
diff --git a/reportdesign/Library_rptui.mk b/reportdesign/Library_rptui.mk
index 5426367b9652..3c84db3d23c6 100644
--- a/reportdesign/Library_rptui.mk
+++ b/reportdesign/Library_rptui.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_Library_use_libraries,rptui,\
i18nisolang1 \
rpt \
sal \
+ salhelper \
sfx \
sot \
svl \
diff --git a/reportdesign/Library_rptxml.mk b/reportdesign/Library_rptxml.mk
index 8ab669a0691b..64613d932a4a 100644
--- a/reportdesign/Library_rptxml.mk
+++ b/reportdesign/Library_rptxml.mk
@@ -45,7 +45,8 @@ $(eval $(call gb_Library_use_libraries,rptxml,\
editeng \
rpt \
sal \
- sax \
+ salhelper \
+ sax \
sfx \
sot \
svl \
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 4ea1a14fe7c3..b51a723d4821 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -44,6 +44,7 @@ $(call gb_Output_announce,$(2),$(true),ASM,3)
$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) $(dir $(4)) && cd $(SRCDIR) && \
$(gb_CC) \
+ $(gb_LTOFLAGS) \
$(gb_AFLAGS) \
-c $(3) \
-o $(1)) \
@@ -61,7 +62,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS_SETUP)) \
$(gb_CC) \
$(DEFS) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
+ $(gb_LTOFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \
@@ -101,7 +102,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS_SETUP)) \
$(gb_CXX) \
$(DEFS) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
+ $(gb_LTOFLAGS) \
$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 02e3acd5bcff..a691e2723040 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -108,7 +108,7 @@ gb_CXXFLAGS_COMMON += -DLIBO_MERGELIBS
endif
ifeq ($(ENABLE_LTO),TRUE)
-gb_Library_LTOFLAGS := -flto -fno-use-linker-plugin
+gb_LTOFLAGS := -flto
endif
gb_LinkTarget_EXCEPTIONFLAGS := \
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 7e003194afc4..9e9c87cc34bd 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -51,7 +51,7 @@ $(call gb_Helper_abbreviate_dirs,\
unset INCLUDE && \
$(if $(filter YES,$(COBJECT_X64)), $(CXX_X64_BINARY), $(gb_CC)) \
$(DEFS) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_COMPILER_LTOFLAGS)) \
+ $(gb_LTOFLAGS) \
$(T_CFLAGS) $(T_CFLAGS_APPEND) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
-Fd$(PDBFILE) \
@@ -74,7 +74,7 @@ $(call gb_Helper_abbreviate_dirs,\
unset INCLUDE && \
$(if $(filter YES,$(CXXOBJECT_X64)), $(CXX_X64_BINARY), $(gb_CXX)) \
$(DEFS) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_COMPILER_LTOFLAGS)) \
+ $(gb_LTOFLAGS) \
$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND) \
$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
-Fd$(PDBFILE) \
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index 1e8004f376d1..5824a9a57bcb 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -280,7 +280,7 @@ define gb_create_deps
endef
endif
-gb_COMPILER_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
+gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
# Helper class
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 104fe7fbb726..5009ef548bfc 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -104,12 +104,11 @@ gb_CXXFLAGS += -Wno-deprecated-declarations
endif
endif
-# Breaks the build, needs more testing
-#ifeq ($(ENABLE_LTO),TRUE)
-#ifneq ($(COM_GCC_IS_CLANG),TRUE)
-#gb_LinkTarget_LTOFLAGS += -fuse-linker-plugin $(gb_COMPILERDEFAULTOPTFLAGS)
-#endif
-#endif
+ifeq ($(ENABLE_LTO),TRUE)
+ifneq ($(COM_GCC_IS_CLANG),TRUE)
+gb_LTOFLAGS += -fuse-linker-plugin $(gb_COMPILERDEFAULTOPTFLAGS)
+endif
+endif
ifneq ($(strip $(SYSBASE)),)
gb_CXXFLAGS += --sysroot=$(SYSBASE)
@@ -186,7 +185,7 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
$(gb_CXX) \
$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
- $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_LTOFLAGS)) \
+ $(gb_LTOFLAGS) \
$(if $(SOVERSION),-Wl$(COMMA)--soname=$(notdir $(1)).$(SOVERSION)) \
$(if $(SOVERSIONSCRIPT),-Wl$(COMMA)--version-script=$(SOVERSIONSCRIPT))\
$(subst \d,$$,$(RPATH)) \
diff --git a/svtools/Executable_g2g.mk b/svtools/Executable_g2g.mk
index 5b7fc074faa6..72856b79cada 100644
--- a/svtools/Executable_g2g.mk
+++ b/svtools/Executable_g2g.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Executable_use_external,g2g,boost_headers))
$(eval $(call gb_Executable_use_sdk_api,g2g))
$(eval $(call gb_Executable_use_libraries,g2g,\
+ cppuhelper \
jvmfwk \
sal \
svt \
diff --git a/svx/Executable_gengal.bin.mk b/svx/Executable_gengal.bin.mk
index e6613e52b24e..74c82784af7a 100644
--- a/svx/Executable_gengal.bin.mk
+++ b/svx/Executable_gengal.bin.mk
@@ -38,12 +38,15 @@ $(eval $(call gb_Executable_set_include,$(svx_GENGALBIN),\
$(eval $(call gb_Executable_use_external,$(svx_GENGALBIN),boost_headers))
$(eval $(call gb_Executable_use_libraries,$(svx_GENGALBIN),\
+ basegfx \
sal \
tl \
svl \
+ svt \
comphelper \
cppu \
cppuhelper \
+ utl \
vcl \
svxcore \
$(gb_UWINAPI) \