diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2015-05-06 12:59:15 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-05-09 19:52:22 +0000 |
commit | 3acb1d4b28944de908ffb3d0b756725ae015214f (patch) | |
tree | 88e7328127346ea98ccc7a79a4a968a5a3ec3c88 /external | |
parent | 442701de0c110ca58ff41abe6bf7ec4496f8457d (diff) |
Update HarfBuzz to 0.9.40
Most of ubsan.patch seems to have been applied upstream, and I can’t
reproduce the issue referenced for the remaining bits, anyway it is
better to push such changes upstream first.
Change-Id: Ie56786c01c06d3542052cd91e36d1f707092beba
Reviewed-on: https://gerrit.libreoffice.org/15643
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/harfbuzz/ExternalProject_harfbuzz.mk | 2 | ||||
-rw-r--r-- | external/harfbuzz/UnpackedTarball_harfbuzz.mk | 4 | ||||
-rw-r--r-- | external/harfbuzz/ubsan.patch | 86 |
3 files changed, 2 insertions, 90 deletions
diff --git a/external/harfbuzz/ExternalProject_harfbuzz.mk b/external/harfbuzz/ExternalProject_harfbuzz.mk index 25141241c9dd..302eed71e698 100644 --- a/external/harfbuzz/ExternalProject_harfbuzz.mk +++ b/external/harfbuzz/ExternalProject_harfbuzz.mk @@ -25,11 +25,13 @@ $(call gb_ExternalProject_get_state_target,harfbuzz,build) : ./configure \ --enable-static \ --disable-shared \ + --disable-gtk-doc \ --with-pic \ --with-icu=yes \ --with-freetype=no \ --with-cairo=no \ --with-glib=no \ + $(if $(VERBOSE)$(verbose),--disable-silent-rules,--enable-silent-rules) \ $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ && (cd $(EXTERNAL_WORKDIR)/src && $(MAKE)) \ ) diff --git a/external/harfbuzz/UnpackedTarball_harfbuzz.mk b/external/harfbuzz/UnpackedTarball_harfbuzz.mk index 9a5560fda96f..5450a81ba0ed 100644 --- a/external/harfbuzz/UnpackedTarball_harfbuzz.mk +++ b/external/harfbuzz/UnpackedTarball_harfbuzz.mk @@ -13,10 +13,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,harfbuzz,$(HARFBUZZ_TARBALL),,harfb $(eval $(call gb_UnpackedTarball_set_patchlevel,harfbuzz,0)) -$(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \ - external/harfbuzz/ubsan.patch \ -)) - ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE) $(eval $(call gb_UnpackedTarball_add_patches,harfbuzz, \ external/harfbuzz/harfbuzz-rtti.patch \ diff --git a/external/harfbuzz/ubsan.patch b/external/harfbuzz/ubsan.patch deleted file mode 100644 index 6c301c4df048..000000000000 --- a/external/harfbuzz/ubsan.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- src/hb-object-private.hh -+++ src/hb-object-private.hh -@@ -131,7 +131,7 @@ - } - - inline bool destroy (void) { -- if (unlikely (!this || this->is_inert ())) -+ if (unlikely (is_inert ())) - return false; - if (ref_count.dec () != 1) - return false; -@@ -160,13 +160,12 @@ - } - - inline void trace (const char *function) const { -- if (unlikely (!this)) return; - /* TODO We cannot use DEBUG_MSG_FUNC here since that one currently only - * prints the class name and throws away the template info. */ - DEBUG_MSG (OBJECT, (void *) this, - "%s refcount=%d", - function, -- this ? ref_count.ref_count : 0); -+ ref_count.ref_count); - } - - private: -@@ -179,7 +179,7 @@ - template <typename Type> - static inline void hb_object_trace (const Type *obj, const char *function) - { -- obj->header.trace (function); -+ if (likely (obj)) obj->header.trace (function); - } - template <typename Type> - static inline Type *hb_object_create (void) -@@ -204,7 +204,7 @@ - static inline bool hb_object_destroy (Type *obj) - { - hb_object_trace (obj, HB_FUNC); -- return obj->header.destroy (); -+ return likely (obj) && obj->header.destroy (); - } - template <typename Type> - static inline bool hb_object_set_user_data (Type *obj, ---- src/hb-ot-map-private.hh -+++ src/hb-ot-map-private.hh -@@ -52,8 +52,12 @@ - unsigned int needs_fallback : 1; - unsigned int auto_zwj : 1; - -- static int cmp (const feature_map_t *a, const feature_map_t *b) -- { return a->tag < b->tag ? -1 : a->tag > b->tag ? 1 : 0; } -+ static int cmp (const void *va, const void *vb) -+ { -+ const feature_map_t *a = static_cast<const feature_map_t *>(va); -+ const feature_map_t *b = static_cast<const feature_map_t *>(vb); -+ return a->tag < b->tag ? -1 : a->tag > b->tag ? 1 : 0; -+ } - }; - - struct lookup_map_t { ---- src/hb-ot-tag.cc -+++ src/hb-ot-tag.cc -@@ -591,9 +591,11 @@ - }; - - static int --lang_compare_first_component (const char *a, -- const char *b) -+lang_compare_first_component (const void *va, -+ const void *vb) - { -+ const char *a = static_cast<const char *>(va); -+ const char *b = static_cast<const char *>(vb); - unsigned int da, db; - const char *p; - -@@ -641,7 +643,7 @@ - /* Find a language matching in the first component */ - lang_tag = (LangTag *) bsearch (lang_str, ot_languages, - ARRAY_LENGTH (ot_languages), sizeof (LangTag), -- (hb_compare_func_t) lang_compare_first_component); -+ lang_compare_first_component); - if (lang_tag) - return lang_tag->tag; - |