Skip to content

Commit

Permalink
fix: turn off libxml2's new thread local storage feature
Browse files Browse the repository at this point in the history
Using thread-local variables in position-independent code (i.e.,
combining `__thread` variables with the `-fPIC` compiler option)
introduces a (non-weak) reference to `__tls_get_addr` which resolves
to `ld-linux` on glibc systems and `libwinpthread` on windows systems.

This is an issue when precompiling for musl on glibc systems. If and
when we can build a separate musl native gem, we can revisit this
decision.
  • Loading branch information
flavorjones committed Nov 18, 2023
1 parent 0875fea commit 004e6a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/nokogiri/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,7 @@ def configure
"--with-c14n",
"--with-debug",
"--with-threads",
"--without-tls", # see https://github.com/sparklemotion/nokogiri/issues/3031
"CPPFLAGS=#{cppflags}",
"CFLAGS=#{cflags}",
]
Expand Down

0 comments on commit 004e6a6

Please sign in to comment.