config_host.mk.in                                         |    3 
 configure.ac                                              |    9 -
 external/firebird/ExternalProject_firebird.mk             |   72 +++++---------
 external/firebird/UnpackedTarball_firebird.mk             |    1 
 external/firebird/firebird-btyacc-add-explicit-rule.patch |   12 ++
 external/firebird/firebird-cygwin-msvc.patch              |   26 +++--
 external/firebird/firebird-macosx.patch.1                 |   48 ---------
 solenv/gcc-wrappers/wrapper.cxx                           |   15 ++
 8 files changed, 81 insertions(+), 105 deletions(-)

New commits:
commit 22b6cfa35c4cec8462785376b8543ce9cd4e422a
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Sun Nov 15 19:57:48 2020 +0100
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Sat Nov 21 14:44:49 2020 +0100

    firebird: build fixes (incl. parallel build)
    
    The main idea is to get rid of the "unset MAKEFLAGS". AFAI can
    see, the whole CPU stuff isn't used anymore. So we can drop the
    whole FB_CPU_ARG handling. Since LO doesn't use any of make's
    implicit rules, the build breaks, but luckily it just requires a
    single rule for the btyacc build - just a Firebuild build tool.
    
    Then there is the whole broken handling of LIBTOMMATH and
    LIBATOMIC_OPS already in LO's configure.ac. I don't know if any
    internal build of Firebird with these as system libs would work.
    I guess people either have a system Firebird or also build with
    internal libtommath and libatomic_ops. This fixes just the
    obvious errors. I didn't try to build it, so there might still
    be typos (TBH I thought hard about just dropping the system
    build of these libraries, after seeing the broken configure.ac).
    
    And I'm not sure our / the system boost preprocessor library is
    ever used over the Firebird-internal copy. It also looks like
    it's also just used in an other build tool and nothing of the
    Firebird DB itself depends on it.
    
    Then there is the movement of the install_name_tool / otool
    patching on MacOS from the patch into the ExternalProject to
    further shrink the patches, as the build doesn't depend on it.
    
    This also introduces a different debug build mode for the
    gcc-/g++-wrapper: MSVC_USE_INDIVIDUAL_PDBS.
    It uses -Fd to write a separate PDB per output file instead of
    using -FS to use sync writes to a single PDB, which might work
    around the PDB access failures seen by Jenkins for linking
    executables. In theory it's also faster and should work with all
    the other wrapper users, but I don't want to open that can of
    additional build errors (yet), for eventually marginal gains.
    
    Change-Id: I8d4c5d2f17def9e840a67ef1004787e8baaffa83
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105902
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>

diff --git a/config_host.mk.in b/config_host.mk.in
index 57a4d686a057..42f4511a62e8 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -384,6 +384,8 @@ export LIBPNG_CFLAGS=$(gb_SPACE)@LIBPNG_CFLAGS@
 export LIBPNG_LIBS=$(gb_SPACE)@LIBPNG_LIBS@
 export LIBREPOSITORY_JAR=@LIBREPOSITORY_JAR@
 export LIBSERIALIZER_JAR=@LIBSERIALIZER_JAR@
+export LIBTOMMATH_CFLAGS=@LIBTOMMATH_CFLAGS@
+export LIBTOMMATH_LIBS=@LIBTOMMATH_LIBS@
 export LIBTOOL=@LIBTOOL@
 export LIBXML_CFLAGS=$(gb_SPACE)@LIBXML_CFLAGS@
 export LIBXML_JAR=@LIBXML_JAR@
@@ -590,6 +592,7 @@ export SYSTEM_LIBNUMBERTEXT=@SYSTEM_LIBNUMBERTEXT@
 export SYSTEM_LIBNUMBERTEXT_DATA=@SYSTEM_LIBNUMBERTEXT_DATA@
 export SYSTEM_LIBORCUS=@SYSTEM_LIBORCUS@
 export SYSTEM_LIBPNG=@SYSTEM_LIBPNG@
+export SYSTEM_LIBTOMMATH=@SYSTEM_LIBTOMMATH@
 export SYSTEM_LIBXML=@SYSTEM_LIBXML@
 export SYSTEM_LIBXML_FOR_BUILD=@SYSTEM_LIBXML_FOR_BUILD@
 export SYSTEM_LIBXSLT=@SYSTEM_LIBXSLT@
diff --git a/configure.ac b/configure.ac
index 031308058854..976669749ec4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9932,7 +9932,7 @@ int fb_api_is_30(void) { return 0; }
             dnl 
