intl/icu-patches/bug-724533

Wed, 31 Dec 2014 07:22:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:22:50 +0100
branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
permissions
-rw-r--r--

Correct previous dual key logic pending first delivery installment.

     1 # HG changeset patch
     2 # Parent a7f3631893c30ca7f1ccf5a36674786566e48103
     3 # User Jeff Walden <jwalden@mit.edu>
     4 Bug 724533 - Make ICU build with Mozilla build for Windows. r=gps
     6 diff --git a/intl/icu/source/acinclude.m4 b/intl/icu/source/acinclude.m4
     7 --- a/intl/icu/source/acinclude.m4
     8 +++ b/intl/icu/source/acinclude.m4
     9 @@ -42,7 +42,10 @@ powerpc*-*-linux*)
    10  #error This is not MinGW64
    11  #endif], [], icu_cv_host_frag=mh-mingw64, icu_cv_host_frag=mh-mingw), icu_cv_host_frag=mh-cygwin)
    12  	else
    13 -		icu_cv_host_frag=mh-cygwin-msvc
    14 +		case "${host}" in
    15 +		*-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;;
    16 +		*-*-mingw32|*-*-mingw64) icu_cv_host_frag=mh-msys-msvc ;;
    17 +		esac
    18  	fi ;;
    19  *-*-*bsd*|*-*-dragonfly*) 	icu_cv_host_frag=mh-bsd-gcc ;;
    20  *-*-aix*)
    21 @@ -474,7 +477,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
    22                  if test "`$CC /help 2>&1 | head -c9`" = "Microsoft"
    23                  then
    24                      CFLAGS="$CFLAGS /W4"
    25 -                fi
    26 +                fi ;;
    27 +            *-*-mingw32|*-*-mingw64)
    28 +                CFLAGS="$CFLAGS -W4" ;;
    29              esac
    30          fi
    31          if test "$GXX" = yes
    32 @@ -486,7 +491,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE],
    33                  if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
    34                  then
    35                      CXXFLAGS="$CXXFLAGS /W4"
    36 -                fi
    37 +                fi ;;
    38 +            *-*-mingw32|*-*-mingw64)
    39 +                CFLAGS="$CFLAGS -W4" ;;
    40              esac
    41          fi
    42      fi
    43 diff --git a/intl/icu/source/config/mh-cygwin-msvc b/intl/icu/source/config/mh-msys-msvc
    44 copy from intl/icu/source/config/mh-cygwin-msvc
    45 copy to intl/icu/source/config/mh-msys-msvc
    46 --- a/intl/icu/source/config/mh-cygwin-msvc
    47 +++ b/intl/icu/source/config/mh-msys-msvc
    48 @@ -1,4 +1,4 @@
    49 -## Cygwin with Microsoft Visual C++ compiler specific setup
    50 +## MSYS with Microsoft Visual C++ compiler specific setup
    51  ## Copyright (c) 2001-2013, International Business Machines Corporation and
    52  ## others. All Rights Reserved.
    54 @@ -10,8 +10,8 @@ sbindir=$(bindir)
    55  ## Commands to generate dependency files
    56  GEN_DEPS.c=	:
    57  GEN_DEPS.cc=	:
    58 -#GEN_DEPS.c=	$(COMPILE.c) /E
    59 -#GEN_DEPS.cc=	$(COMPILE.cc) /E
    60 +#GEN_DEPS.c=	$(COMPILE.c) -E
    61 +#GEN_DEPS.cc=	$(COMPILE.cc) -E
    63  ## Flags to create/use a static library
    64  ifneq ($(ENABLE_SHARED),YES)
    65 @@ -41,41 +41,41 @@ CPPFLAGS+=-D_DEBUG=1#M#
    66  ICULIBSUFFIX:=$(ICULIBSUFFIX)d#M#
    67  endif
    69 -# /GF pools strings and places them into read-only memory
    70 -# /EHsc enables exception handling
    71 -# /Zc:wchar_t makes wchar_t a native type. Required for C++ ABI compatibility.
    72 +# -GF pools strings and places them into read-only memory
    73 +# -EHsc enables exception handling
    74 +# -Zc:wchar_t makes wchar_t a native type. Required for C++ ABI compatibility.
    75  # -D_CRT_SECURE_NO_DEPRECATE is needed to quiet warnings about using standard C functions.
    76 -CFLAGS+=/GF /nologo
    77 -CXXFLAGS+=/GF /nologo /EHsc /Zc:wchar_t
    78 +CFLAGS+=-GF -nologo
    79 +CXXFLAGS+=-GF -nologo -EHsc -Zc:wchar_t
    80  CPPFLAGS+=-D_CRT_SECURE_NO_DEPRECATE
    81  DEFS+=-DWIN32 -DCYGWINMSVC
    82 -LDFLAGS+=/nologo
    83 +LDFLAGS+=-nologo
    85  # Commands to compile
    86 -COMPILE.c=	$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) /c
    87 -COMPILE.cc=	$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) /c
    88 +COMPILE.c=	$(CC) $(CPPFLAGS) $(DEFS) $(CFLAGS) -c
    89 +COMPILE.cc=	$(CXX) $(CPPFLAGS) $(DEFS) $(CXXFLAGS) -c
    91  # Commands to link
    92 -LINK.c=		LINK.EXE /subsystem:console $(LDFLAGS)
    93 -LINK.cc=	LINK.EXE /subsystem:console $(LDFLAGS)
    94 +LINK.c=		LINK.EXE -subsystem:console $(LDFLAGS)
    95 +LINK.cc=	LINK.EXE -subsystem:console $(LDFLAGS)
    97  ## Commands to make a shared library
    98 -SHLIB.c=	LINK.EXE /DLL $(LDFLAGS)
    99 -SHLIB.cc=	LINK.EXE /DLL $(LDFLAGS)
   100 +SHLIB.c=	LINK.EXE -DLL $(LDFLAGS)
   101 +SHLIB.cc=	LINK.EXE -DLL $(LDFLAGS)
   103  ## Compiler switch to embed a runtime search path
   104  LD_RPATH=	
   105  LD_RPATH_PRE=
   107  ## Compiler switch to embed a library name
   108 -LD_SONAME = /IMPLIB:$(SO_TARGET:.dll=.lib)
   109 +LD_SONAME = -IMPLIB:$(SO_TARGET:.dll=.lib)
   111  ## Shared object suffix
   112  SO = dll
   113  ## Non-shared intermediate object suffix
   114  STATIC_O = ao
   115  # OUTOPT is for creating a specific output name
   116 -OUTOPT = /out:
   117 +OUTOPT = -out:
   119  # Static library prefix and file extension
   120  LIBSICU = $(STATIC_PREFIX)$(ICUPREFIX)
   121 @@ -83,11 +83,11 @@ A = lib
   123  # Cygwin's ar can't handle Win64 right now. So we use Microsoft's tool instead.
   124  AR = LIB.EXE#M#
   125 -ARFLAGS := /nologo $(ARFLAGS:r=)#M#
   126 +ARFLAGS := -nologo $(ARFLAGS:r=)#M#
   127  RANLIB = ls -s#M#
   128 -AR_OUTOPT = /OUT:#M#
   129 +AR_OUTOPT = -OUT:#M#
   131 -## An import library is needed for z/OS, MSVC and Cygwin
   132 +## An import library is needed for z-OS, MSVC and Cygwin
   133  IMPORT_LIB_EXT = .lib
   135  LIBPREFIX=
   136 @@ -114,37 +114,25 @@ LIBCTESTFW=	$(top_builddir)/tools/ctestf
   137  LIBICUTOOLUTIL=	$(LIBDIR)/$(LIBICU)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX).lib
   139  ## These are the library specific LDFLAGS
   140 -LDFLAGSICUDT+=	/base:"0x4ad00000" /NOENTRY# The NOENTRY option is required for creating a resource-only DLL.
   141 -LDFLAGSICUUC=	/base:"0x4a800000"# in-uc = 1MB
   142 -LDFLAGSICUI18N=	/base:"0x4a900000"# io-in = 2MB
   143 -LDFLAGSICUIO=	/base:"0x4ab00000"# le-io = 1MB
   144 -LDFLAGSICULE=	/base:"0x4ac00000"# lx-le = 512KB
   145 -LDFLAGSICULX=	/base:"0x4ac80000"
   146 +LDFLAGSICUDT+=	-base:"0x4ad00000" -NOENTRY# The NOENTRY option is required for creating a resource-only DLL.
   147 +LDFLAGSICUUC=	-base:"0x4a800000"# in-uc = 1MB
   148 +LDFLAGSICUI18N=	-base:"0x4a900000"# io-in = 2MB
   149 +LDFLAGSICUIO=	-base:"0x4ab00000"# le-io = 1MB
   150 +LDFLAGSICULE=	-base:"0x4ac00000"# lx-le = 512KB
   151 +LDFLAGSICULX=	-base:"0x4ac80000"
   152  LDFLAGSCTESTFW=# Unused for now.
   153 -LDFLAGSICUTOOLUTIL=	/base:"0x4ac00000"# Same as layout. Layout and tools probably won't mix.
   154 -
   155 -# The #M# is used to delete lines for icu-config
   156 -# Current full path directory.
   157 -CURR_FULL_DIR?=$(subst \,/,$(shell cygpath -da .))#M# -m isn't used because it doesn't work on Win98
   158 -# Current full path directory for use in source code in a -D compiler option.
   159 -CURR_SRCCODE_FULL_DIR=$(subst \,\\,$(shell cygpath -da .))#M#
   160 -
   161 -ifeq ($(srcdir),.)
   162 -SOURCE_FILE=$<
   163 -else
   164 -SOURCE_FILE=$(shell cygpath -dma $<)#M#
   165 -endif
   166 +LDFLAGSICUTOOLUTIL=	-base:"0x4ac00000"# Same as layout. Layout and tools probably won't mix.
   168  ## Compilation rules
   169  %.$(STATIC_O): $(srcdir)/%.c
   170 -	$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) /Fo$@ $(SOURCE_FILE)
   171 +	$(COMPILE.c) $(STATICCPPFLAGS) $(STATICCFLAGS) -Fo$@ $<
   172  %.o: $(srcdir)/%.c
   173 -	$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) /Fo$@ $(SOURCE_FILE)
   174 +	$(COMPILE.c) $(DYNAMICCPPFLAGS) $(DYNAMICCFLAGS) -Fo$@ $<
   176  %.$(STATIC_O): $(srcdir)/%.cpp
   177 -	$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) /Fo$@ $(SOURCE_FILE)
   178 +	$(COMPILE.cc) $(STATICCPPFLAGS) $(STATICCXXFLAGS) -Fo$@ $<
   179  %.o: $(srcdir)/%.cpp
   180 -	$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) /Fo$@ $(SOURCE_FILE)
   181 +	$(COMPILE.cc) $(DYNAMICCPPFLAGS) $(DYNAMICCXXFLAGS) -Fo$@ $<
   184  ## Dependency rules
   185 @@ -175,7 +163,7 @@ endif
   187  ## Compile a Windows resource file
   188  %.res : $(srcdir)/%.rc
   189 -	rc.exe /fo$@ $(CPPFLAGS) $(SOURCE_FILE)
   190 +	rc.exe -fo$@ $(CPPFLAGS) $<
   192  ## Versioned target for a shared library.
   193  FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
   194 @@ -191,8 +179,8 @@ MIDDLE_SO_TARGET=$(FINAL_SO_TARGET)
   196  ## Special pkgdata information that is needed
   197  PKGDATA_VERSIONING = -r $(SO_TARGET_VERSION_MAJOR)
   198 -ICUPKGDATA_INSTALL_DIR = $(shell mkdir -p  $(DESTDIR)$(ICUPKGDATA_DIR) ;  cygpath -dma $(DESTDIR)$(ICUPKGDATA_DIR))#M#
   199 -ICUPKGDATA_INSTALL_LIBDIR = $(shell mkdir -p  $(DESTDIR)$(libdir) ; cygpath -dma $(DESTDIR)$(libdir))#M#
   200 +ICUPKGDATA_INSTALL_DIR = $(shell mkdir -p  $(DESTDIR)$(ICUPKGDATA_DIR) ;  echo $(DESTDIR)$(ICUPKGDATA_DIR))#M#
   201 +ICUPKGDATA_INSTALL_LIBDIR = $(shell mkdir -p  $(DESTDIR)$(libdir) ; echo $(DESTDIR)$(libdir))#M#
   203  ## Versioned import library names. The library names are versioned,
   204  ## but the import libraries do not need versioning.
   205 @@ -225,5 +213,5 @@ PKGDATA_INVOKE_OPTS = MAKEFLAGS=
   206  # Include the version information in the shared library
   207  ENABLE_SO_VERSION_DATA=1
   209 -## End Cygwin-specific setup
   210 +## End MSYS-specific setup
   212 diff --git a/intl/icu/source/configure b/intl/icu/source/configure
   213 --- a/intl/icu/source/configure
   214 +++ b/intl/icu/source/configure
   215 @@ -4100,7 +4100,9 @@ fi
   216                  if test "`$CC /help 2>&1 | head -c9`" = "Microsoft"
   217                  then
   218                      CFLAGS="$CFLAGS /W4"
   219 -                fi
   220 +                fi ;;
   221 +            *-*-mingw32|*-*-mingw64)
   222 +                CFLAGS="$CFLAGS -W4" ;;
   223              esac
   224          fi
   225          if test "$GXX" = yes
   226 @@ -4112,7 +4114,9 @@ fi
   227                  if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
   228                  then
   229                      CXXFLAGS="$CXXFLAGS /W4"
   230 -                fi
   231 +                fi ;;
   232 +            *-*-mingw32|*-*-mingw64)
   233 +                CFLAGS="$CFLAGS -W4" ;;
   234              esac
   235          fi
   236      fi
   237 @@ -4915,7 +4919,10 @@ else
   238  fi
   239  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
   240  	else
   241 -		icu_cv_host_frag=mh-cygwin-msvc
   242 +		case "${host}" in
   243 +		*-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;;
   244 +		*-*-mingw32|*-*-mingw64) icu_cv_host_frag=mh-msys-msvc ;;
   245 +		esac
   246  	fi ;;
   247  *-*-*bsd*|*-*-dragonfly*) 	icu_cv_host_frag=mh-bsd-gcc ;;
   248  *-*-aix*)
   249 @@ -5157,7 +5164,7 @@ fi
   250  MSVC_RELEASE_FLAG=""
   251  if test $enabled = yes
   252  then
   253 -    if test $icu_cv_host_frag = mh-cygwin-msvc
   254 +    if test $icu_cv_host_frag = mh-cygwin-msvc -o $icu_cv_host_frag = mh-msys-msvc
   255      then
   256          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
   257  /* end confdefs.h.  */
   258 diff --git a/intl/icu/source/configure.ac b/intl/icu/source/configure.ac
   259 --- a/intl/icu/source/configure.ac
   260 +++ b/intl/icu/source/configure.ac
   261 @@ -330,7 +330,7 @@ AC_SUBST(UCLN_NO_AUTO_CLEANUP)
   262  MSVC_RELEASE_FLAG=""
   263  if test $enabled = yes
   264  then
   265 -    if test $icu_cv_host_frag = mh-cygwin-msvc
   266 +    if test $icu_cv_host_frag = mh-cygwin-msvc -o $icu_cv_host_frag = mh-msys-msvc
   267      then
   268          AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
   269      #if defined _MSC_VER && _MSC_VER >= 1400
   270 diff --git a/intl/icu/source/data/Makefile.in b/intl/icu/source/data/Makefile.in
   271 --- a/intl/icu/source/data/Makefile.in
   272 +++ b/intl/icu/source/data/Makefile.in
   273 @@ -350,7 +350,8 @@ ifeq ($(ENABLE_SO_VERSION_DATA),1)
   274  ifeq ($(PKGDATA_MODE),dll)
   275  SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res
   276  $(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc
   277 -	rc.exe /i$(srcdir)/../common /i$(top_builddir)/common /fo$@ $(CPPFLAGS) $(SOURCE_FILE)
   278 +        # fixme: need to tell whether to use - or /, $(SOURCEFILE) or $<
   279 +	rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $<
   280  endif
   281  endif
   283 diff --git a/intl/icu/source/runConfigureICU b/intl/icu/source/runConfigureICU
   284 --- a/intl/icu/source/runConfigureICU
   285 +++ b/intl/icu/source/runConfigureICU
   286 @@ -315,6 +315,17 @@ case $platform in
   287          CXXFLAGS="--std=c++03"
   288          export CXXFLAGS
   289          ;;
   290 +    MSYS/MSVC)
   291 +        THE_OS="MSYS"
   292 +        THE_COMP="Microsoft Visual C++"
   293 +        CC=cl; export CC
   294 +        CXX=cl; export CXX
   295 +        RELEASE_CFLAGS='-Gy -MD'
   296 +        RELEASE_CXXFLAGS='-Gy -MD'
   297 +        DEBUG_CFLAGS='-Zi -MDd'
   298 +        DEBUG_CXXFLAGS='-Zi -MDd'
   299 +        DEBUG_LDFLAGS='-DEBUG'
   300 +        ;;
   301      *BSD)
   302          THE_OS="BSD"
   303          THE_COMP="the GNU C++"

mercurial