diff options
author | Eike Rathke <erack@redhat.com> | 2019-10-29 00:16:18 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-10-30 09:14:48 +0100 |
commit | 369cb79a994dc52de0e1ee02c2d824efcc0c18d3 (patch) | |
tree | 285abe293afe62739f985054ccb58c507d9cf52f /external/icu | |
parent | f645993593ff931d1659e701487131e3bd1b40f5 (diff) |
Upgrade to ICU 65.1
sberg says: On Windows, implicit --enable-extras first causes a build breaker
in workdir/UnpackedTarball/icu/source/extras/scrptrun when linking, because
Windows link.exe doesn't understand -o. But even with a patch
> --- source/extra/scrptrun/Makefile.in
> +++ source/extra/scrptrun/Makefile.in
> @@ -74,7 +74,7 @@
> && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
>
> $(TARGET) : $(OBJECTS)
> - $(LINK.cc) -o $@ $^ $(LIBS)
> + $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
> $(POST_BUILD_STEP)
>
> invoke:
linking would still fail with a missing ../../lib/icuucdd.lib, which is
apparently expanded from $(LIBS) there, but I have no idea where it should be
built but isn't. Lets hope that --disable-extras is sufficient for our needs.
Change-Id: I6d0117b230caa41abf488fcd069028e3474700f8
Reviewed-on: https://gerrit.libreoffice.org/81632
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external/icu')
-rw-r--r-- | external/icu/ExternalProject_icu.mk | 2 | ||||
-rw-r--r-- | external/icu/UnpackedTarball_icu.mk | 2 | ||||
-rw-r--r-- | external/icu/gcc9.patch | 9 | ||||
-rw-r--r-- | external/icu/icu4c-61-werror-shadow.patch.1 | 35 | ||||
-rw-r--r-- | external/icu/icu4c-64-54558d1dd01b29c763ca12b6327108fe3ac66637.patch.2 | 268 | ||||
-rw-r--r-- | external/icu/icu4c-android.patch.1 | 8 | ||||
-rw-r--r-- | external/icu/icu4c-scriptrun.patch.1 | 4 | ||||
-rw-r--r-- | external/icu/icu4c-ubsan.patch.1 | 12 | ||||
-rw-r--r-- | external/icu/icu4c-warnings.patch.1 | 8 |
9 files changed, 21 insertions, 327 deletions
diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk index 806db1535e4b..b01190917497 100644 --- a/external/icu/ExternalProject_icu.mk +++ b/external/icu/ExternalProject_icu.mk @@ -25,7 +25,7 @@ $(call gb_ExternalProject_get_state_target,icu,build) : INSTALL=`cygpath -m /usr/bin/install` \ ./runConfigureICU \ $(if $(MSVC_USE_DEBUG_RUNTIME),--enable-debug --disable-release) \ - Cygwin/MSVC \ + Cygwin/MSVC --disable-extras \ && $(MAKE) \ ,source) diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk index dfa7a28d4994..d615a1fe855e 100644 --- a/external/icu/UnpackedTarball_icu.mk +++ b/external/icu/UnpackedTarball_icu.mk @@ -35,11 +35,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ external/icu/icu4c-clang-cl.patch.1 \ $(if $(filter-out ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \ external/icu/icu4c-khmerbreakengine.patch.1 \ - external/icu/icu4c-61-werror-shadow.patch.1 \ external/icu/gcc9.patch \ external/icu/char8_t.patch \ external/icu/c++20-comparison.patch \ - external/icu/icu4c-64-54558d1dd01b29c763ca12b6327108fe3ac66637.patch.2 \ external/icu/ubsan.patch \ )) diff --git a/external/icu/gcc9.patch b/external/icu/gcc9.patch index 5bacd203586f..5c9808f8c3a3 100644 --- a/external/icu/gcc9.patch +++ b/external/icu/gcc9.patch @@ -14,14 +14,13 @@ #include "unicode/utypes.h" -@@ -302,6 +309,10 @@ - U_NAMESPACE_END +@@ -314,5 +314,9 @@ + + #endif /* U_SHOW_CPLUSPLUS_API */ - #endif /* #if !UCONFIG_NO_FORMATTING */ -+ +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif - ++ #endif // _FORMAT //eof diff --git a/external/icu/icu4c-61-werror-shadow.patch.1 b/external/icu/icu4c-61-werror-shadow.patch.1 deleted file mode 100644 index b00f76317eff..000000000000 --- a/external/icu/icu4c-61-werror-shadow.patch.1 +++ /dev/null @@ -1,35 +0,0 @@ -# https://ssl.icu-project.org/trac/ticket/13709 -# Werror=shadow fails for unistr.h -diff -ur icu.org/source/common/unicode/unistr.h icu/source/common/unicode/unistr.h ---- icu.org/source/common/unicode/unistr.h 2018-03-26 15:38:29.000000000 +0200 -+++ icu/source/common/unicode/unistr.h 2018-04-18 10:44:16.321188314 +0200 -@@ -3053,11 +3053,11 @@ - * uint16_t * constructor. - * Delegates to UnicodeString(const char16_t *, int32_t). - * @param text UTF-16 string -- * @param length string length -+ * @param textLength string length - * @stable ICU 59 - */ -- UnicodeString(const uint16_t *text, int32_t length) : -- UnicodeString(ConstChar16Ptr(text), length) {} -+ UnicodeString(const uint16_t *text, int32_t textLength) : -+ UnicodeString(ConstChar16Ptr(text), textLength) {} - #endif - - #if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) -@@ -3066,11 +3066,11 @@ - * (Only defined if U_SIZEOF_WCHAR_T==2.) - * Delegates to UnicodeString(const char16_t *, int32_t). - * @param text NUL-terminated UTF-16 string -- * @param length string length -+ * @param textLength string length - * @stable ICU 59 - */ -- UnicodeString(const wchar_t *text, int32_t length) : -- UnicodeString(ConstChar16Ptr(text), length) {} -+ UnicodeString(const wchar_t *text, int32_t textLength) : -+ UnicodeString(ConstChar16Ptr(text), textLength) {} - #endif - - /** diff --git a/external/icu/icu4c-64-54558d1dd01b29c763ca12b6327108fe3ac66637.patch.2 b/external/icu/icu4c-64-54558d1dd01b29c763ca12b6327108fe3ac66637.patch.2 deleted file mode 100644 index 5b9a830f6112..000000000000 --- a/external/icu/icu4c-64-54558d1dd01b29c763ca12b6327108fe3ac66637.patch.2 +++ /dev/null @@ -1,268 +0,0 @@ -From 54558d1dd01b29c763ca12b6327108fe3ac66637 Mon Sep 17 00:00:00 2001 -From: Alon Bar-Lev <alon.barlev@gmail.com> -Date: Sat, 30 Mar 2019 09:59:46 +0300 -Subject: [PATCH] ICU-20530 Re-support include under extern "C" - -Up until icu-6.3 icu supported include under extern "C" under the explicit -requirements, see comment of U_NAMESPACE_BEGIN at uversion.h: - - * \def U_NAMESPACE_BEGIN - * This is used to begin a declaration of a public ICU C++ API. - * When not compiling for C++, it does nothing. - * When compiling for C++, it begins an extern "C++" linkage block (to protect - * against cases in which an external client includes ICU header files inside - * an extern "C" linkage block). - * - * It also begins a versioned-ICU-namespace block. - * @stable ICU 2.4 - -Recent changes were made to include C++ headers within global scope which -broke this behavior. - -To keep requested behavior add two additional macros U_CXX_BEGIN, U_CXX_END to -avoid breakage of doxygen while enforcing C++ API visibility. - -Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com> ---- - icu4c/source/common/unicode/char16ptr.h | 5 +++- - icu4c/source/common/unicode/localpointer.h | 2 ++ - icu4c/source/common/unicode/std_string.h | 3 +++ - icu4c/source/common/unicode/umachine.h | 25 +++++++++++++++++++ - icu4c/source/common/unicode/unistr.h | 5 +++- - icu4c/source/common/unicode/uversion.h | 15 ++++------- - .../i18n/unicode/numberrangeformatter.h | 5 +++- - icu4c/source/io/unicode/ustream.h | 2 ++ - icu4c/source/test/hdrtst/Makefile.in | 16 ++++++++++-- - 9 files changed, 63 insertions(+), 15 deletions(-) - -diff --git a/icu4c/source/common/unicode/char16ptr.h b/icu4c/source/common/unicode/char16ptr.h -index a7c5f1a0c5e..f774d7d8b21 100644 ---- a/icu4c/source/common/unicode/char16ptr.h -+++ b/icu4c/source/common/unicode/char16ptr.h -@@ -7,9 +7,12 @@ - #ifndef __CHAR16PTR_H__ - #define __CHAR16PTR_H__ - --#include <cstddef> - #include "unicode/utypes.h" - -+U_CXX_BEGIN -+#include <cstddef> -+U_CXX_END -+ - /** - * \file - * \brief C++ API: char16_t pointer wrappers with -diff --git a/icu4c/source/common/unicode/localpointer.h b/icu4c/source/common/unicode/localpointer.h -index e011688b1a5..fd26dc40e9d 100644 ---- a/icu4c/source/common/unicode/localpointer.h -+++ b/icu4c/source/common/unicode/localpointer.h -@@ -42,7 +42,9 @@ - - #if U_SHOW_CPLUSPLUS_API - -+U_CXX_BEGIN - #include <memory> -+U_CXX_END - - U_NAMESPACE_BEGIN - -diff --git a/icu4c/source/common/unicode/std_string.h b/icu4c/source/common/unicode/std_string.h -index 729c5639950..d293e714fe0 100644 ---- a/icu4c/source/common/unicode/std_string.h -+++ b/icu4c/source/common/unicode/std_string.h -@@ -32,6 +32,9 @@ - #if defined(__GLIBCXX__) - namespace std { class type_info; } - #endif -+ -+U_CXX_BEGIN - #include <string> -+U_CXX_END - - #endif // __STD_STRING_H__ -diff --git a/icu4c/source/common/unicode/umachine.h b/icu4c/source/common/unicode/umachine.h -index 0205da62eb4..6137c125df4 100644 ---- a/icu4c/source/common/unicode/umachine.h -+++ b/icu4c/source/common/unicode/umachine.h -@@ -75,14 +75,39 @@ - * @stable ICU 2.4 - */ - -+/** -+ * \def U_CXX_BEGIN -+ * This is used to begin a C++ block. -+ * When not compiling for C++, it does nothing. -+ * When compiling for C++, it begins an extern "C++" linkage block (to protect -+ * against cases in which an external client includes ICU header files inside -+ * an extern "C" linkage block). -+ * -+ * @draft ICU 65 -+ */ -+ -+/** -+ * \def U_CXX_END -+ * This is used to end a declaration of a C++ API. -+ * When not compiling for C++, it does nothing. -+ * When compiling for C++, it ends the extern "C++" block begun by -+ * U_CXX_BEGIN. -+ * -+ * @draft ICU 65 -+ */ -+ - #ifdef __cplusplus - # define U_CFUNC extern "C" - # define U_CDECL_BEGIN extern "C" { - # define U_CDECL_END } -+# define U_CXX_BEGIN extern "C++" { -+# define U_CXX_END } - #else - # define U_CFUNC extern - # define U_CDECL_BEGIN - # define U_CDECL_END -+# define U_CXX_BEGIN -+# define U_CXX_END - #endif - - #ifndef U_ATTRIBUTE_DEPRECATED -diff --git a/icu4c/source/common/unicode/unistr.h b/icu4c/source/common/unicode/unistr.h -index d79168b9195..c323e33c07c 100644 ---- a/icu4c/source/common/unicode/unistr.h -+++ b/icu4c/source/common/unicode/unistr.h -@@ -28,7 +28,6 @@ - * \brief C++ API: Unicode String - */ - --#include <cstddef> - #include "unicode/utypes.h" - #include "unicode/char16ptr.h" - #include "unicode/rep.h" -@@ -36,6 +35,10 @@ - #include "unicode/stringpiece.h" - #include "unicode/bytestream.h" - -+U_CXX_BEGIN -+#include <cstddef> -+U_CXX_END -+ - struct UConverter; // unicode/ucnv.h - - #ifndef USTRING_H -diff --git a/icu4c/source/common/unicode/uversion.h b/icu4c/source/common/unicode/uversion.h -index 4aaa8b4d606..9e6bd13734f 100644 ---- a/icu4c/source/common/unicode/uversion.h -+++ b/icu4c/source/common/unicode/uversion.h -@@ -64,13 +64,10 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; - - /** - * \def U_NAMESPACE_BEGIN -- * This is used to begin a declaration of a public ICU C++ API. -+ * This is used to begin a declaration of a public ICU C++ API within -+ * versioned-ICU-namespace block. - * When not compiling for C++, it does nothing. -- * When compiling for C++, it begins an extern "C++" linkage block (to protect -- * against cases in which an external client includes ICU header files inside -- * an extern "C" linkage block). - * -- * It also begins a versioned-ICU-namespace block. - * @stable ICU 2.4 - */ - -@@ -78,10 +75,8 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; - * \def U_NAMESPACE_END - * This is used to end a declaration of a public ICU C++ API. - * When not compiling for C++, it does nothing. -- * When compiling for C++, it ends the extern "C++" block begun by -- * U_NAMESPACE_BEGIN. -+ * It ends the versioned-ICU-namespace block begun by U_NAMESPACE_BEGIN. - * -- * It also ends the versioned-ICU-namespace block begun by U_NAMESPACE_BEGIN. - * @stable ICU 2.4 - */ - -@@ -116,8 +111,8 @@ typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; - namespace icu = U_ICU_NAMESPACE; - # endif - --# define U_NAMESPACE_BEGIN extern "C++" { namespace U_ICU_NAMESPACE { --# define U_NAMESPACE_END } } -+# define U_NAMESPACE_BEGIN U_CXX_BEGIN namespace U_ICU_NAMESPACE { -+# define U_NAMESPACE_END } U_CXX_END - # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE; - # define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE:: - -diff --git a/icu4c/source/i18n/unicode/numberrangeformatter.h b/icu4c/source/i18n/unicode/numberrangeformatter.h -index 4a386b80394..0c6eb62ae1f 100644 ---- a/icu4c/source/i18n/unicode/numberrangeformatter.h -+++ b/icu4c/source/i18n/unicode/numberrangeformatter.h -@@ -5,13 +5,16 @@ - #ifndef __NUMBERRANGEFORMATTER_H__ - #define __NUMBERRANGEFORMATTER_H__ - --#include <atomic> - #include "unicode/appendable.h" - #include "unicode/fieldpos.h" - #include "unicode/formattedvalue.h" - #include "unicode/fpositer.h" - #include "unicode/numberformatter.h" - -+U_CXX_BEGIN -+#include <atomic> -+U_CXX_END -+ - #ifndef U_HIDE_DRAFT_API - - /** -diff --git a/icu4c/source/io/unicode/ustream.h b/icu4c/source/io/unicode/ustream.h -index c10ce6a2de5..e1ec87c75d3 100644 ---- a/icu4c/source/io/unicode/ustream.h -+++ b/icu4c/source/io/unicode/ustream.h -@@ -34,7 +34,9 @@ - namespace std { class type_info; } // WORKAROUND: http://llvm.org/bugs/show_bug.cgi?id=13364 - #endif - -+U_CXX_BEGIN - #include <iostream> -+U_CXX_END - - U_NAMESPACE_BEGIN - -diff --git a/icu4c/source/test/hdrtst/Makefile.in b/icu4c/source/test/hdrtst/Makefile.in -index 55e833943d5..a485f7a80d6 100644 ---- a/icu4c/source/test/hdrtst/Makefile.in -+++ b/icu4c/source/test/hdrtst/Makefile.in -@@ -53,7 +53,7 @@ E_DEP="[6/$(E_NUM)] Hide Deprecated: " - E_INT="[7/$(E_NUM)] Hide Internal: " - E_OBS="[8/$(E_NUM)] Hide Obsolete: " - --check: dtest ctest cpptest doclean drafttest deprtest internaltest obsoletetest -+check: dtest ctest cpptest cpptest_extern_c doclean drafttest deprtest internaltest obsoletetest - ifeq ($(MAKECMDGOALS),check) - $(MAKE) clean - else -@@ -74,6 +74,18 @@ cpptest: - done ;\ - exit $$FAIL - -+cpptest_extern_c: -+ @FAIL=0;for file in `ls $(prefix)/include/unicode/*.h | fgrep -v -f $(srcdir)/pfiles.txt`; do \ -+ incfile=`basename $$file .h` ; \ -+ echo "$@ unicode/$$incfile.h" ; \ -+ echo 'extern "C" {' > ht_$$incfile.cpp ; \ -+ echo '#include "'unicode/$$incfile'.h"' >> ht_$$incfile.cpp ; \ -+ echo '}' >> ht_$$incfile.cpp ; \ -+ echo 'void junk(){}' >> ht_$$incfile.cpp ; \ -+ $(COMPILE.cc) -c $(cppflags) ht_$$incfile.cpp || FAIL=1 ; \ -+ done ;\ -+ exit $$FAIL -+ - # layout is removed - - dtest: -@@ -170,5 +182,5 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - --.PHONY: doclean check all cpptest dtest ctest clean distclean -+.PHONY: doclean check all cpptest cpptest_extern_c dtest ctest clean distclean - diff --git a/external/icu/icu4c-android.patch.1 b/external/icu/icu4c-android.patch.1 index b012b0c11cd2..79b648615116 100644 --- a/external/icu/icu4c-android.patch.1 +++ b/external/icu/icu4c-android.patch.1 @@ -1,8 +1,8 @@ diff -ur icu.org/source/common/unicode/platform.h icu/source/common/unicode/platform.h ---- icu.org/source/common/unicode/platform.h 2018-10-02 00:39:56.000000000 +0200 -+++ icu/source/common/unicode/platform.h 2018-10-20 00:36:24.598886605 +0200 -@@ -789,7 +789,7 @@ - #elif defined(_MSC_VER) || (__has_declspec_attribute(dllexport) && __has_declspec_attribute(dllimport)) +--- icu.org/source/common/unicode/platform.h 2019-10-03 13:16:41.000000000 +0200 ++++ icu/source/common/unicode/platform.h 2019-10-29 22:58:26.881221287 +0100 +@@ -818,7 +818,7 @@ + UPRV_HAS_DECLSPEC_ATTRIBUTE(dllimport)) # define U_EXPORT __declspec(dllexport) #elif defined(__GNUC__) -# define U_EXPORT __attribute__((visibility("default"))) diff --git a/external/icu/icu4c-scriptrun.patch.1 b/external/icu/icu4c-scriptrun.patch.1 index fe81d19c846e..f2f2cf9f3b55 100644 --- a/external/icu/icu4c-scriptrun.patch.1 +++ b/external/icu/icu4c-scriptrun.patch.1 @@ -39,8 +39,8 @@ diff -ur icu.org/source/extra/scrptrun/scrptrun.h icu/source/extra/scrptrun/scrp #include "unicode/uscript.h" +#include <vector> - struct ScriptRecord - { + U_NAMESPACE_BEGIN + @@ -81,7 +82,7 @@ int32_t scriptEnd; UScriptCode scriptCode; diff --git a/external/icu/icu4c-ubsan.patch.1 b/external/icu/icu4c-ubsan.patch.1 index ea9f13fd85cd..7b0c2efc92ab 100644 --- a/external/icu/icu4c-ubsan.patch.1 +++ b/external/icu/icu4c-ubsan.patch.1 @@ -1,14 +1,14 @@ diff -ur icu.org/source/common/ubidiimp.h icu/source/common/ubidiimp.h ---- icu.org/source/common/ubidiimp.h 2017-02-03 19:57:23.000000000 +0100 -+++ icu/source/common/ubidiimp.h 2017-04-21 22:46:25.374651159 +0200 +--- icu.org/source/common/ubidiimp.h 2019-10-03 13:16:41.000000000 +0200 ++++ icu/source/common/ubidiimp.h 2019-10-28 19:08:13.533284618 +0100 @@ -198,8 +198,8 @@ /* in a Run, logicalStart will get this bit set if the run level is odd */ #define INDEX_ODD_BIT (1UL<<31) --#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)(level)<<31)) --#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((int32_t)(level)<<31)) -+#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((uint32_t)(level)<<31)) -+#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((uint32_t)(level)<<31)) +-#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)((level)&1)<<31)) +-#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((int32_t)((level)&1)<<31)) ++#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((uint32_t)((level)&1)<<31)) ++#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((uint32_t)((level)&1)<<31)) #define REMOVE_ODD_BIT(x) ((x)&=~INDEX_ODD_BIT) #define GET_INDEX(x) ((x)&~INDEX_ODD_BIT) diff --git a/external/icu/icu4c-warnings.patch.1 b/external/icu/icu4c-warnings.patch.1 index 3c39ba12ded7..76f8b72986a0 100644 --- a/external/icu/icu4c-warnings.patch.1 +++ b/external/icu/icu4c-warnings.patch.1 @@ -1,11 +1,11 @@ diff -ur icu.org/source/common/unicode/utf16.h icu/source/common/unicode/utf16.h ---- icu.org/source/common/unicode/utf16.h 2017-02-03 19:57:23.000000000 +0100 -+++ icu/source/common/unicode/utf16.h 2017-04-21 22:05:57.414397617 +0200 -@@ -321,6 +321,7 @@ +--- icu.org/source/common/unicode/utf16.h 2019-10-03 13:16:41.000000000 +0200 ++++ icu/source/common/unicode/utf16.h 2019-10-28 18:03:07.967208272 +0100 +@@ -397,6 +397,7 @@ (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \ } else /* c>0x10ffff or not enough space */ { \ (isError)=TRUE; \ + (void)(isError); \ } \ - } + } UPRV_BLOCK_MACRO_END |