===================================================================
             dnl Check for system libatomic_ops
             dnl 
===================================================================
-            libo_CHECK_SYSTEM_MODULE([libatomic_ops],[ATOMIC_OPS],[atomic_ops 
>= 0.7.2])
+            
libo_CHECK_SYSTEM_MODULE([libatomic_ops],[LIBATOMIC_OPS],[atomic_ops >= 0.7.2])
             if test "$with_system_libatomic_ops" = "yes"; then
                 SYSTEM_LIBATOMIC_OPS=TRUE
                 AC_CHECK_HEADERS(atomic_ops.h, [],
@@ -9955,7 +9955,7 @@ int fb_api_is_30(void) { return 0; }
             dnl check for tommath presence
             save_LIBS=$LIBS
             AC_CHECK_HEADER(tommath.h,,AC_MSG_ERROR(Include file for tommath 
not found - please install development tommath package))
-            AC_CHECK_LIB(tommath, mp_init, TOMMATH_LIBS=-ltommath, 
AC_MSG_ERROR(Library tommath not found - please install development tommath 
package))
+            AC_CHECK_LIB(tommath, mp_init, LIBTOMMATH_LIBS=-ltommath, 
AC_MSG_ERROR(Library tommath not found - please install development tommath 
package))
             LIBS=$save_LIBS
         else
             SYSTEM_LIBTOMMATH=
@@ -9976,8 +9976,9 @@ AC_SUBST(LIBATOMIC_OPS_LIBS)
 AC_SUBST(SYSTEM_FIREBIRD)
 AC_SUBST(FIREBIRD_CFLAGS)
 AC_SUBST(FIREBIRD_LIBS)
-AC_SUBST([TOMMATH_CFLAGS])
-AC_SUBST([TOMMATH_LIBS])
+AC_SUBST(SYSTEM_LIBTOMMATH)
+AC_SUBST(LIBTOMMATH_CFLAGS)
+AC_SUBST(LIBTOMMATH_LIBS)
 
 dnl ===================================================================
 dnl Check for system curl
diff --git a/external/firebird/ExternalProject_firebird.mk 
b/external/firebird/ExternalProject_firebird.mk
index ce99e909aee1..8f8a8230227f 100644
--- a/external/firebird/ExternalProject_firebird.mk
+++ b/external/firebird/ExternalProject_firebird.mk
@@ -22,34 +22,20 @@ $(eval $(call gb_ExternalProject_register_targets,firebird,\
        build \
 ))
 
-ifneq ($(OS),WNT)
-INVOKE_FPA:="CPU=\$$(EMPTY) $${FB_CPU_ARG}"
-endif
-
-ifeq ($(COM_IS_CLANG),TRUE)
-firebird_NO_CXX11_NARROWING := -Wno-c++11-narrowing
-endif
-
-MAKE_PRE=LC_ALL=C
-
-MAKE_POST=$(if $(filter MACOSX,$(OS)),&& $(PERL) \
-                       $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl 
OOO \
-                       $(EXTERNAL_WORKDIR)/gen/$(if 
$(ENABLE_DEBUG),Debug,Release)/firebird/plugins/libEngine12.dylib \
-                       $(EXTERNAL_WORKDIR)/gen/$(if 
$(ENABLE_DEBUG),Debug,Release)/firebird/lib/libfbclient.dylib.3.0.0)
+firebird_BUILDDIR = $(EXTERNAL_WORKDIR)/gen/$(if 
$(ENABLE_DEBUG),Debug,Release)/firebird
+firebird_VERSION := 3.0.0
 
 $(call gb_ExternalProject_get_state_target,firebird,build):
        $(call gb_Trace_StartRange,firebird,EXTERNAL)
        $(call gb_ExternalProject_run,build,\
-               unset MAKEFLAGS \
-               && FB_CPU_ARG='$(filter --jobserver-fds=%,$(MAKEFLAGS))' \
-               && export PKG_CONFIG="" \
+               export PKG_CONFIG="" \
                && export CPPFLAGS=" \
+                       $(BOOST_CPPFLAGS) \
                        $(if $(SYSTEM_LIBATOMIC_OPS),$(LIBATOMIC_OPS_CFLAGS), \
                                -I$(call 
gb_UnpackedTarball_get_dir,libatomic_ops)/src \
                        ) \
                        $(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_CFLAGS), \
                                -I$(call gb_UnpackedTarball_get_dir,libtommath) 
