Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2653
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/53/2653/1
add pch support to gcc
Change-Id: I58c11477c1ce48185528db3a8013b5dccf3947c6
---
M configure.ac
M solenv/gbuild/TargetLocations.mk
M solenv/gbuild/platform/com_GCC_class.mk
M sw/source/ui/dbui/swdbtoolsclient.cxx
4 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index d43892c..61eb8ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4394,9 +4394,7 @@
if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
ENABLE_PCH="TRUE"
AC_MSG_RESULT([yes])
- # GCC PCH support is reportedly a hack that's not very reliable,
- # so support only Clang.
- elif test "$GCC" = "yes" -a "$COM_GCC_IS_CLANG" = "TRUE"; then
+ elif test "$GCC" = "yes"; then
ENABLE_PCH="TRUE"
AC_MSG_RESULT([yes])
else
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 6fa782b..68a3c67 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -157,8 +157,8 @@
gb_Module_get_slowcheck_target = $(WORKDIR)/Module/slowcheck/$(1)
gb_Module_get_subsequentcheck_target = $(WORKDIR)/Module/subsequentcheck/$(1)
gb_Module_get_target = $(WORKDIR)/Module/$(1)
-gb_NoexPrecompiledHeader_get_dep_target =
$(WORKDIR)/Dep/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.pch.d
-gb_NoexPrecompiledHeader_get_target =
$(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
+gb_NoexPrecompiledHeader_get_dep_target =
$(WORKDIR)/Dep/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.gch.d
+gb_NoexPrecompiledHeader_get_target =
$(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/$(1).hxx.gch
gb_NoexPrecompiledHeader_get_timestamp =
$(WORKDIR)/NoexPrecompiledHeader/$(gb_NoexPrecompiledHeader_DEBUGDIR)/Timestamps/$(1)
gb_ObjCxxObject_get_target = $(WORKDIR)/ObjCxxObject/$(1).o
gb_ObjCObject_get_target = $(WORKDIR)/ObjCObject/$(1).o
@@ -167,8 +167,8 @@
gb_Package_get_target = $(WORKDIR)/Package/$(1)
gb_Package_get_target_for_build = $(WORKDIR_FOR_BUILD)/Package/$(1)
gb_Postprocess_get_target = $(WORKDIR)/Postprocess/$(1)
-gb_PrecompiledHeader_get_dep_target =
$(WORKDIR)/Dep/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.pch.d
-gb_PrecompiledHeader_get_target =
$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.pch
+gb_PrecompiledHeader_get_dep_target =
$(WORKDIR)/Dep/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.gch.d
+gb_PrecompiledHeader_get_target =
$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/$(1).hxx.gch
gb_PrecompiledHeader_get_timestamp =
$(WORKDIR)/PrecompiledHeader/$(gb_PrecompiledHeader_DEBUGDIR)/Timestamps/$(1)
gb_Pyuno_get_target = $(WORKDIR)/Pyuno/$(1).zip
gb_Pyuno_get_outdir_target = $(OUTDIR)/bin/$(1).zip
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index b51a723..b177dae 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -182,12 +182,16 @@
-o $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef
-ifeq ($(COM_GCC_IS_CLANG),TRUE)
# PrecompiledHeader class
+ifeq ($(COM_GCC_IS_CLANG),TRUE)
gb_PrecompiledHeader_get_enableflags = -include-pch $(call gb_PrecompiledHeader_get_target,$(1))
+else
+gb_PrecompiledHeader_get_enableflags = -include $(notdir $(subst .gch,,$(call
gb_PrecompiledHeader_get_target,$(1)))) \
+ -I $(dir $(call gb_PrecompiledHeader_get_target,$(1)))
+endif
-# Clang does not need any extra .o file for PCH
+# Clang and gcc do not need any extra .o file for PCH
gb_PrecompiledHeader_get_objectfile =
define gb_PrecompiledHeader__command
@@ -209,7 +213,12 @@
# NoexPrecompiledHeader class
+ifeq ($(COM_GCC_IS_CLANG),TRUE)
gb_NoexPrecompiledHeader_get_enableflags = -include-pch $(call
gb_NoexPrecompiledHeader_get_target,$(1))
+else
+gb_NoexPrecompiledHeader_get_enableflags = -include $(notdir $(subst .gch,,$(call
gb_NoexPrecompiledHeader_get_target,$(1)))) \
+ -I $(dir $(call gb_NoexPrecompiledHeader_get_target,$(1)))
+endif
gb_NoexPrecompiledHeader_get_objectfile =
@@ -229,7 +238,6 @@
$(call gb_cxx_dep_copy,$(call gb_NoexPrecompiledHeader_get_dep_target,$(2))) \
)
endef
-endif
# YaccTarget class
diff --git a/sw/source/ui/dbui/swdbtoolsclient.cxx b/sw/source/ui/dbui/swdbtoolsclient.cxx
index beddf6a..fcb6728 100644
--- a/sw/source/ui/dbui/swdbtoolsclient.cxx
+++ b/sw/source/ui/dbui/swdbtoolsclient.cxx
@@ -204,7 +204,7 @@
sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
const Reference< XPropertySet >& rxColumn,
const Reference< XNumberFormatTypes >& rxTypes,
- const Locale& rLocale
+ const lang::Locale& rLocale
)
{
sal_Int32 nRet = -1;
--
To view, visit https://gerrit.libreoffice.org/2653
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I58c11477c1ce48185528db3a8013b5dccf3947c6
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Peter Foley <pefoley2@verizon.net>
Context
- [PATCH] add pch support to gcc · Peter Foley (via Code Review)
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.