1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/intl/icu-patches/bug-724533 Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,303 @@ 1.4 +# HG changeset patch 1.5 +# Parent a7f3631893c30ca7f1ccf5a36674786566e48103 1.6 +# User Jeff Walden <jwalden@mit.edu> 1.7 +Bug 724533 - Make ICU build with Mozilla build for Windows. r=gps 1.8 + 1.9 +diff --git a/intl/icu/source/acinclude.m4 b/intl/icu/source/acinclude.m4 1.10 +--- a/intl/icu/source/acinclude.m4 1.11 ++++ b/intl/icu/source/acinclude.m4 1.12 +@@ -42,7 +42,10 @@ powerpc*-*-linux*) 1.13 + #error This is not MinGW64 1.14 + #endif], [], icu_cv_host_frag=mh-mingw64, icu_cv_host_frag=mh-mingw), icu_cv_host_frag=mh-cygwin) 1.15 + else 1.16 +- icu_cv_host_frag=mh-cygwin-msvc 1.17 ++ case "${host}" in 1.18 ++ *-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;; 1.19 ++ *-*-mingw32|*-*-mingw64) icu_cv_host_frag=mh-msys-msvc ;; 1.20 ++ esac 1.21 + fi ;; 1.22 + *-*-*bsd*|*-*-dragonfly*) icu_cv_host_frag=mh-bsd-gcc ;; 1.23 + *-*-aix*) 1.24 +@@ -474,7 +477,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE], 1.25 + if test "`$CC /help 2>&1 | head -c9`" = "Microsoft" 1.26 + then 1.27 + CFLAGS="$CFLAGS /W4" 1.28 +- fi 1.29 ++ fi ;; 1.30 ++ *-*-mingw32|*-*-mingw64) 1.31 ++ CFLAGS="$CFLAGS -W4" ;; 1.32 + esac 1.33 + fi 1.34 + if test "$GXX" = yes 1.35 +@@ -486,7 +491,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE], 1.36 + if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft" 1.37 + then 1.38 + CXXFLAGS="$CXXFLAGS /W4" 1.39 +- fi 1.40 ++ fi ;; 1.41 ++ *-*-mingw32|*-*-mingw64) 1.42 ++ CFLAGS="$CFLAGS -W4" ;; 1.43 + esac 1.44 + fi 1.45 + fi 1.46 +diff --git a/intl/icu/source/config/mh-cygwin-msvc b/intl/icu/source/config/mh-msys-msvc 1.47 +copy from intl/icu/source/config/mh-cygwin-msvc 1.48 +copy to intl/icu/source/config/mh-msys-msvc 1.49 +--- a/intl/icu/source/config/mh-cygwin-msvc 1.50 ++++ b/intl/icu/source/config/mh-msys-msvc 1.51 +@@ -1,4 +1,4 @@ 1.52 +-## Cygwin with Microsoft Visual C++ compiler specific setup 1.53 ++## MSYS with Microsoft Visual C++ compiler specific setup 1.54 + ## Copyright (c) 2001-2013, International Business Machines Corporation and 1.55 + ## others. All Rights Reserved. 1.56 + 1.57 +@@ -10,8 +10,8 @@ sbindir=$(bindir) 1.58 + ## Commands to generate dependency files 1.59 + GEN_DEPS.c= : 1.60 + GEN_DEPS.cc= : 1.61 +-#GEN_DEPS.c= $(COMPILE.c) /E 1.62 +-#GEN_DEPS.cc= $(COMPILE.cc) /E 1.63 ++#GEN_DEPS.c= $(COMPILE.c) -E 1.64 ++#GEN_DEPS.cc= $(COMPILE.cc) -E 1.65 + 1.66 + ## Flags to create/use a static library 1.67 + ifneq ($(ENABLE_SHARED),YES) 1.68 +@@ -41,41 +41,41 @@ CPPFLAGS+=-D_DEBUG=1#M# 1.69 + ICULIBSUFFIX:=$(ICULIBSUFFIX)d#M# 1.70 + endif 1.71 + 1.72 +-# /GF pools strings and places them into read-only memory 1.73 +-# /EHsc enables exception handling 1.74 +-# /Zc:wchar_t makes wchar_t a native type. Required for C++ ABI compatibility. 1.75 ++# -GF pools strings and places them into read-only memory 1.76 ++# -EHsc enables exception handling 1.77 ++# -Zc:wchar_t makes wchar_t a native type. Required for C++ ABI compatibility. 1.78 + # -D_CRT_SECURE_NO_DEPRECATE is needed to quiet warnings about using standard C functions. 1.79 +-CFLAGS+=/GF /nologo 1.80 +-CXXFLAGS+=/GF /nologo /EHsc /Zc:wchar_t 1.81 ++CFLAGS+=-GF -nologo 1.82 ++CXXFLAGS+=-GF -nologo -EHsc -Zc:wchar_t 1.83 + CPPFLAGS+=-D_CRT_SECURE_NO_DEPRECATE 1.84 + DEFS+=-DWIN32 -DCYGWINMSVC 1.85 +-LDFLAGS+=/nologo 1.86 ++LDFLAGS+=-nologo 1.87 + 1.88 + # Commands to compile 1.89 +-COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) /c 1.90 +-COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) /c 1.91 ++COMPILE.c= $(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c 1.92 ++COMPILE.cc= $(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c 1.93 + 1.94 + # Commands to link 1.95 +-LINK.c= LINK.EXE /subsystem:console $(LDFLAGS) 1.96 +-LINK.cc= LINK.EXE /subsystem:console $(LDFLAGS) 1.97 ++LINK.c= LINK.EXE -subsystem:console $(LDFLAGS) 1.98 ++LINK.cc= LINK.EXE -subsystem:console $(LDFLAGS) 1.99 + 1.100 + ## Commands to make a shared library 1.101 +-SHLIB.c= LINK.EXE /DLL $(LDFLAGS) 1.102 +-SHLIB.cc= LINK.EXE /DLL $(LDFLAGS) 1.103 ++SHLIB.c= LINK.EXE -DLL $(LDFLAGS) 1.104 ++SHLIB.cc= LINK.EXE -DLL $(LDFLAGS) 1.105 + 1.106 + ## Compiler switch to embed a runtime search path 1.107 + LD_RPATH= 1.108 + LD_RPATH_PRE= 1.109 + 1.110 + ## Compiler switch to embed a library name 1.111 +-LD_SONAME = /IMPLIB:$(SO_TARGET:.dll=.lib) 1.112 ++LD_SONAME = -IMPLIB:$(SO_TARGET:.dll=.lib) 1.113 + 1.114 + ## Shared object suffix 1.115 + SO = dll 1.116 + ## Non-shared intermediate object suffix 1.117 + STATIC_O = ao 1.118 + # OUTOPT is for creating a specific output name 1.119 +-OUTOPT = /out: 1.120 ++OUTOPT = -out: 1.121 + 1.122 + # Static library prefix and file extension 1.123 + LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX) 1.124 +@@ -83,11 +83,11 @@ A = lib 1.125 + 1.126 + # Cygwin's ar can't handle Win64 right now. So we use Microsoft's tool instead. 1.127 + AR = LIB.EXE#M# 1.128 +-ARFLAGS := /nologo $(ARFLAGS:r=)#M# 1.129 ++ARFLAGS := -nologo $(ARFLAGS:r=)#M# 1.130 + RANLIB = ls -s#M# 1.131 +-AR_OUTOPT = /OUT:#M# 1.132 ++AR_OUTOPT = -OUT:#M# 1.133 + 1.134 +-## An import library is needed for z/OS, MSVC and Cygwin 1.135 ++## An import library is needed for z-OS, MSVC and Cygwin 1.136 + IMPORT_LIB_EXT = .lib 1.137 + 1.138 + LIBPREFIX= 1.139 +@@ -114,37 +114,25 @@ LIBCTESTFW= $(top_builddir)/tools/ctestf 1.140 + LIBICUTOOLUTIL= $(LIBDIR)/$(LIBICU)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX).lib 1.141 + 1.142 + ## These are the library specific LDFLAGS 1.143 +-LDFLAGSICUDT+= /base:"0x4ad00000" /NOENTRY# The NOENTRY option is required for creating a resource-only DLL. 1.144 +-LDFLAGSICUUC= /base:"0x4a800000"# in-uc = 1MB 1.145 +-LDFLAGSICUI18N= /base:"0x4a900000"# io-in = 2MB 1.146 +-LDFLAGSICUIO= /base:"0x4ab00000"# le-io = 1MB 1.147 +-LDFLAGSICULE= /base:"0x4ac00000"# lx-le = 512KB 1.148 +-LDFLAGSICULX= /base:"0x4ac80000" 1.149 ++LDFLAGSICUDT+= -base:"0x4ad00000" -NOENTRY# The NOENTRY option is required for creating a resource-only DLL. 1.150 ++LDFLAGSICUUC= -base:"0x4a800000"# in-uc = 1MB 1.151 ++LDFLAGSICUI18N= -base:"0x4a900000"# io-in = 2MB 1.152 ++LDFLAGSICUIO= -base:"0x4ab00000"# le-io = 1MB 1.153 ++LDFLAGSICULE= -base:"0x4ac00000"# lx-le = 512KB 1.154 ++LDFLAGSICULX= -base:"0x4ac80000" 1.155 + LDFLAGSCTESTFW=# Unused for now. 1.156 +-LDFLAGSICUTOOLUTIL= /base:"0x4ac00000"# Same as layout. Layout and tools probably won't mix. 1.157 +- 1.158 +-# The #M# is used to delete lines for icu-config 1.159 +-# Current full path directory. 1.160 +-CURR_FULL_DIR?=$(subst \,/,$(shell cygpath -da .))#M# -m isn't used because it doesn't work on Win98 1.161 +-# Current full path directory for use in source code in a -D compiler option. 1.162 +-CURR_SRCCODE_FULL_DIR=$(subst \,\\,$(shell cygpath -da .))#M# 1.163 +- 1.164 +-ifeq ($(srcdir),.) 1.165 +-SOURCE_FILE=$< 1.166 +-else 1.167 +-SOURCE_FILE=$(shell cygpath -dma $<)#M# 1.168 +-endif 1.169 ++LDFLAGSICUTOOLUTIL= -base:"0x4ac00000"# Same as layout. Layout and tools probably won't mix. 1.170 + 1.171 + ## Compilation rules 1.172 + %.$(STATIC_O): $(srcdir)/%.c 1.173 +- $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) /Fo$@ $(SOURCE_FILE) 1.174 ++ $(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -Fo$@ $< 1.175 + %.o: $(srcdir)/%.c 1.176 +- $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) /Fo$@ $(SOURCE_FILE) 1.177 ++ $(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -Fo$@ $< 1.178 + 1.179 + %.$(STATIC_O): $(srcdir)/%.cpp 1.180 +- $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) /Fo$@ $(SOURCE_FILE) 1.181 ++ $(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -Fo$@ $< 1.182 + %.o: $(srcdir)/%.cpp 1.183 +- $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) /Fo$@ $(SOURCE_FILE) 1.184 ++ $(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -Fo$@ $< 1.185 + 1.186 + 1.187 + ## Dependency rules 1.188 +@@ -175,7 +163,7 @@ endif 1.189 + 1.190 + ## Compile a Windows resource file 1.191 + %.res : $(srcdir)/%.rc 1.192 +- rc.exe /fo$@ $(CPPFLAGS) $(SOURCE_FILE) 1.193 ++ rc.exe -fo$@ $(CPPFLAGS) $< 1.194 + 1.195 + ## Versioned target for a shared library. 1.196 + FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO) 1.197 +@@ -191,8 +179,8 @@ MIDDLE_SO_TARGET=$(FINAL_SO_TARGET) 1.198 + 1.199 + ## Special pkgdata information that is needed 1.200 + PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR) 1.201 +-ICUPKGDATA_INSTALL_DIR = $(shell mkdir -p $(DESTDIR)$(ICUPKGDATA_DIR) ; cygpath -dma $(DESTDIR)$(ICUPKGDATA_DIR))#M# 1.202 +-ICUPKGDATA_INSTALL_LIBDIR = $(shell mkdir -p $(DESTDIR)$(libdir) ; cygpath -dma $(DESTDIR)$(libdir))#M# 1.203 ++ICUPKGDATA_INSTALL_DIR = $(shell mkdir -p $(DESTDIR)$(ICUPKGDATA_DIR) ; echo $(DESTDIR)$(ICUPKGDATA_DIR))#M# 1.204 ++ICUPKGDATA_INSTALL_LIBDIR = $(shell mkdir -p $(DESTDIR)$(libdir) ; echo $(DESTDIR)$(libdir))#M# 1.205 + 1.206 + ## Versioned import library names. The library names are versioned, 1.207 + ## but the import libraries do not need versioning. 1.208 +@@ -225,5 +213,5 @@ PKGDATA_INVOKE_OPTS = MAKEFLAGS= 1.209 + # Include the version information in the shared library 1.210 + ENABLE_SO_VERSION_DATA=1 1.211 + 1.212 +-## End Cygwin-specific setup 1.213 ++## End MSYS-specific setup 1.214 + 1.215 +diff --git a/intl/icu/source/configure b/intl/icu/source/configure 1.216 +--- a/intl/icu/source/configure 1.217 ++++ b/intl/icu/source/configure 1.218 +@@ -4100,7 +4100,9 @@ fi 1.219 + if test "`$CC /help 2>&1 | head -c9`" = "Microsoft" 1.220 + then 1.221 + CFLAGS="$CFLAGS /W4" 1.222 +- fi 1.223 ++ fi ;; 1.224 ++ *-*-mingw32|*-*-mingw64) 1.225 ++ CFLAGS="$CFLAGS -W4" ;; 1.226 + esac 1.227 + fi 1.228 + if test "$GXX" = yes 1.229 +@@ -4112,7 +4114,9 @@ fi 1.230 + if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft" 1.231 + then 1.232 + CXXFLAGS="$CXXFLAGS /W4" 1.233 +- fi 1.234 ++ fi ;; 1.235 ++ *-*-mingw32|*-*-mingw64) 1.236 ++ CFLAGS="$CFLAGS -W4" ;; 1.237 + esac 1.238 + fi 1.239 + fi 1.240 +@@ -4915,7 +4919,10 @@ else 1.241 + fi 1.242 + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 1.243 + else 1.244 +- icu_cv_host_frag=mh-cygwin-msvc 1.245 ++ case "${host}" in 1.246 ++ *-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;; 1.247 ++ *-*-mingw32|*-*-mingw64) icu_cv_host_frag=mh-msys-msvc ;; 1.248 ++ esac 1.249 + fi ;; 1.250 + *-*-*bsd*|*-*-dragonfly*) icu_cv_host_frag=mh-bsd-gcc ;; 1.251 + *-*-aix*) 1.252 +@@ -5157,7 +5164,7 @@ fi 1.253 + MSVC_RELEASE_FLAG="" 1.254 + if test $enabled = yes 1.255 + then 1.256 +- if test $icu_cv_host_frag = mh-cygwin-msvc 1.257 ++ if test $icu_cv_host_frag = mh-cygwin-msvc -o $icu_cv_host_frag = mh-msys-msvc 1.258 + then 1.259 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1.260 + /* end confdefs.h. */ 1.261 +diff --git a/intl/icu/source/configure.ac b/intl/icu/source/configure.ac 1.262 +--- a/intl/icu/source/configure.ac 1.263 ++++ b/intl/icu/source/configure.ac 1.264 +@@ -330,7 +330,7 @@ AC_SUBST(UCLN_NO_AUTO_CLEANUP) 1.265 + MSVC_RELEASE_FLAG="" 1.266 + if test $enabled = yes 1.267 + then 1.268 +- if test $icu_cv_host_frag = mh-cygwin-msvc 1.269 ++ if test $icu_cv_host_frag = mh-cygwin-msvc -o $icu_cv_host_frag = mh-msys-msvc 1.270 + then 1.271 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 1.272 + #if defined _MSC_VER && _MSC_VER >= 1400 1.273 +diff --git a/intl/icu/source/data/Makefile.in b/intl/icu/source/data/Makefile.in 1.274 +--- a/intl/icu/source/data/Makefile.in 1.275 ++++ b/intl/icu/source/data/Makefile.in 1.276 +@@ -350,7 +350,8 @@ ifeq ($(ENABLE_SO_VERSION_DATA),1) 1.277 + ifeq ($(PKGDATA_MODE),dll) 1.278 + SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res 1.279 + $(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc 1.280 +- rc.exe /i$(srcdir)/../common /i$(top_builddir)/common /fo$@ $(CPPFLAGS) $(SOURCE_FILE) 1.281 ++ # fixme: need to tell whether to use - or /, $(SOURCEFILE) or $< 1.282 ++ rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $< 1.283 + endif 1.284 + endif 1.285 + 1.286 +diff --git a/intl/icu/source/runConfigureICU b/intl/icu/source/runConfigureICU 1.287 +--- a/intl/icu/source/runConfigureICU 1.288 ++++ b/intl/icu/source/runConfigureICU 1.289 +@@ -315,6 +315,17 @@ case $platform in 1.290 + CXXFLAGS="--std=c++03" 1.291 + export CXXFLAGS 1.292 + ;; 1.293 ++ MSYS/MSVC) 1.294 ++ THE_OS="MSYS" 1.295 ++ THE_COMP="Microsoft Visual C++" 1.296 ++ CC=cl; export CC 1.297 ++ CXX=cl; export CXX 1.298 ++ RELEASE_CFLAGS='-Gy -MD' 1.299 ++ RELEASE_CXXFLAGS='-Gy -MD' 1.300 ++ DEBUG_CFLAGS='-Zi -MDd' 1.301 ++ DEBUG_CXXFLAGS='-Zi -MDd' 1.302 ++ DEBUG_LDFLAGS='-DEBUG' 1.303 ++ ;; 1.304 + *BSD) 1.305 + THE_OS="BSD" 1.306 + THE_COMP="the GNU C++"