\
-                               -L$(call gb_UnpackedTarball_get_dir,libtommath) 
\
                        ) \
                        $(if $(SYSTEM_ICU),$(ICU_CPPFLAGS), \
                                -I$(call gb_UnpackedTarball_get_dir,icu)/source 
\
@@ -59,30 +45,26 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
                        $(if $(filter GCC-INTEL,$(COM)-$(CPUNAME)),-Di386=1) \
                        " \
                && export CXXFLAGS=" \
+                       $(BOOST_CXXFLAGS) \
                        $(if $(filter MSC,$(COM)),$(if 
$(MSVC_USE_DEBUG_RUNTIME),-DMSVC_USE_DEBUG_RUNTIME)) \
                        $(if 
$(HAVE_GCC_FNO_SIZED_DEALLOCATION),-fno-sized-deallocation 
-fno-delete-null-pointer-checks) \
-                       $(if $(SYSTEM_BOOST),$(BOOST_CPPFLAGS), \
-                               $(BOOST_CPPFLAGS) \
-                               -L$(call 
gb_UnpackedTarball_get_dir,boost)/source/lib \
-                       ) \
-                       $(if $(SYSTEM_ICU),$(ICU_CPPFLAGS), \
-                               -I$(call gb_UnpackedTarball_get_dir,icu)/source 
\
-                               -I$(call 
gb_UnpackedTarball_get_dir,icu)/source/i18n \
-                               -I$(call 
gb_UnpackedTarball_get_dir,icu)/source/common \
-                       ) \
-                       $(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_CFLAGS), \
-                               -L$(call gb_UnpackedTarball_get_dir,libtommath) 
\
-                       ) \
                        $(CXXFLAGS_CXX11) \
-                       $(firebird_NO_CXX11_NARROWING) \
+                       $(if $(filter TRUE,$(COM_IS_CLANG)), 
-Wno-c++11-narrowing) \
                        $(if $(call 
gb_Module__symbols_enabled,firebird),$(gb_DEBUGINFO_FLAGS)) \
                " \
                && export LDFLAGS=" \
+                       $(if $(SYSTEM_LIBATOMIC_OPS),$(LIBATOMIC_OPS_LIBS), \
+                               -L$(call 
gb_UnpackedTarball_get_dir,libatomic_ops)/src \
+                       ) \
+                       $(if $(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_LIBS), \
+                               -L$(call gb_UnpackedTarball_get_dir,libtommath) 
\
+                       ) \
                        $(if $(SYSTEM_ICU),$(ICU_LIBS), \
                                -L$(call 
gb_UnpackedTarball_get_dir,icu)/source/lib \
                        ) \
                " \
                && export LIBREOFFICE_ICU_LIB="$(call 
gb_UnpackedTarball_get_dir,icu)/source/lib" \
+               && export MSVC_USE_INDIVIDUAL_PDBS=TRUE \
                && MAKE=$(MAKE) ./configure \
                        --without-editline \
                        --with-wire-compress=no \
@@ -97,19 +79,21 @@ $(call gb_ExternalProject_get_state_target,firebird,build):
                                                $(shell expr 
'$(MAC_OS_X_VERSION_MIN_REQUIRED)' \
                                                        '<' 101200)), \
                                        ac_cv_func_clock_gettime=no)) \
