[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed May 30 01:23:04 UTC 2018


 src/hb-private.hh |    4 ++--
 src/hb-static.cc  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit efbab6ba3f7434fca41be1b38e4a5281695f231c
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Tue May 29 18:21:55 2018 -0700

    Disable use of thread_local
    
    Clang build was failing with:
    
    /usr/bin/ld: .libs/libharfbuzz_la-hb-blob.o: relocation R_X86_64_PC32 against undefined hidden symbol `_ZTH12_hb_CrapPool' can not be used when making a shared object
    
    Instead of fighting it, just disable use of it.

diff --git a/src/hb-private.hh b/src/hb-private.hh
index 0c291a1d..98595035 100644
--- a/src/hb-private.hh
+++ b/src/hb-private.hh
@@ -588,13 +588,13 @@ static_assert (Namespace::Type::min_size + 1 <= sizeof (_Null##Type), "Null pool
 /* To be fully correct, CrapPool must be thread_local. However, we do not rely on CrapPool
  * for correct operation. It only exist to catch and divert program logic bugs instead of
  * causing bad memory access. So, races there are not actually introducing incorrectness
- * in the code. So maybe disable? Has ~12kb binary size overhead to have it. */
+ * in the code. Has ~12kb binary size overhead to have it, also clang build fails with it. */
 #ifdef HB_NO_VISIBILITY
 static
 #else
 extern HB_INTERNAL
 #endif
-thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)]
+/*thread_local*/ void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)]
 #ifdef HB_NO_VISIBILITY
 = {}
 #endif
diff --git a/src/hb-static.cc b/src/hb-static.cc
index e60121dd..e26e5c80 100644
--- a/src/hb-static.cc
+++ b/src/hb-static.cc
@@ -28,5 +28,5 @@
 
 #ifndef HB_NO_VISIBILITY
 void * const _hb_NullPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
-thread_local void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
+/*thread_local*/ void * _hb_CrapPool[HB_NULL_POOL_SIZE / sizeof (void *)] = {};
 #endif


More information about the HarfBuzz mailing list