From 3acb1d4b28944de908ffb3d0b756725ae015214f Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 6 May 2015 12:59:15 +0200 Subject: Update HarfBuzz to 0.9.40 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- external/harfbuzz/ExternalProject_harfbuzz.mk | 2 + external/harfbuzz/UnpackedTarball_harfbuzz.mk | 4 -- external/harfbuzz/ubsan.patch | 86 --------------------------- 3 files changed, 2 insertions(+), 90 deletions(-) delete mode 100644 external/harfbuzz/ubsan.patch (limited to 'external/harfbuzz') 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 - static inline void hb_object_trace (const Type *obj, const char *function) - { -- obj->header.trace (function); -+ if (likely (obj)) obj->header.trace (function); - } - template - 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 - 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(va); -+ const feature_map_t *b = static_cast(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(va); -+ const char *b = static_cast(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; - -- cgit v1.2.3