Skip to content

Commit

Permalink
deps: dlloads node static linked executable
Browse files Browse the repository at this point in the history
OpenSSL dlloads itself to prevent unloading, in case it might be
dynamically loaded. However when linked statically this will lead to
dloading the main executable.

Refs: #21848 (comment)
PR-URL: #28045
Fixes: #27925
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
lal12 authored and targos committed Aug 2, 2019
1 parent b282c85 commit 9b02f36
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,18 @@
'-Wl,--export-dynamic',
],
}],
# if node is built as an executable,
# the openssl mechanism for keeping itself "dload"-ed to ensure proper
# atexit cleanup does not apply
['node_shared_openssl!="true" and node_shared!="true"', {
'defines': [
# `OPENSSL_NO_PINSHARED` prevents openssl from dload
# current node executable,
# see https://github.com/nodejs/node/pull/21848
# or https://github.com/nodejs/node/issues/27925
'OPENSSL_NO_PINSHARED'
],
}],
['node_shared_openssl!="true"', {
# `OPENSSL_THREADS` is defined via GYP for openSSL for all architectures.
'defines': [
Expand Down

0 comments on commit 9b02f36

Please sign in to comment.