[Libreoffice-commits] core.git: bridges/Library_cpp_uno.mk config_host.mk.in configure.ac RepositoryExternal.mk RepositoryFixes.mk solenv/gbuild

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Sat May 29 15:31:01 UTC 2021


 RepositoryExternal.mk                     |   19 ++++++-----------
 RepositoryFixes.mk                        |    5 ++--
 bridges/Library_cpp_uno.mk                |   32 +++++++++++++++---------------
 config_host.mk.in                         |    2 +
 configure.ac                              |   17 +++++++++++++++
 solenv/gbuild/ComponentTarget.mk          |    2 -
 solenv/gbuild/CppunitTest.mk              |    2 -
 solenv/gbuild/Library.mk                  |   10 +++++++++
 solenv/gbuild/TargetLocations.mk          |   12 +++++++++++
 solenv/gbuild/platform/WNT_AARCH64_MSC.mk |    1 
 solenv/gbuild/platform/WNT_INTEL_MSC.mk   |    1 
 solenv/gbuild/platform/WNT_X86_64_MSC.mk  |    1 
 solenv/gbuild/platform/com_GCC_defs.mk    |    4 ---
 solenv/gbuild/platform/com_MSC_class.mk   |    1 
 solenv/gbuild/platform/com_MSC_defs.mk    |    2 -
 solenv/gbuild/platform/macosx.mk          |    1 
 solenv/gbuild/platform/unxgcc.mk          |    2 +
 17 files changed, 75 insertions(+), 39 deletions(-)

New commits:
commit e9301742254b85f4c6fbfd9378b365c76f5ff367
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sat May 22 02:41:58 2021 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sat May 29 17:30:26 2021 +0200

    gbuild: implement gb_Library_get_target_for_build
    
    I was wondering why removing instdir stuff forced a rebuild of
    the cross toolset. Turned out some cross-toolset bits were wrongly
    depending on host build stuff. It even had FIXME...
    
    As a consequence, gb_CPPU_ENV was replaced by config_host.mk flags
    to provide an CPPU_ENV_FOR_BUILD and also uses the correct
    OS_FOR_BUILD.
    
    Change-Id: I50e8e8dca50ab1ad3164948a585a792a52e4a39a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116359
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index a45ffa35613d..d9a22effc962 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3857,19 +3857,17 @@ endif # SYSTEM_JFREEREPORT
 
 # Executables
 
-# FIXME: the library target should be for build too
 define gb_Executable__register_bestreversemap
 $(call gb_Executable_add_runtime_dependencies,bestreversemap,\
-	$(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target,sal_textenc))) \
+	$(if $(filter $(OS),ANDROID),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(call gb_Library_get_target_for_build,sal_textenc))) \
 )
 endef
 
 # TODO depending on the whole URE might be overkill, but I do not have a
 # Windows machine to debug it...