-               && if [ -n "$${FB_CPU_ARG}" ]; then \
-                               $(MAKE_PRE) $(MAKE) \
-                                       $(if $(filter 
LINUX,$(OS)),CXXFLAGS="$$CXXFLAGS -std=gnu++11") \
-                                       $(if $(ENABLE_DEBUG),Debug) 
$(INVOKE_FPA) SHELL='$(SHELL)' \
-                                       LIBO_TUNNEL_LIBRARY_PATH='$(subst 
','\'',$(subst $$,$$$$,$(call gb_Helper_extend_ld_path,$(call 
gb_UnpackedTarball_get_dir,icu)/source/lib)))' \
-                               $(MAKE_POST); \
-                       else \
-                               $(MAKE_PRE) $(MAKE) \
-                                       $(if $(filter 
LINUX,$(OS)),CXXFLAGS="$$CXXFLAGS -std=gnu++11") \
-                                       $(if $(ENABLE_DEBUG),Debug) 
SHELL='$(SHELL)' \
-                                       LIBO_TUNNEL_LIBRARY_PATH='$(subst 
','\'',$(subst $$,$$$$,$(call gb_Helper_extend_ld_path,$(call 
gb_UnpackedTarball_get_dir,icu)/source/lib)))' \
-                               $(MAKE_POST); \
-                       fi \
+               && LC_ALL=C $(MAKE) \
+                       $(if $(ENABLE_DEBUG),Debug) SHELL='$(SHELL)' $(if 
$(filter LINUX,$(OS)),CXXFLAGS="$$CXXFLAGS -std=gnu++11") \
+                       MATHLIB="$(if 
$(SYSTEM_LIBTOMMATH),$(LIBTOMMATH_LIBS),-L$(call 
gb_UnpackedTarball_get_dir,libtommath) -ltommath)" \
+                       LIBO_TUNNEL_LIBRARY_PATH='$(subst ','\'',$(subst 
$$,$$$$,$(call gb_Helper_extend_ld_path,$(call 
gb_UnpackedTarball_get_dir,icu)/source/lib)))' \
+               $(if $(filter MACOSX,$(OS)), \
+                       && install_name_tool -id 
@__________________________________________________OOO/libfbclient.dylib.$(firebird_VERSION)
 \
+                               
$(firebird_BUILDDIR)/lib/libfbclient.dylib.$(firebird_VERSION) \
+                       && install_name_tool -id 
@__________________________________________________OOO/libEngine12.dylib \
+                               $(firebird_BUILDDIR)/plugins/libEngine12.dylib \
+                       && install_name_tool -change 
$(firebird_BUILDDIR)/lib/libfbclient.dylib.$(firebird_VERSION) \
+                               
@loader_path/libfbclient.dylib.$(firebird_VERSION) 
$(firebird_BUILDDIR)/plugins/libEngine12.dylib \
+                       && $(PERL) 
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
+                               
$(firebird_BUILDDIR)/lib/libfbclient.dylib.$(firebird_VERSION) \
+                               $(firebird_BUILDDIR)/plugins/libEngine12.dylib \
+                       ) \
        )
        $(call gb_Trace_EndRange,firebird,EXTERNAL)
 
diff --git a/external/firebird/UnpackedTarball_firebird.mk 
b/external/firebird/UnpackedTarball_firebird.mk
index c3860673b879..25b1640755a1 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
                
external/firebird/0001-Make-comparison-operator-member-functions-const.patch.1 \
     external/firebird/0001-Fix-warning-on-Win64-build-231.patch.1 \
                external/firebird/macos-arm64.patch.0 \
+    external/firebird/firebird-btyacc-add-explicit-rule.patch \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/external/firebird/firebird-btyacc-add-explicit-rule.patch 
b/external/firebird/firebird-btyacc-add-explicit-rule.patch
new file mode 100644
index 000000000000..c4d88d911a40
--- /dev/null
+++ b/external/firebird/firebird-btyacc-add-explicit-rule.patch
@@ -0,0 +1,12 @@
+--- extern/btyacc/Makefile.orig        2020-11-13 18:57:44.831455058 +0100
++++ extern/btyacc/Makefile     2020-11-13 18:59:19.071078333 +0100
+@@ -44,6 +44,9 @@
+ $(PROGRAM):     $(OBJS) $(LIBS)
+               $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
+ 
++%.o: %.c
++              $(CC) $(CCFLAGS) -c $< -o $@
++
+ clean:;               rm -f $(OBJS)
+ 
+ clobber:;     rm -f $(OBJS) $(PROGRAM)
diff --git a/external/firebird/firebird-cygwin-msvc.patch 
b/external/firebird/firebird-cygwin-msvc.patch
index 317ea8026b5d..47fd322e514e 100644
--- a/external/firebird/firebird-cygwin-msvc.patch
+++ b/external/firebird/firebird-cygwin-msvc.patch
@@ -492,18 +492,15 @@ diff -ur extern/btyacc/main.c extern/btyacc/main.c
 diff -ur extern/btyacc/Makefile extern/btyacc/Makefile
 --- extern/btyacc/Makefile     2016-07-07 13:55:55.448234695 +0200
 +++ extern/btyacc/Makefile     2016-07-07 14:57:42.284333961 +0200
-@@ -42,7 +42,10 @@
+@@ -42,7 +42,7 @@
  all:          $(PROGRAM)
-
+ 
  $(PROGRAM):     $(OBJS) $(LIBS)
 -              $(CC) $(LDFLAGS) -o $(PROGRAM) $(OBJS) $(LIBS)
