[Libreoffice-commits] core.git: configure.ac solenv/gbuild sw/source

Peter Foley pefoley2 at verizon.net
Mon Mar 11 02:48:54 PDT 2013


 configure.ac                            |    4 +---
 solenv/gbuild/TargetLocations.mk        |    8 ++++----
 solenv/gbuild/platform/com_GCC_class.mk |   14 +++++++++++---
 sw/source/ui/dbui/swdbtoolsclient.cxx   |    2 +-
 4 files changed, 17 insertions(+), 11 deletions(-)

New commits:
commit bda200348566da71ae7ec346108bc6a00c22bf12
Author: Peter Foley <pefoley2 at verizon.net>
Date:   Sun Mar 10 17:50:29 2013 -0400

    add pch support to gcc
    
    Change-Id: I58c11477c1ce48185528db3a8013b5dccf3947c6
    Reviewed-on: https://gerrit.libreoffice.org/2653
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/configure.ac b/configure.ac
index d43892c..61eb8ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4394,9 +4394,7 @@ if test -n "$enable_pch" && test "$enable_pch" != "no"; then
     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_check_target = $(WORKDIR)/Module/check/$(1)
 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_preparation_target = $(WORKDIR)/Package/prepared/$(1)
 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 @@ $(call gb_Helper_abbreviate_dirs,\
 		-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 @@ endef
 
 # 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_Helper_abbreviate_dirs,\
 		$(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 @@ Reference< XDataSource > SwDbtoolsClient::getDataSource(
 sal_Int32 SwDbtoolsClient::getDefaultNumberFormat(
         const Reference< XPropertySet >& rxColumn,
         const Reference< XNumberFormatTypes >& rxTypes,
-        const Locale& rLocale
+        const lang::Locale& rLocale
             )
 {
     sal_Int32 nRet = -1;


More information about the Libreoffice-commits mailing list