Skip to content

Commit

Permalink
Legacy Kindle: Disable thread safety guardrails for local statics in C++
Browse files Browse the repository at this point in the history
Ought to be safe enough for us, so, whatever.
c.f., koreader/koreader#11246

I'm leaving PocketBook alone, as despite the TC targeting really awfully
old crap, the reality is somewhat less dramatic, and nobody's seen a
similar issue so far anyway (also, InkView >_<").
  • Loading branch information
NiLuJe committed Dec 22, 2023
1 parent 9d750d5 commit adb6398
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile.defs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@ else ifeq ($(TARGET), kindle-legacy)
COMPAT_CXXFLAGS:=$(MG2K12_COMPAT_CXXFLAGS)
endif
COMPAT_CFLAGS:=$(NILUJE_COMPAT_CFLAGS)
# Works around potential deadlocks with local statics in LunaSVG (cxa_guard -> futex)
# We're not multi-threaded, so, whatever.
# c.f., https://github.com/koreader/koreader/discussions/11246
COMPAT_CXXFLAGS+=-fno-threadsafe-statics
# Avoid pulling stuff from GLIBC_2.7 & 2.9 in glib
export glib_cv_eventfd=no
export ac_cv_func_pipe2=no
Expand Down

0 comments on commit adb6398

Please sign in to comment.