-+              $(CC) -o $(PROGRAM).exe $(OBJS) $(LIBS) $(LDFLAGS)
-+
-+%.o: %.c
-+              $(CC)  -c $< -Fo$@ $(CCFLAGS)
-
- clean:;               rm -f $(OBJS)
-
++              $(CC) $(LDFLAGS) -o $(PROGRAM).exe $(OBJS) $(LIBS)
+ 
+ %.o: %.c
+               $(CC) $(CCFLAGS) -c $< -o $@
 --- extern/cloop/src/tests/test1/CppTest.cpp   2016-07-07 15:56:27.948015300 
+0200
 +++ extern/cloop/src/tests/test1/CppTest.cpp   2016-07-13 18:58:48.529822600 
+0200
 @@ -24,6 +24,7 @@
@@ -555,6 +552,17 @@ diff -ur extern/btyacc/Makefile extern/btyacc/Makefile
        $(BIN_DIR)/test1-c$(SHRLIB_EXT) \
        $(BIN_DIR)/test1-c$(EXE_EXT)    \
        $(BIN_DIR)/test1-cpp$(SHRLIB_EXT)       \
+@@ -63,6 +63,10 @@
+ 
+ mkdirs: $(OBJ_DIRS) $(BIN_DIR) $(LIB_DIR)
+ 
++# These files have the same basename, so various conflicting intermediate 
files break the build
++$(BIN_DIR)/test1-c$(EXE_EXT): | $(BIN_DIR)/test1-c$(SHRLIB_EXT)
++$(BIN_DIR)/test1-cpp$(EXE_EXT): | $(BIN_DIR)/test1-cpp$(SHRLIB_EXT)
++
+ $(OBJ_DIRS) $(BIN_DIR) $(LIB_DIR):
+       @mkdir -p $@
+ 
 @@ -74,7 +74,7 @@
  -include $(addsuffix .d,$(basename $(OBJS_C)))
  -include $(addsuffix .d,$(basename $(OBJS_CPP)))
diff --git a/external/firebird/firebird-macosx.patch.1 
b/external/firebird/firebird-macosx.patch.1
index 35e631dece68..fdd544873be7 100644
--- a/external/firebird/firebird-macosx.patch.1
+++ b/external/firebird/firebird-macosx.patch.1
@@ -20,7 +20,7 @@
  
  #DYLD_PRINT_ENV=1
  #export DYLD_PRINT_ENV
-@@ -31,15 +31,15 @@
+@@ -31,8 +31,8 @@
  MACOSX_DEPLOYMENT_TARGET=10.7
  export MACOSX_DEPLOYMENT_TARGET
  
@@ -31,52 +31,6 @@
  CXXFLAGS:=$(CXXFLAGS) -fvisibility-inlines-hidden -fvisibility=hidden 
  
  EXE_LINK_OPTIONS:= 
