[Libreoffice-commits] core.git: external/icu

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 30 02:45:48 UTC 2020


 external/icu/ExternalProject_icu.mk  |   20 +++++----
 external/icu/UnpackedTarball_icu.mk  |    3 +
 external/icu/icu4c-win-arm64.patch.1 |   76 +++++++++++++++++++++++++++++++++++
 3 files changed, 91 insertions(+), 8 deletions(-)

New commits:
commit 6c94958e56fcbacb8e1f689550a60034b074857c
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jul 17 22:25:01 2020 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed Sep 30 04:45:07 2020 +0200

    icu: fix Windows Arm64 build
    
    I couldn't find a general solution to select the correct build path
    when cross compiling for Windows Arm64, so this just adds the patch
    in exactly this case, which WFM.
    
    Change-Id: I6e53e1531048404b70dcf61eab0a7f4021076868
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102852
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>

diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk
index 8913ebdfdf6f..b9fb3f497971 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -17,17 +17,21 @@ icu_CPPFLAGS:="-DHAVE_GCC_ATOMICS=$(if $(filter TRUE,$(GCC_HAVE_BUILTIN_ATOMIC))
 
 ifeq ($(OS),WNT)
 
-# Note: runConfigureICU ignores everything following the platform name!
 $(call gb_ExternalProject_get_state_target,icu,build) :
 	$(call gb_Trace_StartRange,icu,EXTERNAL)
 	$(call gb_ExternalProject_run,build,\
-		export LIB="$(ILIB)" PYTHONWARNINGS="default" \
-		&& CFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS)" CPPFLAGS="$(SOLARINC)" CXXFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS)" \
-			INSTALL=`cygpath -m /usr/bin/install` \
-			./runConfigureICU \
-			$(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug --disable-release) \
-			Cygwin/MSVC --disable-extras \
-		&& $(MAKE) $(if $(verbose),VERBOSE=1) \
+		autoconf \
+		&& export LIB="$(ILIB)" PYTHONWARNINGS="default" \
+			gb_ICU_XFLAGS="-FS $(SOLARINC) $(gb_DEBUGINFO_FLAGS) $(if $(MSVC_USE_DEBUG_RUNTIME),-MDd,-MD -Gy)" \
+		&& CFLAGS="$${gb_ICU_XFLAGS}" CPPFLAGS="$(SOLARINC)" CXXFLAGS="$${gb_ICU_XFLAGS}" \
+			INSTALL=`cygpath -m /usr/bin/install` $(if $(MSVC_USE_DEBUG_RUNTIME),LDFLAGS="-DEBUG") \
+			./configure \
+				$(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug --disable-release) \
+				$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
+					--with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source \
+				    $(if $(GNUMAKE_WIN_NATIVE),--enable-native-make)) \
+				--disable-extras \
+		&& $(MAKE) $(if $(CROSS_COMPILING),DATASUBDIR=data) $(if $(verbose),VERBOSE=1) \
 	,source)
 	$(call gb_Trace_EndRange,icu,EXTERNAL)
 
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index a602a1e77d4c..9638f4fb9b0e 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -40,6 +40,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
 	external/icu/Wdeprecated-copy-dtor.patch \
 	external/icu/icu4c-khmerbreakengine.patch.1 \
 	external/icu/strict_ansi.patch \
