diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-07-14 23:06:03 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2020-09-11 18:43:48 +0200 |
commit | 4108665b63ab432732b8b351568c255d872cc3ff (patch) | |
tree | 79c890b3d999e6e6bfd631b8df72ae18947719aa /external | |
parent | 63972e79bbb9ea9654e755381641052632b0402c (diff) |
WIN cross: fix gpg-related library builds
Cross compiling these libraries requires to supply the cross-
compiler via the CC_FOR_BUILD environment variable. Since we have
to use the gcc-wrappers, we now need two different invocations
with different inclues and libraries, but just have fixed
environment variables. Also, the CC_FOR_BUILD clashes with LO's
own variant, but that is easy to fix.
So this change includes:
- gcc-wrappers: new option --wrapper-env-prefix to add a prefix
to the environment variable names
- gcc-wrappers: new option --wrapper-print-cmdline to dump the
real command called, when a verbose build is executed
- gcc-wrappers: default to exe, if the output has no extension
- unify build flags for gpg related libraries
Change-Id: I4e6a6ba3c6e09237c8ffefa40ce61131290a3852
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102482
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'external')
-rw-r--r-- | external/gpgmepp/ExternalProject_gpgmepp.mk | 12 | ||||
-rw-r--r-- | external/libassuan/ExternalProject_libassuan.mk | 11 | ||||
-rw-r--r-- | external/libgpg-error/ExternalProject_libgpg-error.mk | 10 |
3 files changed, 14 insertions, 19 deletions
diff --git a/external/gpgmepp/ExternalProject_gpgmepp.mk b/external/gpgmepp/ExternalProject_gpgmepp.mk index c2263413ee18..313f1e41be83 100644 --- a/external/gpgmepp/ExternalProject_gpgmepp.mk +++ b/external/gpgmepp/ExternalProject_gpgmepp.mk @@ -21,12 +21,11 @@ $(eval $(call gb_ExternalProject_use_externals,gpgmepp,\ )) ifeq ($(COM),MSC) -gb_ExternalProject_gpgmepp_host := $(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) -gb_ExternalProject_gpgmepp_target := $(if $(filter INTEL,$(CPUNAME)),pe-i386,pe-x86-64) -$(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_get_target,cpp) +$(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_get_target_for_build,cpp) $(call gb_Trace_StartRange,gpgmepp,EXTERNAL) - $(call gb_ExternalProject_run,build,\ - autoreconf \ + $(call gb_ExternalProject_run,build, \ + $(gb_WIN_GPG_cross_setup_exports) \ + && autoreconf \ && ./configure \ --disable-shared \ --disable-languages \ @@ -38,8 +37,7 @@ $(call gb_ExternalProject_get_state_target,gpgmepp,build): $(call gb_Executable_ $(if $(ENABLE_OPTIMIZED), \ $(gb_COMPILEROPTFLAGS),$(gb_COMPILERNOOPTFLAGS)) \ $(if $(call gb_Module__symbols_enabled,gpgmepp),$(gb_DEBUGINFO_FLAGS))' \ - --host=$(gb_ExternalProject_gpgmepp_host) \ - RC='windres -O COFF --target=$(gb_ExternalProject_gpgmepp_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \ + $(gb_WIN_GPG_platform_switches) \ MAKE=$(MAKE) \ && $(MAKE) \ ) diff --git a/external/libassuan/ExternalProject_libassuan.mk b/external/libassuan/ExternalProject_libassuan.mk index 565d38ff9a1c..e4e24aeac7fd 100644 --- a/external/libassuan/ExternalProject_libassuan.mk +++ b/external/libassuan/ExternalProject_libassuan.mk @@ -19,13 +19,13 @@ $(eval $(call gb_ExternalProject_use_externals,libassuan,\ libgpg-error \ )) + ifeq ($(COM),MSC) -gb_ExternalProject_libassuan_host := $(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) -gb_ExternalProject_libassuan_target := $(if $(filter INTEL,$(CPUNAME)),pe-i386,pe-x86-64) -$(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executable_get_target,cpp) +$(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executable_get_target_for_build,cpp) $(call gb_Trace_StartRange,libassuan,EXTERNAL) $(call gb_ExternalProject_run,build,\ - autoreconf \ + $(gb_WIN_GPG_cross_setup_exports) \ + && autoreconf \ && ./configure \ --enable-static \ --disable-shared \ @@ -34,8 +34,7 @@ $(call gb_ExternalProject_get_state_target,libassuan,build): $(call gb_Executabl CXXFLAGS="$(CXXFLAGS)" \ GPG_ERROR_CFLAGS="$(GPG_ERROR_CFLAGS)" \ GPG_ERROR_LIBS="$(GPG_ERROR_LIBS)" \ - --host=$(gb_ExternalProject_libassuan_host) \ - RC='windres -O COFF --target=$(gb_ExternalProject_libassuan_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \ + $(gb_WIN_GPG_platform_switches) \ MAKE=$(MAKE) \ && $(MAKE) \ ) diff --git a/external/libgpg-error/ExternalProject_libgpg-error.mk b/external/libgpg-error/ExternalProject_libgpg-error.mk index cf0b594dca24..736079c77aec 100644 --- a/external/libgpg-error/ExternalProject_libgpg-error.mk +++ b/external/libgpg-error/ExternalProject_libgpg-error.mk @@ -16,20 +16,18 @@ $(eval $(call gb_ExternalProject_register_targets,libgpg-error,\ $(eval $(call gb_ExternalProject_use_autoconf,libgpg-error,build)) ifeq ($(COM),MSC) -gb_ExternalProject_libgpg-error_host := $(if $(filter INTEL,$(CPUNAME)),i686-mingw32,x86_64-w64-mingw32) -gb_ExternalProject_libgpg-error_target := $(if $(filter INTEL,$(CPUNAME)),pe-i386,pe-x86-64) -$(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Executable_get_target,cpp) +$(call gb_ExternalProject_get_state_target,libgpg-error,build): $(call gb_Executable_get_target_for_build,cpp) $(call gb_Trace_StartRange,libgpg-error,EXTERNAL) $(call gb_ExternalProject_run,build,\ - MAKE=$(MAKE) ./configure \ + $(gb_WIN_GPG_cross_setup_exports) \ + && MAKE=$(MAKE) ./configure \ --enable-static \ --disable-shared \ --disable-rpath \ --disable-languages \ --disable-doc \ --disable-tests \ - --host=$(gb_ExternalProject_libgpg-error_host) \ - RC='windres -O COFF --target=$(gb_ExternalProject_libgpg-error_target) --preprocessor='\''$(call gb_Executable_get_target,cpp) -+ -DRC_INVOKED -DWINAPI_FAMILY=0 $(SOLARINC)'\' \ + $(gb_WIN_GPG_platform_switches) \ && $(MAKE) \ ) $(call gb_Trace_EndRange,libgpg-error,EXTERNAL) |