- UNDEF_PLATFORM=
- 
- LINK_LIBS+=-liconv
--MATHLIB=/opt/local/lib/libtommath.a
-+MATHLIB=-ltommath
- SO_LINK_LIBS+=-liconv
- 
- include $(ROOT)/gen/darwin.defaults
---- firebird.org/builds/posix/postfix.darwin   2016-08-01 20:02:48.000000000 
+0200
-+++ firebird/builds/posix/postfix.darwin       2016-08-01 22:17:49.000000000 
+0200
-@@ -54,9 +54,9 @@
-       cp -r ../gen/firebird/include $(FB_FW)/Versions/A/Headers
-       cp ../gen/firebird/lib/libfbembed.dylib $(FB_FW)/Versions/A/Firebird
-       cp ../gen/firebird/lib/libfbclient.dylib 
$(FB_FW)/Versions/A/Libraries/libfbclient.dylib
--      cp ../gen/firebird/lib/libicudata.dylib 
$(FB_FW)/Versions/A/Libraries/libicudata.dylib
--      cp ../gen/firebird/lib/libicui18n.dylib 
$(FB_FW)/Versions/A/Libraries/libicui18n.dylib
--      cp ../gen/firebird/lib/libicuuc.dylib 
$(FB_FW)/Versions/A/Libraries/libicuuc.dylib
-+#     cp ../gen/firebird/lib/libicudata.dylib 
$(FB_FW)/Versions/A/Libraries/libicudata.dylib
-+#     cp ../gen/firebird/lib/libicui18n.dylib 
$(FB_FW)/Versions/A/Libraries/libicui18n.dylib
-+#     cp ../gen/firebird/lib/libicuuc.dylib 
$(FB_FW)/Versions/A/Libraries/libicuuc.dylib
-       cp ../gen/firebird/lib/libib_util.dylib 
$(FB_FW)/Versions/A/Libraries/libib_util.dylib
-       cp ../gen/firebird/firebird.msg \
-                       $(FB_FW)/Resources/English.lproj/var/firebird.msg
-@@ -68,8 +68,8 @@
-               $(FB_FW)/Resources/English.lproj/var/intl/fbintl.conf
-       chmod a+rx $(FB_FW)/Resources/English.lproj/var/intl/fbintl
-       mkdir -p $(FB_FW)/Resources/English.lproj/var/plugins
--      cp ../gen/firebird/plugins/libfbtrace.dylib \
--              $(FB_FW)/Resources/English.lproj/var/plugins/libfbtrace.dylib
-+#     cp ../gen/firebird/plugins/libfbtrace.dylib \
-+#             $(FB_FW)/Resources/English.lproj/var/plugins/libfbtrace.dylib
-       cp -r ../gen/firebird/help $(FB_FW)/Resources/English.lproj/var/help
-       cp ../gen/firebird/security2.fdb $(FB_FW)/Resources/English.lproj/var
-       mkdir -p $(FB_FW)/Resources/doc
---- firebird.org/builds/posix/Makefile.in      2016-08-08 17:58:20.000000000 
+0200
-+++ firebird/builds/posix/Makefile.in  2016-08-08 17:57:17.000000000 +0200
-@@ -191,6 +191,9 @@
-       $(MAKE) plugins
-       $(MAKE) examples
-       $(MAKE) rest
-+      install_name_tool -id 
@__________________________________________________OOO/libfbclient.dylib.3.0.0 
$(LIB)/libfbclient.dylib.3.0.0
-+      install_name_tool -id 
@__________________________________________________OOO/libEngine12.dylib 
$(PLUGINS)/libEngine12.dylib
-+      install_name_tool -change $(LIB)/libfbclient.dylib.3.0.0 
@loader_path/libfbclient.dylib.3.0.0 $(PLUGINS)/libEngine12.dylib
- 
- 
- cross_process:
 --- firebird.org/src/common/unicode_util.cpp   2016-07-07 13:55:55.992234709 
+0200
 +++ firebird/src/common/unicode_util.cpp       2016-08-10 11:25:46.422331020 
+0200
 @@ -63,8 +63,8 @@
diff --git a/solenv/gcc-wrappers/wrapper.cxx b/solenv/gcc-wrappers/wrapper.cxx
index abc0ed2864fc..fabfbfc9b346 100644
--- a/solenv/gcc-wrappers/wrapper.cxx
+++ b/solenv/gcc-wrappers/wrapper.cxx
@@ -106,6 +106,10 @@ string processccargs(vector<string> rawargs, string 
&env_prefix, bool &verbose)
     // note: always use -debug so a PDB file is created
     string linkargs(" -link -debug");
 
+    // instead of using synced PDB access (-FS), use inidividual PDB files 
based on output
+    const char *const pEnvIndividualPDBs(getenv("MSVC_USE_INDIVIDUAL_PDBS"));
+    const bool bIndividualPDBs = (pEnvIndividualPDBs && 
!strcmp(pEnvIndividualPDBs, "TRUE"));
+
     for(vector<string>::iterator i = rawargs.begin(); i != rawargs.end(); ++i) 
{
         if (env_prefix_next_arg)
         {
@@ -145,10 +149,19 @@ string processccargs(vector<string> rawargs, string 
&env_prefix, bool &verbose)
                      << (*i) << "\"" << endl;
                 exit(1);
             }
+
+            if (bIndividualPDBs)
+            {
+                if (dot == string::npos)
+                    args.append(" -Fd" + *i + ".pdb");
+                else
+                    args.append(" -Fd" + (*i).substr(0, dot) + ".pdb");
+            }
         }
         else if(*i == "-g" || !(*i).compare(0,5,"-ggdb")) {
             args.append("-Zi");
-            args.append(" -FS");
+            if (!bIndividualPDBs)
+                args.append(" -FS");
         }
         else if(!(*i).compare(0,2,"-D")) {
             // need to re-escape strings for preprocessor
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to