+	$(if $(CROSS_COMPILING),\
+		$(if $(filter WNT_ARM64,$(OS)_$(CPUNAME)),external/icu/icu4c-win-arm64.patch.1) \
+	)\
 ))
 
 $(eval $(call gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-win-arm64.patch.1 b/external/icu/icu4c-win-arm64.patch.1
new file mode 100644
index 000000000000..272310fed845
--- /dev/null
+++ b/external/icu/icu4c-win-arm64.patch.1
@@ -0,0 +1,76 @@
+diff -ur icu.org/source/acinclude.m4 icu/source/acinclude.m4
+--- icu.org/source/acinclude.m4     2020-04-10 16:22:16.000000000 +0200
++++ icu/source/acinclude.m4 2020-04-21 22:14:09.940217733 +0200
+@@ -52,6 +52,12 @@
+ 	else
+ 		icu_cv_host_frag=mh-cygwin-msvc
+ 	fi ;;
++aarch64-*-cygwin)
++	if test "$GCC" = yes; then
++		icu_cv_host_frag=mh-cygwin64
++	else
++		icu_cv_host_frag=mh-cygwin-msvc
++	fi ;;
+ *-*-mingw*)
+ 	if test "$GCC" = yes; then
+                 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+diff -ur icu.org/source/configure.ac icu/source/configure.ac
+--- icu.org/source/configure.ac     2020-04-10 16:22:16.000000000 +0200
++++ icu/source/configure.ac 2020-04-21 22:14:09.940217733 +0200
+@@ -252,6 +252,23 @@
+     fi
+ fi
+ AC_SUBST(cross_buildroot)
++
++native_make="no"
++ENABLE_RELEASE=1
++AC_ARG_ENABLE(native-make,
++    [  --enable-native-make        build with naive make (Cygwin only) [default=no]],
++    [ case "${enableval}" in
++      yes|"") native_make="yes" ;;
++      esac ],
++)
++
++cross_path_buildroot="$cross_buildroot"
++if test "x$native_make" = "xyes"; then
++    case "${host}" in
++    *-*-cygwin*) cross_path_buildroot=$(cygpath -u "$cross_buildroot") ;;
++    esac
++fi
++AC_SUBST(cross_path_buildroot)
+ 
+ # Check for doxygen to generate documentation
+ AC_PATH_PROG(DOXYGEN,doxygen,,$PATH:/usr/local/bin:/usr/bin)
+diff -ur icu.org/source/icudefs.mk.in icu/source/icudefs.mk.in
+--- icu.org/source/icudefs.mk.in     2020-04-10 16:22:16.000000000 +0200
++++ icu/source/icudefs.mk.in 2020-04-21 22:14:09.940217733 +0200
+@@ -40,6 +40,7 @@
+ # controls the include of $(top_builddir)/icucross.mk at bottom of file
+ cross_compiling = @cross_compiling@
+ cross_buildroot = @cross_buildroot@
++cross_path_buildroot = @cross_path_buildroot@
+ 
+ # Package information
+ 
+diff -ur icu.org/source/Makefile.in icu/source/Makefile.in
+--- icu.org/source/Makefile.in     2020-04-10 16:22:16.000000000 +0200
++++ icu/source/Makefile.in 2020-04-21 22:14:09.940217733 +0200
+@@ -90,15 +90,15 @@
+ 	  echo "TOOLEXEEXT=$(EXEEXT)" \
+ 	   ) > $@
+ 	@(echo 'TOOLBINDIR=$$(cross_buildroot)/bin' ;\
+-	  echo 'TOOLLIBDIR=$$(cross_buildroot)/lib' ;\
++	  echo 'TOOLLIBDIR=$$(cross_path_buildroot)/lib' ;\
+ 	  echo "INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(TOOLLIBDIR):$$(cross_buildroot)/stubdata:$$(cross_buildroot)/tools/ctestfw:$$$$'"$(LDLIBRARYPATH_ENVVAR)" ;\
+ 	  echo "PKGDATA_INVOKE=$(LDLIBRARYPATH_ENVVAR)=$(LIBRARY_PATH_PREFIX)"'$$(cross_buildroot)/stubdata:$$(cross_buildroot)/tools/ctestfw:$$(TOOLLIBDIR):$$$$'"$(LDLIBRARYPATH_ENVVAR) " ;\
+ 	  echo ) >> $@
+ 
+ config/icucross.inc: $(top_builddir)/icudefs.mk  $(top_builddir)/Makefile @platform_make_fragment@
+ 	@echo rebuilding $@
+-	@(grep '^CURR_FULL_DIR' $(top_builddir)/icudefs.mk ; \
+-	  grep '^CURR_FULL_DIR' @platform_make_fragment@ || echo ""; \
++	@(grep '^CURR_FULL_DIR' @platform_make_fragment@ || echo ""; \
++	  grep '^CURR_FULL_DIR' $(top_builddir)/icudefs.mk ; \
+ 	   ) > $@
+ 
+ config/icu.pc: $(srcdir)/config/icu.pc.in


More information about the Libreoffice-commits mailing list