-# FIXME: the library target should be for build too
 define gb_Executable__register_climaker
 $(call gb_Executable_add_runtime_dependencies,climaker,\
-	$(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
+	$(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
 	$(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
 	$(call gb_UnoApi_get_target,udkapi) \
 	$(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno)
@@ -3883,12 +3881,11 @@ $(call gb_Executable_add_runtime_dependencies,cppumaker,\
 endef
 
 # This is used to determine what we need for 'build' platform.
-# FIXME: the library target should be for build too
 define gb_Executable__register_gengal
 $(call gb_Executable_add_runtime_dependencies,gengal,\
-	$(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
-	$(if $(filter MACOSX,$(OS)),$(call gb_Library_get_target,vclplug_osx)) \
-	$(if $(filter WNT,$(OS)),$(call gb_Library_get_target,vclplug_win)) \
+	$(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
+	$(if $(filter MACOSX,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_osx)) \
+	$(if $(filter WNT,$(OS_FOR_BUILD)),$(call gb_Library_get_target_for_build,vclplug_win)) \
 	$(if $(filter host,$(gb_Side)),$(call gb_Package_get_target,postprocess_images)) \
 	$(call gb_Package_get_target_for_build,postprocess_registry) \
 	$(INSTROOT_FOR_BUILD)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
@@ -3929,10 +3926,9 @@ endef
 # FIXME ure/services.rdb needs cleanup
 # The dependencies on ure/services.rdb and udkapi.rdb are implicitly required
 # due to the settings for URE_SERVICES and URE_TYPES in cppuhelper/source/unorc:
-# FIXME: the library target should be for build too
 define gb_Executable__register_saxparser
 $(call gb_Executable_add_runtime_dependencies,saxparser,\
-	$(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
+	$(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
 	$(call gb_Package_get_target_for_build,instsetoo_native_setup_ure) \
 	$(call gb_Rdb_get_target_for_build,saxparser) \
 	$(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER_FOR_BUILD)/services.rdb \
@@ -3943,10 +3939,9 @@ endef
 # NOTE: the dependencies on ure/services.rdb and udkapi.rdb are implicitly
 # required due to the settings for URE_SERVICES and URE_TYPES in
 # cppuhelper/source/unorc
-# FIXME: the library target should be for build too
 define gb_Executable__register_uno
 $(call gb_Executable_add_runtime_dependencies,uno,\
-	$(call gb_Library_get_target,$(gb_CPPU_ENV)_uno) \
+	$(call gb_Library_get_target_for_build,$(CPPU_ENV_FOR_BUILD)_uno) \
 	$(INSTROOT_FOR_BUILD)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
 	$(call gb_UnoApi_get_target,udkapi) \
 )
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 741f6bbfee21..db78722ce545 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -40,8 +40,6 @@ endif
 gb_Executable_FILENAMES := $(patsubst soffice_exe:soffice_exe%,soffice_exe:soffice.exe,$(gb_Executable_FILENAMES))
 gb_Executable_FILENAMES := $(patsubst soffice_com:soffice_com%,soffice_com:soffice.com,$(gb_Executable_FILENAMES))
 
-gb_Executable_FILENAMES_FOR_BUILD := $(subst $(gb_Executable_EXT),$(gb_Executable_EXT_for_build),$(gb_Executable_FILENAMES))
-
 # fixes for .jnilibs on macOS that are not also needed as .dylibs:
 ifeq ($(OS),MACOSX)
 gb_Library_FILENAMES := \
@@ -100,4 +98,7 @@ gb_Library_FILENAMES += $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):lib$(
 
 endif # ifeq ($(OS),WNT)
 
+gb_Executable_FILENAMES_FOR_BUILD := $(subst $(gb_Executable_EXT),$(gb_Executable_EXT_for_build),$(gb_Executable_FILENAMES))
+gb_Library_FILENAMES_FOR_BUILD := $(subst $(gb_Library_PLAINEXT),$(gb_Library_PLAINEXT_FOR_BUILD),$(gb_Library_FILENAMES))
+
 # vim: set noet sw=4 ts=4:
diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index 4981a81bee42..3a31bf69fc7c 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -7,7 +7,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_Library_Library,$(gb_CPPU_ENV)_uno))
+$(eval $(call gb_Library_Library,$(CPPU_ENV)_uno))
 
 ifeq ($(CPUNAME),ARM)
 
@@ -28,7 +28,7 @@ bridges_SELECTED_BRIDGE := gcc3_linux_aarch64
 bridge_asm_objects := vtableslotcall
 bridge_exception_objects := abi cpp2uno uno2cpp
 
-$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno, \
+$(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno, \
     bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/callvirtualfunction, \
     $(if $(HAVE_GCC_STACK_CLASH_PROTECTION),-fno-stack-clash-protection) \
 	$(if $(COM_IS_CLANG),-fasynchronous-unwind-tables) \
@@ -185,25 +185,25 @@ endif
 
 endif
 
-$(eval $(call gb_Library_use_internal_comprehensive_api,$(gb_CPPU_ENV)_uno,\
+$(eval $(call gb_Library_use_internal_comprehensive_api,$(CPPU_ENV)_uno,\
 	udkapi \
 ))
 
 ifeq ($(OS),MACOSX)
 ifeq ($(CPUNAME),AARCH64)
-$(eval $(call gb_Library_use_internal_comprehensive_api,$(gb_CPPU_ENV)_uno,\
+$(eval $(call gb_Library_use_internal_comprehensive_api,$(CPPU_ENV)_uno,\
 	offapi \
 ))
 endif
 endif
 
-$(eval $(call gb_Library_set_include,$(gb_CPPU_ENV)_uno,\
+$(eval $(call gb_Library_set_include,$(CPPU_ENV)_uno,\
 	-I$(SRCDIR)/bridges/inc \
 	$$(INCLUDE) \
 ))
 
 ifeq ($(HAVE_POSIX_FALLOCATE),YES)
-$(eval $(call gb_Library_add_defs,$(gb_CPPU_ENV)_uno,\
+$(eval $(call gb_Library_add_defs,$(CPPU_ENV)_uno,\
 	-DHAVE_POSIX_FALLOCATE \
 ))
 endif
@@ -235,40 +235,40 @@ bridges_NON_CALL_EXCEPTIONS_FLAGS := -fnon-call-exceptions
 endif
 endif
 
-$(eval $(call gb_Library_use_libraries,$(gb_CPPU_ENV)_uno,\
+$(eval $(call gb_Library_use_libraries,$(CPPU_ENV)_uno,\
 	cppu \
 	sal \
 ))
 
 $(foreach obj,$(bridge_exception_objects),\
-	$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
+	$(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
 	bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
 )
 $(foreach obj,$(bridge_noncallexception_objects),\
-	$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
+	$(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
 	bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
 	, $(bridges_NON_CALL_EXCEPTIONS_FLAGS) )) \
 )
 $(foreach obj,$(bridge_noopt_objects),\
-		$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
+		$(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
 				bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
 				, $(gb_COMPILERNOOPTFLAGS))) \
  )
 $(foreach obj,$(bridge_noncallexception_noopt_objects),\
-		$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
+		$(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
 				bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj) \
 				, $(gb_COMPILERNOOPTFLAGS) $(bridges_NON_CALL_EXCEPTIONS_FLAGS) )) \
  )
 $(foreach obj,$(bridge_cxx_objects),\
-		$(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
+		$(eval $(call gb_Library_add_cxxobjects,$(CPPU_ENV)_uno,\
 				bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
  )
 $(foreach obj,$(bridge_asm_objects),\
-		$(eval $(call gb_Library_add_asmobjects,$(gb_CPPU_ENV)_uno,\
+		$(eval $(call gb_Library_add_asmobjects,$(CPPU_ENV)_uno,\
 				bridges/source/cpp_uno/$(bridges_SELECTED_BRIDGE)/$(obj))) \
  )
 
-$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
+$(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
 			bridges/source/cpp_uno/shared/bridge \
 			bridges/source/cpp_uno/shared/component \
 			bridges/source/cpp_uno/shared/types \
@@ -278,13 +278,13 @@ $(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
 	))
 
 ifeq ($(COM),MSC)
-$(eval $(call gb_Library_add_exception_objects,$(gb_CPPU_ENV)_uno,\
+$(eval $(call gb_Library_add_exception_objects,$(CPPU_ENV)_uno,\
     bridges/source/cpp_uno/msvc_shared/cpp2uno \
     bridges/source/cpp_uno/msvc_shared/except \
 ))
 endif
 
-$(eval $(call gb_Library_add_cxxobjects,$(gb_CPPU_ENV)_uno,\
+$(eval $(call gb_Library_add_cxxobjects,$(CPPU_ENV)_uno,\
 			bridges/source/cpp_uno/shared/cppinterfaceproxy \
 			, $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \
 	))
diff --git a/config_host.mk.in b/config_host.mk.in
index 3dee84bf4f25..b6288472ea6d 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -86,6 +86,8 @@ export COMPILER_PLUGINS_CXX_LINKFLAGS=@COMPILER_PLUGINS_CXX_LINKFLAGS@
 export COMPILER_PLUGINS_DEBUG=@COMPILER_PLUGINS_DEBUG@
 export COMPILER_PLUGINS_TOOLING_ARGS=@COMPILER_PLUGINS_TOOLING_ARGS@
 export COM_IS_CLANG=@COM_IS_CLANG@
+export CPPU_ENV=@CPPU_ENV@
+export CPPU_ENV_FOR_BUILD=@CPPU_ENV_FOR_BUILD@
 export CPPUNIT_CFLAGS=$(gb_SPACE)@CPPUNIT_CFLAGS@
 export CPPUNIT_LIBS=$(gb_SPACE)@CPPUNIT_LIBS@
 export CPUNAME=@CPUNAME@
diff --git a/configure.ac b/configure.ac
index 4175aae4aa41..43fb8d877515 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5210,6 +5210,20 @@ AC_SUBST(PLATFORMID)
 AC_SUBST(WINDOWS_X64)
 AC_DEFINE_UNQUOTED(WORKDIR,"$WORKDIR")
 
+if test "$OS" = WNT -a "$COM" = MSC; then
+    case "$CPUNAME" in
+    INTEL) CPPU_ENV=msci ;;
+    X86_64) CPPU_ENV=mscx ;;
+    AARCH64) CPPU_ENV=msca ;;
+    *)
+        AC_MSG_ERROR([Unknown \$CPUNAME '$CPUNAME' for $OS / $COM"])
+        ;;
+    esac
+else
+    CPPU_ENV=gcc3
+fi
+AC_SUBST(CPPU_ENV)
+
 dnl ===================================================================
 dnl Test which package format to use
 dnl ===================================================================
@@ -5410,6 +5424,7 @@ if test "$cross_compiling" = "yes"; then
     # all these will get a _FOR_BUILD postfix
     DIRECT_FOR_BUILD_SETTINGS="
         CC
+        CPPU_ENV
         CXX
         ILIB
         JAVA_HOME
@@ -5495,6 +5510,7 @@ if test "$cross_compiling" = "yes"; then
 else
     OS_FOR_BUILD="$OS"
     CC_FOR_BUILD="$CC"
+    CPPU_ENV_FOR_BUILD="$CPPU_ENV"
     CXX_FOR_BUILD="$CXX"
     INSTDIR_FOR_BUILD="$INSTDIR"
     INSTROOT_FOR_BUILD="$INSTROOT"
@@ -5516,6 +5532,7 @@ AC_SUBST(SDKDIRNAME_FOR_BUILD)
 AC_SUBST(WORKDIR_FOR_BUILD)
 AC_SUBST(CC_FOR_BUILD)
 AC_SUBST(CXX_FOR_BUILD)
+AC_SUBST(CPPU_ENV_FOR_BUILD)
 
 dnl ===================================================================
 dnl Check for syslog header
diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
index 8b1ad971bb02..067f24e35ce6 100644
--- a/solenv/gbuild/ComponentTarget.mk
+++ b/solenv/gbuild/ComponentTarget.mk
@@ -30,7 +30,7 @@ $(if $(LIBFILENAME),,$(call gb_Output_error,No LIBFILENAME set at component targ
 	mkdir -p $(dir $(1)) && \
 	$(call gb_ExternalExecutable_get_command,xsltproc) --nonet \
 		--stringparam uri '$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,$(subst \d,$$,$(COMPONENTPREFIX)))$(LIBFILENAME)' \
-		--stringparam cppu_env $(gb_CPPU_ENV) -o $(1) \
+		--stringparam cppu_env $(CPPU_ENV) -o $(1) \
 		$(gb_ComponentTarget_XSLTCOMMANDFILE) $(COMPONENTSOURCE)
 endef
 
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 6877ec5ac792..ce6437bf07bd 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -220,7 +220,7 @@ endef
 define gb_CppunitTest_use_ure
 $(call gb_CppunitTest_use_rdb,$(1),ure/services)
 $(call gb_CppunitTest_get_target,$(1)) : URE := $(true)
-$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,$(gb_CPPU_ENV)_uno)
+$(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,$(CPPU_ENV)_uno)
 $(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,affine_uno)
 $(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,unobootstrapprotector)
 $(call gb_CppunitTest_get_target,$(1)) : $(call gb_Library_get_target,unoexceptionprotector)
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 77b58c7e99db..f8a08f915d35 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -35,6 +35,13 @@ gb_Library_LAYER_DIRS := \
 	OXT:$(WORKDIR)/LinkTarget/ExtensionLibrary \
 	NONE:$(gb_Library_DLLDIR) \
 
+gb_Library_LAYER_DIRS_FOR_BUILD := \
+	URELIB:$(INSTROOT_FOR_BUILD)/$(LIBO_URE_LIB_FOLDER_FOR_BUILD) \
+	OOO:$(INSTROOT_FOR_BUILD)/$(LIBO_LIB_FOLDER_FOR_BUILD) \
+	SHLXTHDL:$(INSTROOT_FOR_BUILD)/$(LIBO_LIB_FOLDER_FOR_BUILD)/shlxthdl \
+	OXT:$(WORKDIR_FOR_BUILD)/LinkTarget/ExtensionLibrary \
+	NONE:$(gb_Library_DLLDIR_FOR_BUILD) \
+
 # EVIL: gb_StaticLibrary and gb_Library need the same deliver rule because they are indistinguishable on windows
 .PHONY : $(WORKDIR)/Clean/Library/%
 $(WORKDIR)/Clean/Library/% :
@@ -43,7 +50,9 @@ $(WORKDIR)/Clean/Library/% :
 			$(AUXTARGETS))
 
 gb_Library__get_dir_for_layer = $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_LAYER_DIRS)))
+gb_Library__get_dir_for_layer_for_build = $(patsubst $(1):%,%,$(filter $(1):%,$(call gb_Library_LAYER_DIRS_FOR_BUILD)))
 gb_Library_get_instdir = $(call gb_Library__get_dir_for_layer,$(call gb_Library_get_layer,$(1)))
+gb_Library_get_instdir_for_build = $(call gb_Library__get_dir_for_layer_for_build,$(call gb_Library_get_layer,$(1)))
 
 gb_Library_get_ilib_target = $(if $(filter $(1),$(gb_Library_RTVERLIBS) $(gb_Library_UNOVERLIBS)),$(call gb_Library_get_sdk_link_dir)/$(call gb_Library_get_ilibfilename,$(1)),$(gb_Library_DLLDIR)/$(call gb_Library_get_ilibfilename,$(1)))
 
@@ -161,6 +170,7 @@ gb_Library__COMPONENTPREFIXES := \
 
 
 gb_Library_get_runtime_filename = $(call gb_Library_get_filename,$(1))
+gb_Library_get_runtime_filename_for_build = $(call gb_Library_get_filename_for_build,$(1))
 
 # forward the call to the gb_LinkTarget implementation
 # (note: because the function name is in $(1), the other args are shifted by 1)
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 801d188be737..46e875d6d227 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -342,6 +342,10 @@ define gb_Library_get_filename
 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_FILENAMES)))
 endef
 
+define gb_Library_get_filename_for_build
+$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_FILENAMES_FOR_BUILD)))
+endef
+
 define gb_Executable_get_filename
 $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Executable_FILENAMES)))
 endef
@@ -393,6 +397,13 @@ endef
 define gb_Library_get_target
 $(call gb_Library_get_instdir,$(1))/$(call gb_Library_get_runtime_filename,$(1))
 endef
+ifneq ($(CROSS_COMPILING),)
+define gb_Library_get_target_for_build
+$(call gb_Library_get_instdir_for_build,$(1))/$(call gb_Library_get_runtime_filename_for_build,$(1))
+endef
+else
+gb_Library_get_target_for_build = $(gb_Library_get_target)
+endif # CROSS_COMPILING
 # this returns a tuple of both the linktargetname, and the target file
 define gb_Library_get_linktarget
 $(call gb_Library__get_workdir_linktargetname,$(1))<>$(call gb_Library_get_target,$(1))
@@ -438,6 +449,7 @@ gb_Library_WORKDIR_FOR_BUILD = $(WORKDIR_FOR_BUILD)/LinkTarget/Library
 gb_Executable_BINDIR = $(WORKDIR)/LinkTarget/Executable
 gb_Executable_BINDIR_FOR_BUILD = $(WORKDIR_FOR_BUILD)/LinkTarget/Executable
 gb_Library_DLLDIR = $(WORKDIR)/LinkTarget/Library
+gb_Library_DLLDIR_FOR_BUILD = $(WORKDIR_FOR_BUILD)/LinkTarget/Library
 gb_CppunitTest_DLLDIR = $(WORKDIR)/LinkTarget/CppunitTest
 
 # static variables declared here because they are used globally
diff --git a/solenv/gbuild/platform/WNT_AARCH64_MSC.mk b/solenv/gbuild/platform/WNT_AARCH64_MSC.mk
index 67e1d5736736..c9cf931385e8 100644
--- a/solenv/gbuild/platform/WNT_AARCH64_MSC.mk
+++ b/solenv/gbuild/platform/WNT_AARCH64_MSC.mk
@@ -17,7 +17,6 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
-gb_CPPU_ENV := msca
 gb_CPUDEFS := -D_ARM64_=1
 
 include $(GBUILDDIR)/platform/com_MSC_defs.mk
diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 704c7f7817dc..690a7083a850 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -17,7 +17,6 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
-gb_CPPU_ENV := msci
 gb_CPUDEFS := -D_X86_=1
 
 include $(GBUILDDIR)/platform/com_MSC_defs.mk
diff --git a/solenv/gbuild/platform/WNT_X86_64_MSC.mk b/solenv/gbuild/platform/WNT_X86_64_MSC.mk
index 54533f749452..18eae3e746e5 100644
--- a/solenv/gbuild/platform/WNT_X86_64_MSC.mk
+++ b/solenv/gbuild/platform/WNT_X86_64_MSC.mk
@@ -17,7 +17,6 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
-gb_CPPU_ENV := mscx
 gb_CPUDEFS := -D_AMD64_=1
 
 include $(GBUILDDIR)/platform/com_MSC_defs.mk
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 7846a05a5f92..09ca90a91f69 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -41,14 +41,12 @@ ifeq ($(strip $(gb_COMPILEROPTFLAGS)),)
 gb_COMPILEROPTFLAGS := -O2
 endif
 
-gb_CPPU_ENV := gcc3
-
 gb_AFLAGS := $(AFLAGS)
 
 gb_COMPILERDEFS := \
 	-DBOOST_ERROR_CODE_HEADER_ONLY \
 	-DBOOST_SYSTEM_NO_DEPRECATED \
-	-DCPPU_ENV=$(gb_CPPU_ENV) \
+	-DCPPU_ENV=$(CPPU_ENV) \
 	$(if $(filter EMSCRIPTEN,$(OS)),-U_FORTIFY_SOURCE) \
 
 gb_CFLAGS_COMMON := \
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 3e2ea893ae08..76dea12e1ec6 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -310,6 +310,7 @@ gb_Library_get_rpath :=
 
 gb_Library_SYSPRE := i
 gb_Library_PLAINEXT := .lib
+gb_Library_PLAINEXT_FOR_BUILD := .lib
 
 gb_Library_LAYER := \
 	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index 4c3b4e21e737..2737cfa26af9 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -56,7 +56,7 @@ gb_COMPILERDEFS := \
 	-D_SCL_SECURE_NO_WARNINGS \
 	-D_MT \
 	-D_DLL \
-	-DCPPU_ENV=$(gb_CPPU_ENV) \
+	-DCPPU_ENV=$(CPPU_ENV) \
 
 ifeq ($(CPUNAME),INTEL)
 gb_COMPILERDEFS += \
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index 295b4e1aeb3e..a24cefe1080e 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -177,6 +177,7 @@ gb_Library_UDK_MAJORVER := 3
 gb_Library_SYSPRE := lib
 gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
 gb_Library_PLAINEXT := .dylib
+gb_Library_PLAINEXT_FOR_BUILD := .dylib
 gb_Library_DLLEXT := .dylib
 gb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT)
 
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 749ba8e17932..4a96547b48b8 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -188,6 +188,7 @@ gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
 ifeq ($(DISABLE_DYNLOADING),TRUE)
 
 gb_Library_PLAINEXT := .a
+gb_Library_PLAINEXT_FOR_BUILD := .so
 gb_Library_DLLEXT := .a
 
 else
@@ -195,6 +196,7 @@ else
 gb_Library_TARGETTYPEFLAGS := -shared -Wl,-z,noexecstack
 gb_Library_UDK_MAJORVER := 3
 gb_Library_PLAINEXT := .so
+gb_Library_PLAINEXT_FOR_BUILD := .so
 gb_Library_DLLEXT := .so
 
 endif


More information about the Libreoffice-commits mailing list