Skip to content
Permalink
Browse files

deps: dlloads node static linked executable

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 <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information...
lal12 authored and targos committed Jun 4, 2019
1 parent b282c85 commit 9b02f3623b9171ac01ed03e290bfaa97af686415
Showing with 12 additions and 0 deletions.
  1. +12 −0 common.gypi
@@ -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': [

0 comments on commit 9b02f36

Please sign in to comment.
You can’t perform that action at this time.